var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

function __getMyScreenWidth() {
	return screen.width;
}
function __getMyScreenHeight() {
	return screen.height;
}
function __getFlashVersion(){ 
  // ie 
  try { 
    try { 
      var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); 
      try { axo.AllowScriptAccess = 'always'; } 
      catch(e) { return '6,0,0'; } 
    } catch(e) {} 
    return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; 
  // other browsers 
  } catch(e) { 
    try { 
      if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 
        return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; 
      } 
    } catch(e) {} 
  } 
  return '0,0,0'; 
}
function __JavaSupport() {
	if (navigator.javaEnabled())
		return '1';
	return '0';
}
function __setDaCookie(c_name,value,vvminutes) {
	var exdate=new Date();
	exdate.setTime(exdate.getTime()+((vvminutes*60)*1000));
	document.cookie=c_name+ "=" +escape(value)+
	((vvminutes==null) ? "" : ";expires="+exdate.toGMTString());
}
function __getDaCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
function __inventSessName() {
	var chars = "0123456789ABCDEFabcdef";
	var string_length = 32;
	var randomstring = '';
	for (var xxxx=0; xxxx<string_length; xxxx++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
}
function __makeCount(urlref, siteref) {
	var oldvisitor = __getDaCookie('__bcbeenhere');
	__setDaCookie('__bcbeenhere', '1', (((30*60)*24)*60));
	
	var cookieSess = __getDaCookie('__bccountsess');
	var __bcnumClicks = parseInt(__getDaCookie('__bcclicks'));
	if (isNaN(__bcnumClicks)) 
		__bcnumClicks = 0;
		
	__bcnumClicks++;
	__setDaCookie('__bcclicks', String(__bcnumClicks), 15);
	
	if (cookieSess == '') {
		cookieSess = __inventSessName();
	}
	__setDaCookie('__bccountsess', cookieSess, 15);
	
	xmlhttp.open("GET", "/admin/edt/counterClass.php?js=true&xres="+__getMyScreenWidth()+"&old="+oldvisitor+"&yres="+__getMyScreenHeight()+"&flashver="+__getFlashVersion()+"&sess="+cookieSess+"&clicks="+String(__bcnumClicks)+"&javasupport="+__JavaSupport()+"&uri="+urlref+"&ref="+siteref, true);
	xmlhttp.send(null);
	setTimeout("__seendKeepAlive()", (30*1000));
}
function __seendKeepAlive() {
	var cookieSess = __getDaCookie('__bccountsess');
	if (cookieSess == '') {
		cookieSess = __inventSessName();
	}
	__setDaCookie('__bccountsess', cookieSess, 15);
	var __bcnumClicks = parseInt(__getDaCookie('__bcclicks'));
	if (isNaN(__bcnumClicks)) 
		__bcnumClicks = 0;
	__setDaCookie('__bcclicks', String(__bcnumClicks), 15);
	
	xmlhttp.open("GET", "/admin/edt/counterClass.php?js=true&keepalive=true&sess="+cookieSess, true);
	xmlhttp.send(null);
	setTimeout("__seendKeepAlive()", (30*1000));
}
