/*
 * Account ID : 156658
 * Website URL: http://www.ortec.com
 * Copyright (C) 2002-2005 OneStat.com All Rights Reserved
 *
 * This script was slightly altered by ORTEC to make it behave
 * correctly in XHTML Strict environments.
 */

function onestat_pageview() {

	/* The following code was copied verbatim from the original
	 * onestat script */
    var d=document;
    var sid="156658";
    var CONTENTSECTION="";
    var osp_URL=d.URL;
    var osp_Title=d.title;
    var t=new Date();
    var p="http"+(d.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/stat.aspx?tagver=2&sid="+sid;
    p+="&url="+escape(osp_URL);
    p+="&ti="+escape(osp_Title);
    p+="&section="+escape(CONTENTSECTION);
    p+="&rf="+escape(parent==self?document.referrer:top.document.referrer);
    p+="&tz="+escape(t.getTimezoneOffset());
    p+="&ch="+escape(t.getHours());
    p+="&js=1";
    p+="&ul="+escape(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
    if(osp_URL!=d.URL) p+="&ol="+escape(d.URL);
    if(typeof(screen)=="object"){
       p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
       p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
    }

	/* Now put the image in the document without using the obsolete
	 * document.write() method */
	var image = document.createElement("img");
	image.setAttribute('width', '0');
	image.setAttribute('height', '0');
	image.setAttribute('src', p);
	document.getElementById('clear').appendChild(image);
}

/* We need to run this script after the page has been completely
 * loaded, since the DOM is only available after loading */
window.onload.actions.push(onestat_pageview);
