
function getexpirydate(nodays){var UTCstring;Today=new Date();nomilli=Date.parse(Today);Today.setTime(nomilli+nodays*24*60*60*1000);UTCstring=Today.toUTCString();return UTCstring;}
function getcookie(cookiename){var cookiestring=""+document.cookie;var index1=cookiestring.indexOf(cookiename);if(index1==-1||cookiename=="")return"";var index2=cookiestring.indexOf(';',index1);if(index2==-1)index2=cookiestring.length;return unescape(cookiestring.substring(index1+cookiename.length+1,index2));}
function setcookie(name,value,duration){cookiestring=name+"="+escape(value)+"; expires="+getexpirydate(duration);document.cookie=cookiestring;}
function add_ch(n,v){if(v){window.dch+="["+n+":"+enc_data(v)+"]";}}
function enc_data(b){if(typeof encodeURIComponent=="function"){return encodeURIComponent(b);}else{return escape(b);}}
function G(){var dt=new Date()
if(!window.dch){window.dch="";}
if(screen)
{add_ch("h",screen.height);add_ch("w",screen.width);add_ch("cd",screen.colorDepth);}
add_ch("tz",-dt.getTimezoneOffset());add_ch("jv",navigator.javaEnabled());if(navigator.plugins){add_ch("pg",navigator.plugins.length);}
if(navigator.mimeTypes){add_ch("mm",navigator.mimeTypes.length);}
add_ch('ua',navigator.userAgent);tr=hex_md5(dch);setcookie('ch',tr,730);}
function gsc(chic){if(!getcookie("ch")){G();}
switch(chic)
{case 1:gmsc();break;case 2:gcsc();break;case 3:grsc();break;}}
function gmsc(){if(!getcookie("wm")){setcookie('ewm',1,1);}}
function gcsc(){if(!getcookie("wc")){setcookie('ewc',1,1);}}
function grsc(){if(!getcookie("wr")){setcookie('ewr',1,1);}}