/* This file may be copyrighted. It has been obfuscated for brevity, not for secrecy. Check http://www.martinweinbrenner.de/t4lib.js?clear */function _t4lib(){this.onload_manager=new this._onload_manager()}function _onload_manager(){this.handlers=Array()}_onload_manager.prototype.register=function(a,b){this.handlers.push(Array(a,b))};_onload_manager.prototype.handle_onload_event=function(){for(var b=0;b<this.handlers.length;b++){var d=this.handlers[b][0];var c=this.handlers[b][1];if(c){setTimeout("t4lib.onload_manager.call_handler("+b+")",c)}else{d()}}};_onload_manager.prototype.call_handler=function(a){var b=this.handlers[a][0];b()};_t4lib.prototype._onload_manager=_onload_manager;_t4lib.prototype.param_array_from_url=function(b){var g;var d;g=b.split("?");if(g.length!=2){d=b}else{d=g[1]}if(d==""){return Array()}else{var h=Array();g=d.split("&");for(var j=0;j<g.length;j++){var e=g[j];var f=e.split("=");if(f.length==2){var c=f[0];var k=f[1];h.push(Array(c,k))}}return h}};_t4lib.prototype.url_params=function(b){var e=Array();for(var c in b){var d=b[c];d=encodeURI(d);d=d.replace("&","%26");d=d.replace("+","%2B");e.push(c+"="+d)}var a=e.join("&");return a};_t4lib.prototype.split_url=function(b){var a=b.split("?");if(a.length!=2){a.push("")}return a};_t4lib.prototype.set_param_in_array=function(c,h,f){var d=Array();for(var b=0;b<c.length;b++){var e=c[b][0];var g=c[b][1];if(e!=h&&g!=null){d.push(c[b])}}if(f!=null){d.push(Array(h,""+f))}return d};_t4lib.prototype.url_from_param_array=function(d,c){ret=Array();ret.push(d);var f=Array();for(var b=0;b<c.length;b++){if(c[b][1]!=null){var e=c[b].join("=");f.push(e)}}if(f.length>0){ret.push("?");ret.push(f.join("&"))}return ret.join("")};_t4lib.prototype.set_param=function(b,f,d){var e=this.split_url(b);var c=e[0];var a=this.param_array_from_url(e[1]);a=this.set_param_in_array(a,f,d);return this.url_from_param_array(c,a)};_t4lib.prototype.xml_request=function(){if(window.XMLHttpRequest&&(!window.ActiveXObject)){return new XMLHttpRequest()}else{return new ActiveXObject("Microsoft.XMLHTTP")}};_t4lib.prototype.get_response_text=function(a,c){var b=this.xml_request();b.open("GET",a,true);b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){c(b.responseText)}else{alert("HTTP ERROR!! "+b.status+" "+a)}}};b.send("")};_t4lib.prototype.replace_element_content_from_url=function(c,a,d,e){var b=this.xml_request();b.open("GET",a,d);if(d){b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){c.innerHTML=b.responseText;if(e!=null){e()}}else{alert("HTTP ERROR!! "+b.status+" "+a)}}}}b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");b.send(null);if(!d){c.innerHTML=b.responseText;if(e!=null){e()}}};_t4lib.prototype.load_xml_from_url=function(a,b){this.get_response_text(a,function(d){var c=t4lib.xml_from_string(d);b(c)})};_t4lib.prototype.xml_from_string=function(a){var b;if(document.implementation&&document.implementation.createDocument){parser=new DOMParser();b=parser.parseFromString(a,"text/xml")}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.loadXML(a)}else{alert("Your browser can't handle this script");return}}return b};_t4lib.prototype.first_element_by_name=function(b){var a=document.getElementsByName(b);if(a.length==0){alert("Cannot find "+b)}else{return a[0]}};_t4lib.prototype.get_attribute=function(c,d){for(var b=0;b<c.attributes.length;b++){if(c.attributes[b].nodeName==d){return c.attributes[b].nodeValue}}return null};_t4lib.prototype.has_attribute=function(c,d){for(var b=0;b<c.attributes.length;b++){if(c.attributes[b].nodeName==d){return true}}return false};_t4lib.prototype.get_child_content=function(b,d,c){if(!c){c=null}var a=b.getElementsByTagName(d);if(a.length==0){return c}else{return this.text_content(a[0])}};_t4lib.prototype.text_content=function(d){if(d.hasChildNodes()){var c="";for(var b=0;b<d.childNodes.length;b++){var e=d.childNodes[b];if(e.nodeType==3){c=c+e.data}else{c=c+this.text_content(e)}}return c}else{return""}};_t4lib.prototype.first_element_by_name_in=function(e,d){var b=d.getElementsByTagName("*");for(var c=0;c<b.length;c++){if(this.has_attribute(b[c],"name")&&this.get_attribute(b[c],"name")==e){return b[c]}}return null};_t4lib.prototype.element_by_id_in=function(e,d){var b=d.getElementsByTagName("*");for(var c=0;c<b.length;c++){if(this.has_attribute(b[c],"id")&&this.get_attribute(b[c],"id")==e){return b[c]}}alert("Cannot find "+e)};_t4lib.prototype.get_input_value=function(a){input=this.first_element_by_name(a);return input.value};_t4lib.prototype.set_input_value=function(b,a){input=this.first_element_by_name(b);input.value=a};_t4lib.prototype.get_selected=function(b){var a=this.first_element_by_name(b);return a.options[a.selectedIndex].value};_t4lib.prototype.get_selected_content=function(b){var a=this.first_element_by_name(b);return a.options[a.selectedIndex].innerHTML};_t4lib.prototype.get_checked=function(e){var b=document.getElementsByName(e);var d=Array();for(var c=0;c<b.length;c++){var f=b[c];if(f.checked){d.push(f.value)}}return d};_t4lib.prototype.get_radio=function(e){var b=document.getElementsByName(e);for(var c=0;c<b.length;c++){var d=b[c];if(d.checked){return d.value}}return null};_t4lib.prototype.ask_link=function(b,a){if(window.confirm(b)){window.location.href=a}};_t4lib.prototype.set_cookie=function(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(!a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")};_t4lib.prototype.get_cookie=function(a){var f=document.cookie.split(";");var b="";var d="";var e="";var c=false;for(i=0;i<f.length;i++){b=f[i].split("=");d=b[0].replace(/^\s+|\s+$/g,"");if(d==a){c=true;if(b.length>1){e=unescape(b[1].replace(/^\s+|\s+$/g,""))}return e;break}b=null;d=""}return null};_t4lib.prototype.delete_cookie=function(a,c,b){if(Get_Cookie(a)){document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};_t4lib.prototype.strip=function(a){return a.replace(/^\s+|\s+$/g,"")};var t4lib=new _t4lib();