var enableCache=true;var jsCache=new Array();var DynObj=new Array();function $ajax(_1){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=_1;this.vars=new Object();this.responseStatus=new Array(2)};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){}};this.reset=function(){this.resetFunctions();this.resetData()};this.crAjx=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){this.xmlhttp=null}}if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}else{this.failed=true}}};this.setVar=function(_2,_3){this.vars[_2]=Array(_3,false)};this.encVar=function(_4,_5,_6){if(true==_6){return Array(encodeURIComponent(_4),encodeURIComponent(_5))}else{this.vars[encodeURIComponent(_4)]=Array(encodeURIComponent(_5),true)}};this.processURLString=function(_7,_8){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=_7.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==_8){this.encVar(urlVars[0],urlVars[1])}else{this.setVar(urlVars[0],urlVars[1])}}};this.createURLString=function(_9){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true)}if(_9){if(this.URLString.length){this.URLString+=this.argumentSeparator+_9}else{this.URLString=_9}}this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0]}urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0]}if(_9){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator)}else{this.URLString+=urlstringtemp.join(this.argumentSeparator)}};this.runResponse=function(){eval(this.response)};this.runAJAX=function(_a){if(this.failed){this.onFail()}else{this.createURLString(_a);if(this.element){this.elementObj=$(this.element)}if(this.xmlhttp){var _b=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}this.xmlhttp.onreadystatechange=function(){switch(_b.xmlhttp.readyState){case 1:_b.onLoading();break;case 2:_b.onLoaded();break;case 3:_b.onInteractive();break;case 4:_b.response=_b.xmlhttp.responseText;_b.responseXML=_b.xmlhttp.responseXML;_b.responseStatus[0]=_b.xmlhttp.status;_b.responseStatus[1]=_b.xmlhttp.statusText;if(_b.execute){_b.runResponse()}if(_b.elementObj){elemNodeName=_b.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){_b.elementObj.value=_b.response}else{_b.elementObj.innerHTML=_b.response}}if(_b.responseStatus[0]=="200"){_b.onCompletion()}else{_b.onError()}_b.URLString="";break}};this.xmlhttp.send(this.URLString)}}};this.reset();this.crAjx()}function ajax_installScript(a){if(!a){return}if(window.execScript){window.execScript(a)}else{if(window.jQuery&&jQuery.browser.safari){STO(a,0)}else{STO(a,0)}}}function $ajax_show(b,a,f,e,d){if(d=="appear"){$opacity(b,0,101,600)}if(d=="highlight"){$highlight(b)}var c=$(b);c.innerHTML=DynObj[a].response;if(d=="blind"){$(b).style.position="";$blinddown(b)}if(enableCache){jsCache[f]=DynObj[a].response}DynObj[a]=false;ajax_parseJs(c)}function $ajaxreplace(b,a){$opacity(b,100,0,400);$(b).style.height="";scr="$ajaxload('"+b+"','"+a+"',false,'appear',false)";STO(scr,400)}function $ajaxload(g,d,c,b,a){if(b=="appear"){changeOpac(0,g)}if(b=="blind"){var f=$(g).style;f.overflow="hidden";f.display="block";f.height="0px"}if(a){if(enableCache&&jsCache[d]){if(b=="appear"){$opacity(g,0,101,600)}if(b=="highlight"){$highlight(g)}$(g).innerHTML=jsCache[d];if(b=="blind"){$(g).style.position="";$blinddown(g)}return}}var e=DynObj.length;if(c!=false){$(g).innerHTML=c}DynObj[e]=new $ajax();DynObj[e].requestFile=d;DynObj[e].onCompletion=function(){$ajax_show(g,e,d,c,b)};DynObj[e].runAJAX()}function ajax_parseJs(e){var d=e.getElementsByTagName("SCRIPT");var c="";var b="";for(var f=0;f<d.length;f++){if(d[f].src){var a=document.getElementsByTagName("head")[0];var g=document.createElement("script");g.setAttribute("type","text/javascript");g.setAttribute("src",d[f].src)}else{if(DHTMLSuite.clientInfoObj.isOpera){b=b+d[f].text+"\n"}else{b=b+d[f].innerHTML}}}if(b){ajax_installScript(b)}}function $(a){return document.getElementById(a)}function STO(b,a){return window.setTimeout(b,a)}function DecToHexa(b){var a=parseInt(b).toString(16);if(b<16){a="0"+a}return a}function addslashes(a){a=a.replace(/\"/g,'\\"');a=a.replace(/\'/g,"\\'");return a}function $toggle(a){if(act_height(a)==0){$blinddown(a)}else{$blindup(a)}}function act_height(a){height=$(a).clientHeight;if(height==0){height=$(a).offsetHeight}return height}function act_width(a){width=$(a).clientWidth;if(width==0){width=$(a).offsetWidth}return width}function max_height(b){var a=$(b).style;a.overflow="hidden";if(act_height(b)!=0){return act_height(b)}else{origdisp=a.display;origheight=a.height;origpos=a.position;origvis=a.visibility;a.visibility="hidden";a.height="";a.display="block";a.position="absolute";height=act_height(b);a.display=origdisp;a.height=origheight;a.position=origpos;a.visibility=origvis;return height}}function $blindup(c,a){if(!a){a=200}acth=act_height(c);maxh=max_height(c);if(acth==maxh){$(c).style.display="block";var b;b=Math.ceil(a/acth);for(i=0;i<=acth;i++){newh=acth-i;STO("$('"+c+"').style.height='"+newh+"px'",b*i)}}}function $blinddown(c,b){if(!b){b=200}acth=act_height(c);if(acth==0){maxh=max_height(c);$(c).style.display="block";$(c).style.height="0px";var a;a=Math.ceil(b/maxh);for(i=1;i<=maxh;i++){STO("$('"+c+"').style.height='"+i+"px'",a*i)}}}function $opacity(f,e,d,c){if($(f).style.width==0){$(f).style.width=act_width(f)}var b=Math.round(c/100);var a=0;if(e>d){for(i=e;i>=d;i--){STO("changeOpac("+i+",'"+f+"')",(a*b));a++}}else{if(e<d){for(i=e;i<=d;i++){STO("changeOpac("+i+",'"+f+"')",(a*b));a++}}}}function changeOpac(b,c){var a=$(c).style;a.opacity=(b/100);a.MozOpacity=(b/100);a.KhtmlOpacity=(b/100);a.filter="alpha(opacity="+b+")"}function $shiftOpacity(b,a){if($(b).style.opacity<0.5){$opacity(b,0,100,a)}else{$opacity(b,100,0,a)}}function currentOpac(d,c,b){var a=100;if($(d).style.opacity<100){a=$(d).style.opacity*100}$opacity(d,a,c,b)}function $highlight(d,b,a,c){if(b){milli=b}else{milli=900}if(a){endcol=a}else{endcol="#FFFFFF"}if(c){origcol=c}else{origcol="#FFFFA6"}$colorize(origcol,endcol,d,milli,"high")}function $textColor(d,c,b,a){if(a){milli=a}else{milli=900}$colorize(c,b,d,milli,"text")}function $morphColor(h,g,f,e,c,d,b,a){if(a){milli=a}else{milli=900}$colorize(g,f,h,milli,"text");$colorize(e,c,h,milli,"back");if(d!=false){$colorize(d,b,h,milli,"border")}}function $colorize(f,d,g,c,b){dr=parseInt(f.substring(1,3),16);dg=parseInt(f.substring(3,5),16);db=parseInt(f.substring(5,7),16);fr=parseInt(d.substring(1,3),16);fg=parseInt(d.substring(3,5),16);fb=parseInt(d.substring(5,7),16);steps=c/10;cr=dr;cg=dg;cb=db;sr=(fr-dr)/steps;sg=(fg-dg)/steps;sb=(fb-db)/steps;var e=10;for(var a=0;a<steps;a++){color="#"+DecToHexa(cr)+DecToHexa(cg)+DecToHexa(cb);if(a==(steps-1)){if(b=="high"){color=""}else{color=d}}mytime=(a);if(b=="back"||b=="high"){newfonc='$("'+g+'").style.backgroundColor="'+color+'";'}else{if(b=="text"){newfonc='$("'+g+'").style.color="'+color+'";'}else{if(b=="border"){newfonc='$("'+g+'").style.borderColor="'+color+'";'}}}STO(newfonc,e);cr+=sr;cg+=sg;cb+=sb;e+=10}};
