// JavaScript Document- used on many pages on the site

//Function to open a new window
//@param: URL - the url to open in new window
function openWin(URL)  
{
	bWindow=window.open(URL,"thewindow2","toolbar=no,width=800,height=500,status=no,scrollbars=yes,resizable=yes,menubar=no");
		
}


//Function used to open a popup window
function pop_up_window(url, title)
{
	newwindow=window.open(url,title, 'height=500,width=600,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}


//Function to add our website to a user's browser favorites 
function addtofav(linkUrl,linkTitle)
{
   if (!document.all)
   {
      alert('Please hit ctrl-d to bookmark this page');
   }
   else external.AddFavorite(linkUrl,linkTitle);
   return false;
}

function jumpPage(newLoc) 
{
	newPage = newLoc.options[newLoc.selectedIndex].value

	if (newPage != "") 
	{
		window.location.href = newPage
	}
}

//Function to clear text field when user clicks in it. Clears the search box in the head of each page.
function clearField() 
{
	//Name of form is search_form, field name is q
	if (document.search_form.q.value=="Keyword or Part Number")
	{
	 document.search_form.q.value=""; //Make field blank when user clicks there
	}

}
	