i=0;



function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

website2 = location.href;
website2 = escape(website2);


addLoadEvent(startClock);

websitetype=location.search;

if (websitetype == "wholesite"){
	website=location.host;
}else if(websitetype == "thisfolder"){
	website=location.host+location.hostname;
}else{
	website=location.href;
}

website = website.replace('http://', "");
website = website.replace('https://', "");
website = website.replace('www.', "");
website = website.replace('ftp://', "");

function startClock(){
	// Append JS element (therefore executing the 'AJAX' call)
	var jsel = document.createElement('SCRIPT');
	jsel.type = 'text/javascript';
	jsel.src = 'http://www.usersonline.jacware.com/record.php?site='+website+'&site2='+website2+'&var2='+i;
	document.body.appendChild (jsel);

	
	i++;
setTimeout("startClock()", 7000);
}


function changediv(divtext) {

document.getElementById('usersOnlineCount').innerHTML = divtext;

}