// adds on load events

addLoadListener(init);

function init(){
	// set selected menu marker
	//document.getElementById('menu' + parseFloat(pageNum)).style.backgroundColor='#FFFFFF';
	//document.getElementById('menu' + parseFloat(pageNum)).style.color='#FFFFFF';
	

	var menuitem = document.getElementById("a" + menLev1)
	menuitem.style.backgroundColor = "#737DA3";
	menuitem.style.borderTopColor = "#949EC4";		
	menuitem.style.borderRightColor = "#525C82";	
	menuitem.style.borderBottomColor = "#525C82";	
	menuitem.style.borderLeftColor = "#525C82";	
	
	if (menLev2 != "") {
		var menuitem = document.getElementById("a" + menLev1 + "b" + menLev2)
		menuitem.style.backgroundColor = "#737DA3";
		menuitem.style.borderTopColor = "#949EC4";		
		menuitem.style.borderRightColor = "#525C82";	
		menuitem.style.borderBottomColor = "#525C82";	
		menuitem.style.borderLeftColor = "#525C82";			
	}
	
	if (menLev3 != "") {
		var menuitem = document.getElementById("a" + menLev1 + "b" + menLev2 + "c" + menLev3)
		menuitem.style.backgroundColor = "#737DA3";
		menuitem.style.borderTopColor = "#949EC4";		
		menuitem.style.borderRightColor = "#525C82";	
		menuitem.style.borderBottomColor = "#525C82";	
		menuitem.style.borderLeftColor = "#525C82";			
	}

	//var cookieSize = new Cookie("textsize"); // store text size in a cookie
	//var cookieMarker = new Cookie("marker"); // store text size in a cookie

	// set text size from a cookie
	if (cookieSize.read() && cookieMarker.read() && cookieWidth.read()) {
		document.getElementById('body').style.fontSize = cookieSize.read()
		document.getElementById('marker1').style.color = '#182265';
		document.getElementById('marker2').style.color = '#182265';
		document.getElementById(cookieMarker.read()).style.color = '#182265';	
		document.getElementById('contentwrapper').style.width = cookieWidth.read();
	}


return true;
}
/*
addLoadListener(book);

function book() { // set the form focus
	document.book.email.focus();  // select first field
	
}
*/
function addLoadListener(fn)
{
  if (typeof window.addEventListener != 'undefined')
  {
    window.addEventListener('load', fn, false);
  }
  else if (typeof document.addEventListener != 'undefined')
  {
    document.addEventListener('load', fn, false);
  }
  else if (typeof window.attachEvent != 'undefined')
  {
    window.attachEvent('onload', fn);
  }
  else
  {
    var oldfn = window.onload;
    if (typeof window.onload != 'function')
    {
      window.onload = fn;
    }
    else
    {
      window.onload = function()
      {
        oldfn();
        fn();
      };
    }
  }
}