ck_tim=new EchoCookie("echocptime"+host);ck_dur=new EchoCookie("echocpdur"+host);ck_off=new EchoCookie("echocp"+host);var sid=SERVICE_ID;var cpon=CALL_PROMPT&&!ck_off.read();var cpd=CALL_PROMPT_TIME*1000;var bs=BASE_URL;var sel;var host=window.location.host;var echoc2c;window.onload = echoInit;document.write("<link href='"+bs+"click2call/css/click2call.css' rel='stylesheet' type='text/css' />");function echoInit() {echoc2c = new EchoClick2Call();if (cpon){echoc2c.cp = new CallPrompt();}}function EchoClick2Call(){this.shroud=document.createElement("DIV");this.shroud.id="callmeouter";this.shroud.setAttribute("style","position: absolute; width:100%; left:0; top:0; height:0; background-color:#000000; display:none; z-index:98;  filter: alpha(opacity=60); opacity: .60; -moz-opacity: .60; -khtml-opacity: .60;");document.body.appendChild(this.shroud);this.echobox=document.createElement("DIV");this.echobox.id="echocall";document.body.appendChild(this.echobox);this.cache;sel=document.getElementsByTagName("select");this.open=function(_1){scrollTo(0,0);if(_1||!this.cache){domstr="";domstr+="<div id=\"callme\">";if(!_1||_1.indexOf("NO_CLOSE")=="-1"){domstr+="<div id=\"callmeclose\"><a href=\"javascript:void(0)\" onClick=\"echoc2c.close()\"><img src=\""+bs+"click2call/im/s.gif\" id=\"callmecloseimg\" /></a></div>";}domstr+="<iframe ALLOWTRANSPARENCY=true id=\"callframe\" frameborder='0' src=\""+bs+"click2call/callme.html?id="+sid+"\"></iframe></div>";this.echobox.innerHTML=domstr;this.cache=bs+"click2call/callme.html?id="+sid;}else{document.getElementById("callframe").src=this.cache;}this.shroud.style.height=getPageHeight()+"px";this.shroud.style.width="100%";this.shroud.style.display="block";document.getElementById("callme").style.display="block";for(i=0;i<sel.length;i++){sel[i].style.visibility="hidden";}if(cpon){this.cp.stop();}};this.close=function(){this.shroud.style.height=0;this.shroud.style.display="none";document.getElementById("callme").style.display="none";for(i=0;i<sel.length;i++){sel[i].style.visibility="visible";}};this.cp;return this;}function CallPrompt(){if(!ck_off.read()&&cpon){curd=new Date();var _2=curd.getTime();var _3=0;var _4=0;_3=ck_tim.read();_4=ck_dur.read();ck_tim.set(_2,0.04);if(_3&&_4){var _5=_2-_3;_4=parseInt(_4)+parseInt(_5);var _6=cpd-_4;if(_4>cpd){echoc2c.open();}else{ck_dur.set(_4,0.04);cpto=setTimeout("echoc2c.open()",(_6));}}else{ck_dur.set(0,0.04);cpto=setTimeout("echoc2c.open()",(cpd));}}this.stop=function(){ck_tim.erase();ck_dur.erase();ck_off.set("",1);};return this;}function EchoCookie(nm){this.name=nm;this.value;this.days;this.set=function(_8,_9){this.value=_8;this.days=_9;if(this.days){var _a=new Date();_a.setTime(_a.getTime()+(this.days*24*60*60*1000));var _b="; expires="+_a.toGMTString();}else{var _c="";}document.cookie=this.name+"="+this.value+_c+"; path=/";};this.read=function(){var _d=this.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(_d)==0){return c.substring(_d.length,c.length);}}return null;};this.erase=function(){this.set("",-1);};return this;}function getPageHeight(){var _11;if(window.innerHeight&&window.scrollMaxY){_11=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){_11=document.body.scrollHeight;}else{_11=document.body.offsetHeight;}}var _12;if(self.innerHeight){_12=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){_12=document.documentElement.clientHeight;}else{if(document.body){_12=document.body.clientHeight;}}}if(_11<_12){pageHeight=_12;}else{pageHeight=_11;}return pageHeight;}[].indexOf||(Array.prototype.indexOf=function(v){for(var i=this.length;i--&&this[i]!=v;){}return i;});
