function doQuerystringPopupMessage()
{  
	if (this.location.search.toString().indexOf('aspxerrorpath') > 0 )   
	{
 		var strMessage = "An error has occurred and you have been directed to the home page. The webmaster has been notified. Note that this may be caused by an incorrect address. Please email mark@markevans.org with any further information.";
		alert(strMessage);
	}				
}


function getARealBrowser()
{
	
	// Warn user if not using IE 4.0+
	if (navigator.appName.indexOf("Microsoft")==-1 | navigator.userAgent.indexOf("Opera")!=-1 | navigator.appVersion.indexOf("4.0")==-1)  
	{
		alert("This site was designed for a recent version of IE. You are using an old version or another browser so the site may not work correctly.");
	}
}


function fixWindowSize(strWindowName) // strWindowName will be used to set a cookie so resizing only happens once per window
{				
	if (navigator.appName == "Microsoft Internet Explorer") 
	{					
		if (document.body.offsetWidth < 790) //if window is small
		{
			if (screen.width == 800) // if monitor is 800 wide
			{
				window.resizeTo(790, screen.height-40);	
				window.moveTo(5 ,5);		
			}	
			if (screen.width > 800) // if monitor is large
			{
				window.resizeTo(900, screen.height-60);	
				window.moveTo(10 ,10);		
			}					
		}			
	}
}





function setUserTrackerCookie()
{	
	document.cookie = "navigatorUserAgent=" + escape(navigator.userAgent);			

	var objToday = new Date();
	var strHours = objToday.getHours();
	var strMinutes = fixTime(objToday.getMinutes());
	
	//alert(navigator.appName);
	//alert(navigator.appVersion);
	//alert(navigator.appVersion.indexOf("MSIE 6."));
	//alert(navigator.appVersion.substring(0,1));
	
	var strTimeZone = ""
	
	if ( (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 6.") > 0) 
		|| (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= 5) )
	{
		strTimeZone = objToday.toTimeString(); 
	}
	else
	{
		strTimeZone = objToday.getTimezoneOffset();
	}
	
		
	document.cookie = "clientTime=" + strHours + ":" + strMinutes  + "  Time Zone: " + strTimeZone;
	
	document.cookie = "screenWidth=" + screen.width;				
	document.cookie = "screenHeight=" + screen.height;	
	
	if (navigator.appName == "Microsoft Internet Explorer") 
	{	
		document.cookie = "windowWidth=" + document.body.offsetWidth;
		document.cookie = "windowHeight=" + document.body.offsetHeight;
	}	
	else 	
	{
		document.cookie = "windowWidth=" + window.innerWidth;
		document.cookie = "windowHeight=" + window.innerHeight;
	}
	
	document.cookie = "colorDepth=" + screen.colorDepth;			

	if (navigator.appName != "Netscape") // netscape doesn't like this
	{
		document.cookie = "CPU=" + window.parent.clientInformation.cpuClass;		
		document.cookie = "platform=" + window.parent.clientInformation.platform;	
	}
}


function fixTime(the_time) 
{
	if (the_time <10) 
	{
		the_time = "0" + the_time;
	}
	return the_time;
}