/***************************************
*** Real-e-Live People Tracking Interface ***
****************************************
*** Version: 		2.4		          ***
*** Last Modified: 	2/18/2008         ***
****************************************
*** Copyright ASL Internet 2008	          ***
*** All rights reserved 			          ***
****************************************/

var agentName;var iebody;var objref;var showonscrollvar;var siteName;function InitializeReLPTracking(siteName){CreateDiv('ReLPTrafficHook','&nbsp',1,1,1,1);CreateDiv('chatInvitation','&nbsp',300,300,10,10);ConnectReLP(siteName);}function CreateDiv(id,html,width,height,left,top){var newdiv=document.createElement('div');newdiv.setAttribute('id',id);newdiv.setAttribute('name',id);newdiv.style.width=width;newdiv.style.height=width;newdiv.style.position="absolute";newdiv.style.left=left;newdiv.style.top=top;newdiv.innerHTML=html;document.body.appendChild(newdiv);}function CenterChatInvitation(){var ie=document.all&&!window.opera;var scroll_top=(ie)?document.body.scrollTop:window.pageYOffset;objref.style.top=scroll_top+docheight/2-objheight/2+"px";}function ShowReLPInvite(guestID,chatRequestID){var existingInvite=document.getElementById("ReLPChatInvitation");if(existingInvite!=null){existingInvite.parentNode.removeChild(existingInvite);}var ReLPChatInvitation=new SWFObject("http://64.114.146.250/chatInvitation.swf?guestID="+guestID+"&invitationID="+chatRequestID,"ReLPChatInvitation","400","380","7","#FFFFFF");ReLPChatInvitation.addParam("allowScriptAccess","always");ReLPChatInvitation.addParam("quality","high");ReLPChatInvitation.write("chatInvitation");document.getElementById("chatInvitation").style.visibility="visible";var ie=document.all&&!window.opera;var dom=document.getElementById;iebody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;objref=(dom)?document.getElementById("chatInvitation"):document.all.chatInvitation;docheight=(ie)?iebody.clientHeight:window.innerHeight;var scroll_top=(ie)?iebody.scrollTop:window.pageYOffset;var docwidth=(ie)?iebody.clientWidth:window.innerWidth;var objwidth=objref.offsetWidth;objheight=objref.offsetHeight;objref.style.left=docwidth/2-objwidth/2+"px";objref.style.top=scroll_top+docheight/2-objheight/2+"px";showonscrollvar=setInterval("CenterChatInvitation()",50);}function HideChatInvite(){document.getElementById("chatInvitation").style.visibility="hidden";}function AcceptReLPChat(guestID,chatID){mywindow=window.open("http://64.114.146.250/guest.php?chatID="+chatID+"&guestID="+guestID,"ReLPGuestChat","location=0,status=0,scrollbars=0,width=580,height=505");HideChatInvite();}function ConnectReLP(RELSiteName){var theBody=document.getElementsByTagName('body')[0];var so2=new SWFObject("http://64.114.146.250/ReLPTrafficHook.swf?siteName="+RELSiteName+"&referrer="+escape(document.referrer),"ReLPTrafficHook","1","1","8","#FFFFFF");var ReLPTrafficHook=document.getElementById('ReLPTrafficHook');ReLPTrafficHook.style.position="absolute";ReLPTrafficHook.style.float="none";ReLPTrafficHook.style.top="-500px";so2.addParam("allowScriptAccess","always");so2.addParam("quality","high");so2.write("ReLPTrafficHook");var chatInvitation=document.getElementById('chatInvitation');chatInvitation.style.position="absolute";chatInvitation.style.float="absolute";chatInvitation.style.visibility="hidden";chatInvitation.align="center";chatInvitation.style.width="300px";chatInvitation.top="200px"; chatInvitation.zindex="100";}function OpenNewReLPChat(guestID, requestedHost){mywindow = window.open("http://realelivepeople.com/guest.php?requestedHost=" + requestedHost + "&guestID=" + guestID, "ReLPGuestChat", "location=0,status=0,scrollbars=0,width=580,height=505"); HideChatInvite();}