var locX=0; var locY=200; var imgW=0; var maxX=0; var getC=0; var docW=document.body.clientWidth; var hldX=0; var incX=1; var cStat=1; imgPoll=new Image(); imgPoll.onload=chkImg; function woAfterLoad(){ var tmpDiv=document.createElement('DIV'); tmpDiv.setAttribute('name', 'woInvite'); tmpDiv.setAttribute('id', 'woInvite'); tmpDiv.setAttribute('align', 'right'); tmpDiv.style.position='absolute'; tmpDiv.style.top=200; tmpDiv.style.left=0; tmpDiv.style.zIndex=999; document.body.appendChild(tmpDiv); setTimeout('getImg()',1000); } function woMove(){ if(hldX==0){ newX=locX+incX; if(incX>0){ if(newX0){ locX=newX;woDIVs.left=locX+'px'; setTimeout('woMove()',6); } else { setTimeout('stopInvite()',4000); } } } } function getImg(){ var rTimer=6000; var pUrl="http://gateway7.whoson.com/poll.gif?d=www.designdashboard.com&stamp="+(new Date()).getTime(); if(typeof(sWOSession)!="undefined")pUrl+="&u="+sWOSession; imgPoll.src=pUrl; getC++; if(getC>10)rTimer=10000; if(rTimer>0)setTimeout("getImg()",rTimer); } function chkImg(){ if(imgPoll!=null){ nStat=imgPoll.width; if(nStat==1 && cStat==2)nStat=2; if(nStat!=cStat){ cStat=nStat; if(cStat==3)startChat(); if(cStat==2)startInvite(); if(cStat==1)stopInvite(); } } } function getIImgw(){ imgW=woIMG.width;maxX=docW-imgW; } function startInvite(){ var ofsY; var iUrl="http://gateway7.whoson.com/invite.gif?d=www.designdashboard.com&stamp="+(new Date()).getTime(); if(typeof(sWOSession)!="undefined")iUrl+="&u="+sWOSession; if(document.documentElement && document.documentElement.scrollTop){ ofsY=document.documentElement.scrollTop; } else { ofsY=document.body.scrollTop; } hldX=0;incX=1;locX=0;locY=200; woDIVs=document.getElementById('woInvite').style; woDIVh=document.getElementById('woInvite'); woDIVh.innerHTML=''; woDIVs.top=(locY+ofsY)+'px';woDIVs.left=locX+'px'; setTimeout('woMove()',3000); woIMG=document.images.woIImg; woIMG.onload=getIImgw; } function stopInvite(){ cStat=1;woDIVh.innerHTML=""; setTimeout("getImg()",5000); } function startChat(event){ clsX=locX+imgW-12; clsY=locY+12; if(event.clientXclsY){ this.chatWindow=window.open("https://hosted7.whoson.com/chat/chatstart.htm?domain=www.designdashboard.com","Chat","width=484,height=361"); this.chatWindow.focus();this.chatWindow.opener=window; } stopInvite(); } function anPause(){ hldX=1; } function anResume(){ hldX=0; setTimeout('woMove()',1000); } var woOldOnload=window.onload; if(typeof woOldOnload=='function'){ if (! (String(woOldOnload).indexOf('woAfterLoad') > 0)) { var woRunOnload = woOldOnload; window.onload=function(){woRunOnload();woAfterLoad();}; } } else { window.onload=woAfterLoad; }