var LS;
var Z="";
var Z1="";
var cyl=0;
var imgload=false;
var offimg=new Image();
var onimg=new Image();
function getCookie(NameOfCookie)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1)
{ begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end));
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays)
{ var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString())+(";path=/");
}
pvalue=getCookie("ssid1");
l2_pv=getCookie("l2_pv");
if (pvalue==null) {
pvalue="408747501";
setCookie("ssid1", pvalue);
}
if (l2_pv==null) {
l2_pv=1;
setCookie("l2_pv", l2_pv,700);
} else {
l2_pv++;
if (l2_pv > 99) {
l2_pv=100;
}
setCookie("l2_pv", l2_pv,700);
}
l2s_ls1=getCookie("l2s_ls1");
if (l2s_ls1==null) {
l2s_ls1=pvalue;
setCookie("l2s_ls1", l2s_ls1,700);
}
offimg.src="http://3mistats.com/images/prochat/spacer.gif";
onimg.src="http://3mistats.com/images/prochat/spacer.gif";
var jsid=1;
var refrate=10000;
var sttime=tstamp();
var nimg;
// var oimg=new Image();
var chat_opened = "N" ;
var prop_opened = "N" ;
var chatinit = 0 ;
var chatinv = new Image();
function lswin(Z,njsid)
{
var winno="ls"+njsid;
// est appelé si le client clique sur le logo du chat
chwin=window.open("http://www.3mistats.com/prochat/srvchat.asp?&init=f&"+Z,winno,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=340,height=400");
chwin.focus() ;
}
function propop(njsid,newr,L,H)
{
var pwinno="prop"+njsid;
if (newr=="N") {
phwin=window.open("http://www.3mistats.com/prochat/prop.asp?"+Z,pwinno,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500");
phwin.focus() ;
} else {
top.location="http://www.3mistats.com/prochat/prop.asp?"+Z;
}
}
function imgdsp() {
// var nimg;
var ctime=tstamp();
var diftime=ctime-sttime;
if (diftime > 1800000)
refrate=1440000;
nimg=new Image();
if (cyl==0) {
//nimg.src="http://www.3mistats.com/prochat/apltest.asp?"+Z+"&ct="+diftime;
nimg.src="http://www.3mistats.com/prochat/invitechat.asp?"+Z+"&ct="+diftime;
//nimg.src="temp2.asp"
cyl=1;
} else {
//nimg.src="http://www.3mistats.com/prochat/apltest.asp?"+Z+"&ls_n=1&ct="+diftime;
nimg.src="http://www.3mistats.com/prochat/invitechat.asp?"+Z+"&ls_n=1&ct="+diftime;
//nimg.src="temp2.asp"
}
nimg.onload = chatintr;
chatinit = nimg.width ;
tid = setTimeout("imgdsp()",refrate);
//document.form1.txt.value='';
}
function chatintr()
{
chatinit = nimg.width ;
//chatinit = 2 ;
//document.form1.txt.value=nimg.width;
// 2 / N > ouvre la page svrchat.asp
if ( ( chatinit == 2 ) && chat_opened=="N" )
{
chat_opened = "Y" ;
lswin(Z,jsid);
}
else if ( ( chatinit != 2 ) && (chat_opened=="Y") ) {
chat_opened = "N" ;
}
// 4 / N > ouvre la page prop.asp dans une nouvelle fenêtre
if ( ( chatinit == 4 ) && prop_opened=="N" )
{
prop_opened = "Y" ;
propop(jsid,"N",100,200);
}
else if ( ( chatinit != 4 ) && (prop_opened=="Y") ) {
prop_opened = "N" ;
}
// 5 / N > ouvre la page prop.asp dans la même fenêtre
if ( ( chatinit == 5 ) && prop_opened=="N" )
{
prop_opened = "Y" ;
propop(jsid,"R",100,200);
}
else if ( ( chatinit != 5 ) && (prop_opened=="Y") ) {
prop_opened = "N" ;
}
if ( chatinit == 3 )
document.L2S.src='http://3mistats.com/images/prochat/spacer.gif';
//document.form1.txt.value=onimg.src;
else if ( chatinit == 1 )
document.L2S.src='http://3mistats.com/images/prochat/spacer.gif';
//document.form1.txt.value=offimg.src;
}
function cleartid() {
window.clearTimeout(tid);
}
function live2sp1()
{
var t = new Date();
tmc=(((escape(t.getTimezoneOffset()))/60)*-1);
tmcabs=Math.floor(tmc);
tdiff=tmc-tmcabs;
ntdiff=(tdiff/5)*3;
ntmc=tmcabs+ntdiff;
Z+="tz="+ntmc;
Z+="&ch="+escape(t.getHours())+"H:"+escape(t.getMinutes())+"M";
Z+="&ti="+(navigator.userAgent.indexOf("OS"));
Z+="&sid="+jsid;
Z+="&stid="+816229;
Z+="&l2_pv="+l2_pv;
Z+="&slevel=3";
Z+="&ul="+(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
if(typeof(screen)=="object")
{
Z+="&sr="+screen.width+"x"+screen.height;
Z+="&cd="+screen.colorDepth;
}
Z+="&js="+(navigator.javaEnabled()?"Yes":"No");
Z+="&url="+escape(window.document.URL);
Z+="&rf="+escape(window.document.referrer);
Z+="&rot=1";
Z+="&ssid1="+pvalue;
Z+="&nav="+(navigator.appName+" "+navigator.appVersion);
Z+="&os="+(navigator.platform);
Z1+="sid="+jsid;
Z1+="&nav="+(navigator.appName+" "+navigator.appVersion);
Z1+="&os="+(navigator.userAgent.indexOf("OS"));
Z1+="&ssid1="+pvalue;
ab="";
document.write(ab);
document.write('');
document.write('');
//document.write('')
//document.form1.txt.value=tmc;
tid = setTimeout("imgdsp()",10000);
}
function tstamp()
{
var ndate = new Date() ; return ndate.getTime() ;
}
live2sp1();