
// function to control tab menu content and tab backgrounds
function tabDisplay(item) {	
	document.getElementById("contact1").style.display = "none";
	document.getElementById("contact2").style.display = "none";
	document.getElementById("contact3").style.display = "none";
	document.getElementById("contact4").style.display = "none";		
	document.getElementById("contact" + item).style.display = "block";
	
	document.getElementById("tab1").style.backgroundImage = "url(images/dark-tab.gif)";
	document.getElementById("tab2").style.backgroundImage = "url(images/dark-tab.gif)";	
	document.getElementById("tab3").style.backgroundImage = "url(images/dark-tab.gif)";	
	document.getElementById("tab4").style.backgroundImage = "url(images/dark-tab.gif)";	
	document.getElementById("tab" + item).style.backgroundImage = "url(images/light-tab.gif)";	
}





// 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 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()) {
		document.getElementById('body').style.fontSize = cookieSize.read()
		document.getElementById('marker1').style.color = '#000000';
		document.getElementById('marker2').style.color = '#000000';
		document.getElementById(cookieMarker.read()).style.color = '#FFFFFF';			
	}

	// delay display of slideshow to show background image
	if(document.getElementById("homeslideshow"))
		setTimeout('document.getElementById("homeslideshow").style.visibility = "visible"', 500);	

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();
      };
    }
  }
}
