<%call nocache() referer=request.servervariables("http_referer") d=request("d") bypass=request("bypass") paramstart=instr(referer,"?") '/// Get Full URL ? if getfullurl="" and paramstart>0 then referer=mid(referer,1,paramstart) end if '/// Check if there's people online lastlogin=application("xlaALSlastlogin") img="offline.gif" if (isdate(lastlogin)) then if datediff("s",lastlogin,getdate())" img=replace(img,"/","\/") if isonline then theurl=applicationurl&"UserPreChat.asp?ref=" & server.urlencode(referer) if d<>"" then theurl=theurl & "&d="&d&"&bypass="&bypass else For Each roomname in application.Contents if Instr(1,roomname,"ALSRoom",1)=1 then application.contents.remove roomname Next end if %> function xlaALSprecheck(){ <%if isonline then%> if (document.body && typeof(document.body.innerHTML) != 'undefined'){ xlaALSrequest(); } else { if (confirm('Your browser does not support some of the features of this system.\nWould you like to leave a message?')) xlaALSleavemsg(); } <% else %> xlaALSleavemsg(); <%end if%> } function xlaALSleavemsg(){ <%if contactform="" then%> var w = 640, h = 480; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var leftPos = (w-<%=width%>)/2, topPos = (h-<%=height%>)/2; xlaALSwindow=window.open("<%=applicationurl&"UserForm.asp?status=offline"%>","ALSRoom","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=<%=width%>,height=<%=height%>,top=" + topPos + ",left=" + leftPos); xlaALSwindow.focus(); <%else%> window.location.href='<%=contactform%>'; <%end if%> } function xlaALSrequest(){ var w = 640, h = 480; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var leftPos = (w-<%=width%>)/2, topPos = (h-<%=height%>)/2; xlaALSwindow=window.open("<%=theurl%>","ALSRoom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=<%=width%>,height=<%=height%>,top=" + topPos + ",left=" + leftPos); xlaALSwindow.focus(); } document.write("<%=img%>");