//===================== // Copyright (c) 2002-2003 // Kayako Web Solutions // http://www.kayako.com //===================== var visitorid = "8e1926d773fab8dec35304220af31084"; var mim; var inCall = 0; var debug = 1; var timer = 0; function doDebug(cont) { if (debug == 1) { alert(cont); } } function doRand() { var num; now=new Date(); num=(now.getSeconds()); num=num+1; return num; } function changeInCall(nc) { inCall = nc; } function checkStatus() { //alert(mim.width); if (mim.width == 4 && inCall == 0) { doChat(); changeInCall(1); } else if (mim.width == 1 && inCall == 1) { changeInCall(0); } } function elapsedTime() { timer = timer+1; setTimeout("elapsedTime()",1000); } function doChat() { screen_width = screen.width; screen_height = screen.height; widthm = (screen_width/2)-250; heightm = (screen_height/2)-250; window.open("http://livesupport.zeonhost.com/sessioncore.php?_d=output&_m=startdirect","customerchat", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=550,height=500,left="+widthm+",top="+heightm); } function doImageLoop() { if (timer <= 3600) { mim = new Image(); dm = new Date(); mim.src = "http://livesupport.zeonhost.com/sessioncore.php?_d=output&_m=visitor&_h="+dm.getTime()+"&_r="+doRand()+"&_u="+escape(window.location); mim.onload = checkStatus; setTimeout("doImageLoop()",8000); } } function startChat() { screen_width = screen.width; screen_height = screen.height; widthm = (screen_width/2)-250; heightm = (screen_height/2)-250; window.open("http://livesupport.zeonhost.com/sessioncore.php?_d=output&_m=start","customerchat"+doRand(), "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=550,height=500,left="+widthm+",top="+heightm); } document.write("\"Chat"); doImageLoop();