function imgPreload()
{
  var args = imgPreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}

function searchPage()
{
  var URL = document.getElementById("search");
  window.location.href = "?q=" + URL.value;
  // change above line to desired location.
  // ex: window.location.href = "search.html?q=" + URL.value;
}

function submitform()
{
	if(document.searchform.onsubmit())
	{
	document.searchform.submit();
	}
}

//Drop down menus for main navigation
<!--
	function toggler(menu)
	{
		var c = document.getElementById(menu);				// c is the submenu
		var u = menu.substr(3);								// cut 'sub' from id for parent (the trigger)
		var p = document.getElementById(u);		
		if (c.style.display == 'none') {					// if submenu is set to not display
			c.style.display = '';							//  display it
			menu.onmouseover = (p.style.backgroundPosition = '0px -120px');
		} else {											// but if the menu is activated"p.style.backgroundPosition='0px -120px'"
			c.onmouseout = (c.style.display = 'none');		//  and user mouseouts, hide it
			if (p.className == "active") {
			menu.onmouseoout = (p.style.backgroundPosition = '0px -60px');
			}
			else {
			menu.onmouseoout = (p.style.backgroundPosition = '0px 0px');
			}
		}
	}
	
	function ensureClose(menu){
		var c = document.getElementById(menu);
		if(c.style.display !='none'){
			toggler(menu)
			}
		
		}
	
	function startMenu(id) 
	{			
		var u = id.substr(3);								// cut 'sub' from id for parent (the trigger)
		// p is for parent, c is for child
		var p = document.getElementById(u);					// get the trigger link by id
		var c = document.getElementById(id);				// get the submenu by id
		p.onmouseover = function () {toggler(id);};			// now add rollover toggles
		p.onmouseout  = function () {toggler(id); ensureClose(id)};
		
	}
	
	function getSubmenus()
	{
		if (!document.getElementById) return false;
					
		var ul = document.getElementById('navigation');		// locate the menu by its id
		
		var uls = ul.getElementsByTagName('ul');			// find submenus by tag <ul>
		for (var i=0; i<uls.length; i++) {					// cycle through them
			startMenu(uls[i].id);							// init by id through positionMenu()
			
		}
	}
	

//-->

