function mainMouseOver(id1, id2, id3)
{
	//Subnav
	if (document.getElementById(id1) != null) 
	{
  	element = document.getElementById(id1);
 	 	element.style.display = "block";
	}
	//Nav
	if (document.getElementById(id2) != null) 
	{
	  element2 = document.getElementById(id2);
	  element2.style.background = "transparent url(NavSel.png) repeat-x left top";
	}
	//anav
	if (document.getElementById(id3) != null) 
	{
	  element3 = document.getElementById(id3);
	  element3.style.color = "#ffdf00";
	}
}

function mainMouseOut(id1, id2, id3)
{
	if (document.getElementById(id1) != null) 
	{
	  element = document.getElementById(id1);
	  element.style.display = "none";
	}
	if (document.getElementById(id2) != null) 
	{
	  element2 = document.getElementById(id2);
	  element2.style.background  = "transparent none";
	}
	if (document.getElementById(id3) != null) 
	{
	  element3 = document.getElementById(id3);
	  element3.style.color  = "#ffffff";
	}
}

function mainMouseOver2(id1, id2, id3)
{
	//Subnav
	if (document.getElementById(id1) != null) 
	{
  	element = document.getElementById(id1);
 	 	element.style.display = "block";
	}
	//Nav
	if (document.getElementById(id2) != null) 
	{
	  element2 = document.getElementById(id2);
	  element2.style.color = "#efaf20";
	}
	//anav
	if (document.getElementById(id3) != null) 
	{
	  element3 = document.getElementById(id3);
	  element3.style.color = "#dfaf40";
	}
}

function mainMouseOut2(id1, id2, id3)
{
	if (document.getElementById(id1) != null) 
	{
	  element = document.getElementById(id1);
	  element.style.display = "none";
	}
	if (document.getElementById(id2) != null) 
	{
	  element2 = document.getElementById(id2);
	  element2.style.background  = "transparent none";
	}
	if (document.getElementById(id3) != null) 
	{
	  element2 = document.getElementById(id3);
	  element3.style.color  = "#ffffff";
	}
}

function changeImage(id1, url)
{
	if (document.images != null)
	{
		document.images[id1].src = url;
	}
}

function mainAddLoadEvent(func)
{
  var oldonload = window.onload;
  
  if (typeof window.onload != 'function') 
  {
    window.onload = func;
  } 
  else 
  {
    window.onload = function() 
    {
      if (oldonload) oldonload();
      func();
    }
  }
}

function pingPreload()
{
	if (document.images)
	{
		imageobj = new Image();
		image_path = new Array();
		image_width = new Array();
		image_height = new Array();
		var iCount = 0;
		image_path[iCount++] = "Banner_Text_Overlay.png";
		image_path[iCount++] = "left_arrow_dark.png";
		image_path[iCount++] = "left_arrow_light.png";
		image_path[iCount++] = "link_back.png";
		image_path[iCount++] = "NavBack.png";
		image_path[iCount++] = "NavSel.png";
		image_path[iCount++] = "NavSpace.png";
		image_path[iCount++] = "picture_slider.png";
		image_path[iCount++] = "qlink.png";
		image_path[iCount++] = "right_arrow_dark.png";
		image_path[iCount++] = "right_arrow_light.png";
		image_path[iCount++] = "subnav.png";
		image_path[iCount++] = "whitebang.png";
		image_path[iCount++] = "Back.jpg";
		
		var i = 0;
		for (i = 0; i < iCount; i++)
		{
				imageobj.src = image_path[i];
		}
	}
}

function navigateTo(url)
{
	location.href = url;
}
