//<![CDATA[

/* MAIN.js
This script is called from every single non-pop-up page on the site except the home page.
It is reserved for functions that must be available to every such page.
It is independent of and unrelated to the revolver.js script, which is called only by those pages that need to use it.
*/

function whitefix(myheight) {
	var contentdivh = null; // cleanup from possible contamination from cache
	if (myheight) {
	    myheight = (myheight - 300);
		document.write("<style>div\#leftnav \{width\:200px\;background-image: url(/images/bground_leftnav.gif)\;background-repeat\: no-repeat\;background-color\: \#fff\;float\:left\;padding\:150px 0px\;margin-bottom:3px\;border:0px\;height\:" + myheight + "px\;\}</style>");
	//alert("Myheight is " + myheight);

	} else {

	  	var contentdivh = document.getElementById('content').offsetHeight;
		//if (contentdivh > 720){
	 	contentdivh = contentdivh - 300;
		document.write("<style>div\#leftnav \{width\:200px\;background-image: url(/images/bground_leftnav.gif)\;background-repeat\: no-repeat\;background-color\: \#fff\;float\:left\;padding\:150px 0px\;margin-bottom:3px\;border:0px\;height\:" + contentdivh + "px\;\}</style>");
		//alert("Div content height is " + contentdivh);
	}
}

/*TESTING TOOLS:

var leftnavdivh = document.getElementById("leftnav").offsetHeight;
var outerdivh = document.getElementById('outer').offsetHeight;

var evenheight = contentdivh - leftnavdivh;

 THIS IS USING LEFTNAV DIV, which doesn't work on all pages:


alert("Div content height is " + contentdivh + " and Div leftnav height is " + leftnavdivh + " and evenheight is " + evenheight);

alert("Page is too short to need any help! :-\)");

document.write("<style>div\#outer \{width:780px\;margin:0px auto\;padding:0px\;	margin-bottom:0px\;background-color:\#FFF\;height\:" + contentdivh + "px\;\}</style>");
*/

//]]>


