﻿		functionOnload = function()
		{
			startList();
		}

		functionOnResize = function()
		{
			setHeight();
		}

    function setScrollHeight()
    {
				var divMainContent = document.getElementById("container");
				var ClientHeight = document.documentElement.clientHeight;
				var ScrollTop = document.documentElement.scrollTop;
				divMainContent.style.height = ClientHeight + 'px';

    }
		function setHeight()
		{
			if (document.getElementById) {
				var divMainContent = document.getElementById("container");
				var ClientHeight = document.documentElement.clientHeight;
				var ScrollTop = document.documentElement.scrollTop;
			  var DivHeight = ClientHeight + ScrollTop;
				//divMainContent.style.height = dscrollTop + 'px;';
	/*			alert('height: ' + mainContent.offsetHeight);
				var htmlheight = document.body.parentNode.scrollheight; 
				var windowheight = window.innerHeight;
				var documentClientHeight = document.body.clientHeight;
				alert ('dscrollTop: ' + dscrollTop);
				mainContent.setAttribute("background", "red");
				alert('hello'); */
				divMainContent.style.height = DivHeight + 'px';
	/*			alert ('documentClientHeight: ' + documentClientHeight);
				alert ('windowheight: ' + windowheight); */
			}
		}

		function startList(){
			//alert('startList');
			if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");
			divPageHeader = document.getElementById("pageHeader");
			divLeftFrame = document.getElementById("leftFrame");
			divRighFrame = document.getElementById("rightFrame");
		
			//divMainContent.style.height = pintHeight + 'px;';
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
						for (j=0; j<node.childNodes.length; j++) {
							childNode = node.childNodes[j];
							if (childNode.nodeName=="DIV") {
								childNode.onmouseover=function() {
									this.className+=" over";
								}
								childNode.onmouseout=function() {
									this.className=this.className.replace(" over", "");
								}
							}
						}
					}
				}
			}
		}

		window.onload=functionOnload;
		window.onresize=functionOnResize;
		window.onscroll=functionOnResize;



