/* 1 */
var DHTML = false, DOM = false, MSIE4 = false, NS4 = false, OP = false;
if (document.getElementById) { DHTML = true; DOM = true; } else { if (document.all) { DHTML = true; MSIE4 = true;  } else { if (document.layers) { DHTML = true; NS4 = true;  }   }   }  if (window.opera) {  OP = true;  }
function getElement (Mode, Identifier, ElementNumber) { var Element, ElementList;
if (DOM) { if (Mode.toLowerCase() == "id") { Element = document.getElementById(Identifier); if (!Element) { Element = false; } return Element; } if (Mode.toLowerCase() == "name") { ElementList = document.getElementsByName(Identifier); Element = ElementList[ElementNumber]; if (!Element) { Element = false; } return Element; } if (Mode.toLowerCase() == "tagname") { ElementList = document.getElementsByTagName(Identifier); Element = ElementList[ElementNumber]; if (!Element) { Element = false; } return Element; } return false; } if (MSIE4) { if (Mode.toLowerCase() == "id" || Mode.toLowerCase() == "name") { Element = document.all(Identifier);
if (!Element) { Element = false; } return Element; } if (Mode.toLowerCase() == "tagname") { ElementList = document.all.tags(Identifier);Element = ElementList[ElementNumber]; if (!Element) {Element = false; }return Element; }return false; } if (NS4) { if (Mode.toLowerCase() == "id" || Mode.toLowerCase() == "name") {Element = document[Identifier]; if (!Element) {Element = document.anchors[Identifier]; } if (!Element) {Element = false; } return Element; } if (Mode.toLowerCase() == "layerindex") {Element = document.layers[Identifier]; if (!Element) {Element = false; } return Element; } return false; }return false; }
function getAttribute (Mode, Identifier, ElementNumber, AttributeName) { var Attribute; var Element = getElement(Mode, Identifier, ElementNumber); if (!Element) {return false; } if (DOM || MSIE4) {Attribute = Element.getAttribute(AttributeName);return Attribute; } if (NS4) {Attribute = Element[AttributeName]; if (!Attribute) {Attribute = false; } return Attribute; } return false; }
function getContent (Mode, Identifier, ElementNumber) { var Content; var Element = getElement(Mode, Identifier, ElementNumber); if (!Element) {return false; } if (DOM && Element.firstChild) { if (Element.firstChild.nodeType == 3) {Content = Element.firstChild.nodeValue; } else {Content = ""; } return Content; } if (MSIE4) {Content = Element.innerText;return Content; } return false; }
function setContent (Mode, Identifier, ElementNumber, Text) { var Element = getElement(Mode, Identifier, ElementNumber); if (!Element) {return false; } if (DOM && Element.firstChild) {Element.firstChild.nodeValue = Text;return true; } if (MSIE4) {Element.innerText = Text;return true; } if (NS4) {Element.document.open(); Element.document.write(Text); Element.document.close();return true; } }
/* 2 */
function sen_JsRedirect(redirectPath){ if (self.location.href){self.location.href = redirectPath; }  }
function sen_JsSafeRedirect(safetyQuestion,redirectUrl){Check = confirm(safetyQuestion); if (Check == true){self.location.href = redirectUrl; }  }
function sen_JsOpenWindow(wName,wUrl,wWidth,wHeight){var extra  = "location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,";extra += "width=" + wWidth + ",height=" + wHeight;sen_JsOpenWindowWindow = window.open(wUrl,wName,extra); }
/* 3 */
function sen_innerSize(w_or_h){ var w,h; if (self.innerHeight) {w = self.innerWidth;h = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight){w = document.documentElement.clientWidth;h = document.documentElement.clientHeight; } else if (document.body){w = document.body.clientWidth;h = document.body.clientHeight; } else{ return FALSE; }
if(w_or_h == 'h') { return h;  } else { return w;  }  }
function sen_scrollingOffset(x_or_y){ var x,y; if (self.pageYOffset){x = self.pageXOffset;y = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){x = document.documentElement.scrollLeft;y = document.documentElement.scrollTop; } else if (document.body){x = document.body.scrollLeft;y = document.body.scrollTop; } else { return false; }
if(x_or_y == 'x') { return x;  } else { return y;  }  }
/* 4 */
function sen_SetStyle(Mode, Identifier, StyleKey, StyleVal){ if(document.all){StyleElement = document.all(Identifier);StyleElement.style[StyleKey] = StyleVal; } else if(DOM){if (Mode.toLowerCase() == "id"){Element = document.getElementById(Identifier); if (Element){Element.style[StyleKey] = StyleVal; }  } if (Mode.toLowerCase() == "name"){ElementList = document.getElementsByName(Identifier); for (var i = 0; i < ElementList.length; i++){ document.getElementsByName(Identifier)[i].style[StyleKey] = StyleVal; } } if (Mode.toLowerCase() == "tagname") {ElementList = document.getElementsByTagName(Identifier); for (var i = 0; i < ElementList.length; i++){document.getElementsByTagName(Identifier)[i].style[StyleKey] = StyleVal; }  } if (Mode.toLowerCase() == "classname") {ElementList = document.getElementsByTagName(Identifier); for (var i = 0; i < ElementList.length; i++){ if(document.getElementsByTagName(Identifier)[i].className=="indexlink"){document.getElementsByTagName(Identifier)[i].style[StyleKey] = StyleVal; }  }  }  }  } sen_add2formfield_has_been_called = 0;
/* 5 */
function sen_add2formfield(formnr, fieldname, fieldindex, str, nlOn2ndCall) { var debug = false; var myform; var myfield; var strfield; if(!document.forms[formnr]) { if(debug){alert('formnr' + formnr + 'does not exist.');} } else { myform = document.forms[formnr]; if(fieldindex==false) { strfield = fieldname; } else { strfield = fieldname + '[' + fieldindex + ']'; } if(myfield = myform.elements[strfield]) { var getvalue = myfield.value; if(getvalue!='' && nlOn2ndCall ) { str = '\r\n' + str; } var getvalue = myfield.value; var setvalue = getvalue + str; myfield.value = setvalue; myfield.focus(); } else { if(debug) { alert('field \'' + strfield + '\' does not exist.'); } } } }
/* 6 */
function sen_cookieSet(cname, cvalue, minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else { var expires = ""; } document.cookie = cname+"="+cvalue+expires+"; path=/"; }
function sen_cookieGet(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') { c = c.substring(1,c.length); } if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length); } } return null; }
function sen_cookieUnset(name) { sen_cookieSet(name,"",-1); }
function sen_cookieCheck() { sen_cookieSet("sen_js_check_user_has_set_cookies_active","true",240); if(sen_cookieGet("sen_js_check_user_has_set_cookies_active")=="true") { return true; } else { return false; } }
sen_cookieCheck();
/* 7 */
function sen_getVar(name) { get_string = document.location.search; return_value = ""; do { name_index = get_string.indexOf(name + "="); if(name_index != -1) { get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index); end_of_value = get_string.indexOf("&"); if(end_of_value != -1) { value = get_string.substr(0, end_of_value); } else { value = get_string; } if(return_value == "" || value == "") { return_value += value; } else { return_value += ", " + value; } } } while(name_index != -1) { space = return_value.indexOf("+"); } while(space != -1) { return_value = return_value.substr(0, space) + " " + return_value.substr(space + 1, return_value.length); space = return_value.indexOf("+"); } return(return_value); }
