var ET = new Object();

ETPB = ETgv('ETPB');
ETPBV = ETgv('ETPBV');
ETHM = ETgv('ETHM');
ETD = ETgv('demo');
ETC = ETgc('ETPH');
ET.speed = ETgv('speed');
ET.page = ETgv('page');


function ETgv(name)  {
	if(document.location.search != '' && document.location.search != null) {
		docloc = document.location.search;
		value = docloc.split(name+'=')[1];
		if(value != null) {
			finalVal= value.split('&')[0];
			return finalVal;
		} else {
			return '';
		}
	}
	else {
		return '';
	}
}


function ETgc()  {
	if (document.cookie.length>0)  {
		c_start=document.cookie.indexOf("ETPH=");
		if (c_start!=-1)  {
			c_start=c_start + 5;
			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 ETsc();
}

function ETsc() {
	cv = "1327727738";
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+90);
	document.cookie="ETPH=" +escape(cv) + ";expires="+exdate.toUTCString()+";path=/";
	return cv;
}


ETinclude('js/jq.js');

ETinclude('js/dmns.js');


if(document.location.hash == "#HEATMAP") {
	ETinclude('e/hm.js?ETHM='+ETHM);
} else if (ETPB != '') {
	ETinclude('e/pb.js?r='+encodeURIComponent(document.referrer)+'&ETPB='+ETPB);
} else if (ETD != '') {
	ETinclude('e/pb.js?ETPBV='+ETPBV+'&speed='+ET.speed+'&page=' + ET.page + '&demo=true');
} else if (ETPBV != '') {
	ETinclude('e/pb.js?ETPBV='+ETPBV+'&speed='+ET.speed+'&page=' + ET.page);
} else {
	ETinclude('e/tr.js?r='+encodeURIComponent(document.referrer)+'&c='+ETC);
}

function ETinclude(file) {
	document.write('<script type="text/javascript" src="http://exactostats.com/'+file+'"></script>' );
}

