theid = ''; updated = 0; arp_id = ""; list_id = ""; thename = ""; function ajaxRequest(){ var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken) for (var i=0; i 60) {seconds = 15;} if (updated > 300) {seconds = 30;} if (updated > 600) {seconds = 60;} if (updated > 3600) {seconds = 3600} if (updated > 3600*12) {seconds = 3600*4} clearInterval(recordid);recordvisit(seconds) } function recordvisit(interval){ seconds = interval; recordid = setInterval('recordthevisit()', seconds*1000); } function recordarrival(){ ajaxget('get','/includes/recordvisit.php','?keywords=&prev=&ar=1&page=&i=&visit_id='); } function recorddata(data,redirecto){ expires = 3650 * 1000 * 60 * 60 * 24; if (data.indexOf("|") > 0){ theid = data; visit_id = data.substring(data.indexOf("|")+1).replace(/\s\s*$/, ''); Set_Cookie ("vl5315",theid , '','/','',0) } else if (data.substring(0,7) =='arp_id='){ arp_id = data.substring(7).replace(/\s\s*$/, ''); Set_Cookie ("vl5316",arp_id , expires,'/','',0) ; if (data.indexOf("+") > 0){arp_id = data.substring(7,data.indexOf("+"))} if (data.indexOf("i=") > 0){list_id = data.substring(data.indexOf("i=")+2)} if (redirecto) {location.href=redirecto;} } } function Set_Cookie( name, value, expiry, path, domain, secure ) { var today = new Date(); today.setTime( today.getTime() ); if (!domain) domain = document.domain; if (domain.substring(0,4)== 'www.') domain = domain.substring(3); else domain = '.'+domain; var expires_date = new Date( today.getTime() + (expiry) ); document.cookie = name + "=" +escape(value) + ( ( expiry ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + "/" : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } // this fixes an issue with the old method, ambiguous values // with this test document.cookie.indexOf( name + "=" ); function Get_Cookie( check_name ) { // first we'll split this cookie up into name/value pairs // note: document.cookie only returns name=value, not the other components var a_all_cookies = document.cookie.split( ';' ); var a_temp_cookie = ''; var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; // set boolean t/f default f for ( i = 0; i < a_all_cookies.length; i++ ) { // now we'll split apart each name=value pair a_temp_cookie = a_all_cookies[i].split( '=' ); // and trim left/right whitespace while we're at it cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); // if the extracted name matches passed check_name if ( cookie_name == check_name ) { b_cookie_found = true; // we need to handle case where cookie has no value but exists (no = sign, that is): if ( a_temp_cookie.length > 1 ) { cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } // note that in cases where cookie is initialized but no value, null is returned return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } function init() { recordarrival(); recordvisit(10); } var alreadyrunflag=0 //flag to indicate whether target function has already been run if (document.addEventListener) document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; init()}, false) else if (document.all && !window.opera){ document.write('