// JavaScript Document
// Global js file to load functions that are required in the whole site
function SearchFrmValidator(thisForm)
{
	//alert(thisForm.searchString.value);
  if (thisForm.searchString.value == 'Keyword Search')
  {
    alert('Please enter a keyword for product search.');
    thisForm.searchString.focus();
    return (false);
  }
  else
  {
	  if (thisForm.searchString.value.length < 2)
	  {
		alert('Please enter at least 2 characters in the Keyword Search form field.');
		thisForm.searchString.focus();
		return (false);
	  }
	  if (thisForm.Home.options[thisForm.Home.selectedIndex].value == '')
	  {
		alert('Please select the category to search.');
		thisForm.Home.focus();
		return (false);	  
		  }
	  return (true);
	  
  }
}
// to handle requests from cart view page

function submitonce(theform)
	{
	// if IE 4+ or NS 6+
	if (document.all||document.getElementById)
		{
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++)
			{
			var tempobj=theform.elements[i];
			if(tempobj.type.toLowerCase()=="submit" || tempobj.type.toLowerCase()=="reset")
				//disable em
				tempobj.disabled=true;
			}
		}
	}
function window_certificate()
{
		myurl='https://wheelsnext.com/certificate.cfm';
		window.open(myurl,'window_certificate','width=500,height=400,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no');
}
