// JavaScript Document

function root() {
	//if (window.screen.availHeight <= 780) {
	document.write("this is my javascript.<br />");
	document.write("window.innerWidth: "+ window.innerWidth + "<br />");
	document.write("document.body.clientWidth: "+ document.body.clientWidth + "<br />");
	document.write("document.documentElement.clientWidth: " + document.documentElement.clientWidth + "<br />")
	document.write("screen.availHeight: " + screen.availHeight + "<br />")
	document.write("screen.availWidth: " + screen.availWidth + "<br />")

	if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('95') != -1))
		{
			//var OpSys = "Windows95";
			//document.write("Windows95");
			var y = document.documentElement.offsetHeight;
			var x = document.documentElement.offsetWidth;
			document.write("Windows 95<br />document.documentElement.offsetHeight: " + y);
			document.write("<br>document.documentElement.offsetWidth: " + x);
		}
	  else if(navigator.userAgent.indexOf('Win') != -1)
		{
			//var OpSys = "Windows3.1 or NT";
			//document.write("Windows3.1 or NT");
			var y = document.documentElement.offsetHeight;
			var x = document.documentElement.offsetWidth;
			document.write("Windows 3.1 or NT <br />document.documentElement.offsetHeight: " + y);
			document.write("<br>document.documentElement.offsetWidth: " + x);
		}
	  else if(navigator.userAgent.indexOf('Mac') != -1)
		{
			//var OpSys = "Macintosh";
			//document.write("Machitosh");
			var y = window.innerHeight;
			var x = window.innerWidth;
			document.write("<br />window.innerHeight: " + y);
			document.write("<br />window.innerWidth: " + x);
		}
	  else
		{
			//var OpSys = "other";
			//var y = document.documentElement.offsetHeight;
			//var y = window.innerHeight;
			document.write("an unknown browser.");
			y = 799;
			x = 1000;
		}
}



function flash(file, width, height) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"');
		document.write('width="'+width+'" height="'+height+'">');
		document.write('<param name="movie" value="images/'+file+'.swf" />');
		document.write('<param name="quality" value="high" />');
		//document.write('<param name="BGCOLOR" value="'+background+'" />');
		document.write('<embed src="images/'+file+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"');
		//document.write('type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" bgcolor="'+background+'"></embed>');
		document.write('type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
		document.write('</object>');
		document.write('');
}



function didyouknow() {	
	//var ranNum = Math.floor(Math.random()*5);
	var ranNum = Math.floor(Math.random()*6);
	//var whichQuote=get_random();

	var quote=new Array()
     quote[0]="Leaving lights on for any amount of time uses more energy than turning on/off.";
     quote[1]="It is more energy efficient to keep windows closed in most UM buildings.";
     quote[2]="UM could recycle up to 50% of its waste each year, 15% more than current rates.";
     quote[3]="Computers continue to use energy in &quot;sleep&quot; mode.";
	 quote[4]="Turning a thermostat down in the winter may inadvertently trigger the cooling system.";
	 quote[5]="Plug-in chargers use energy even when devices are not plugged in.";
	 //quote[0]="Keeping windows closed can save hundreds of dollars a day.";
	 //quote[1]="Dollars saved from energy budgets can be used for discretionary purposes.";
	 
   document.write(quote[ranNum])
	
}