		function highlight_on(elmnt) {
		document.all[elmnt].style.background="#333333"; 
		document.all[elmnt+'Link'].style.color="#FFFFFF"; 
		} 
		function highlight_off(elmnt) {
		document.all[elmnt].style.background ="#E6E6E6";
		document.all[elmnt+'Link'].style.color="#333333";		  
		}

		function rejectWhiteSpace(myForm, elementName, message)
		{
			var inputValue = myForm.elements[elementName].value;
			var regExpress = /\S/

			if(inputValue == "" || regExpress.test(inputValue) == false)
			{
				alert(message);
				myForm.elements[elementName].focus();
				return false;
			}

			return true;
		}
		
		function checkQuantity(myForm, elementName, message)
		{
			var inputValue = myForm.elements[elementName].value;

			if(isNum(inputValue) && inputValue > 0)
				return true;
					
			alert(message);
			myForm.elements[elementName].focus();
			return false;
		}
		
		function checkSearchBoxes(myForm, message)
		{
			
			var inputItemValue = myForm.elements["ItemIDText"].value;
			var inputQtyValue = myForm.elements["QuantityText"].value;

			if(inputItemValue.length > 0 && isNum(inputQtyValue) && inputQtyValue > 0)
				return true;
				
			alert(message);
			return false;
		}
		function checkCouponBox(myForm, message)
		{
			
			var inputItemValue = myForm.elements["CouponIDText"].value;
			if(inputItemValue.length > 0)
				return true;
				
			alert(message);
			return false;
		}
		function isNum(value)
		{
			if(value == "")
				return false;
			
			for(var i = 0; i < value.length; i++)
				if(value.charAt(i) < "0" || value.charAt(i) > "9")
					return false;
			
			return true;
		}

		function newWindow(url, wide, high)
		{
			myNewWin = window.open(url, "myWin", "width=" + wide + ",height=" + high + ",left=0,top=0,status=no,scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no");
		}
			
			
			function ChangeDiv(the_div,the_change)
			{
			    var the_style = getStyleObject(the_div);
			    if (the_style != false)
			    {
				 the_style.display = the_change;
			    }
			}

			function HideContent()
			{
			  ChangeDiv("AddlSpecsDiv","none");
			  ChangeDiv("ApplicationsDiv","none");
			  ChangeDiv("ItemContentsDiv", "none");
			  ChangeDiv("InstructionsDiv", "none");
	        }

	        function HideContentEU() {
	            ChangeDiv("AddlSpecsDiv", "none");
	            ChangeDiv("ImportantNotesDiv", "none");
	            ChangeDiv("ItemContentsDiv", "none");
	        }
			
			function SelectTab(objectId)
			{
			  //Set All Tabs Inactive
			    document.all("AddlSpecs").className = "TabIAddlSpecs";
			    document.all("Instructions").className = "TabIInstructions";
			    document.all("ItemContents").className = "TabIItemContents";
			    document.all("Applications").className = "TabIApplications";			  			
			  //Set Active Tab based on what was passed in.
			    document.all(objectId.id).className = "TabA" + objectId.id;
			
			}

			function getStyleObject(objectId) 
			{
			  if (document.getElementById && document.getElementById(objectId)) 
			  {
				return document.getElementById(objectId).style;
			   }else if (document.all && document.all(objectId)) {
				return document.all(objectId).style;
			   }else {
			  return false;
			  }
	}



	function HideSearchContent() {
	    ChangeDiv("divPistonKits", "none");
	    ChangeDiv("divSinglePistons", "none");
	    ChangeDiv("divClutchComponents", "none");
	    ChangeDiv("divCranksRods", "none");
	    ChangeDiv("divCamsValves", "none");
	    ChangeDiv("divMiscItems", "none");
	}
	function SelectSearchTab(objectId) {
	    //Set All Tabs Inactive

	    document.all("PistonKits").className = "TabIPistonKits";
	    document.all("SinglePistons").className = "TabISinglePistons";
	    document.all("ClutchComponents").className = "TabIClutchComponents";
	    document.all("CranksRods").className = "TabICranksRods";
	    document.all("CamsValves").className = "TabICamsValves";
	    document.all("MiscItems").className = "TabIMiscItems";

	    //Set Active Tab based on what was passed in.

	    document.all(objectId.id).className = "TabA" + objectId.id;

	}

	function SelectTabEU(objectId) {
	    //Set All Tabs Inactive
	    document.all("LeftAddlSpecs").className = "TabILeftBtn";
	    document.all("AddlSpecs").className = "TabIBtn";
	    document.all("LeftImptNotes").className = "TabILeftBtn";
	    document.all("ImptNotes").className = "TabIBtn";
	    document.all("LeftItemContents").className = "TabILeftBtn";
	    document.all("ItemContents").className = "TabIBtn";

	    //Set Active Tab based on what was passed in.
	    document.all('Left' + objectId.id).className = "TabALeftBtn";
	    document.all(objectId.id).className = "TabABtn";

	}
	
	function flashTabs()
	{
	    setTimeout("document.all('SinglePistons').className = 'TabASinglePistons';", 300);
	    setTimeout("document.all('SinglePistons').className = 'TabISinglePistons';", 400);

	    setTimeout("document.all('ClutchComponents').className = 'TabAClutchComponents';", 400);
	    setTimeout("document.all('ClutchComponents').className = 'TabIClutchComponents';", 500);

	    setTimeout("document.all('CranksRods').className = 'TabACranksRods';", 500);
	    setTimeout("document.all('CranksRods').className = 'TabICranksRods';", 600);

	    setTimeout("document.all('CamsValves').className = 'TabACamsValves';", 600);
	    setTimeout("document.all('CamsValves').className = 'TabICamsValves';", 700);
	    
	    setTimeout("document.all('MiscItems').className = 'TabAMiscItems';", 700);
	    setTimeout("document.all('MiscItems').className = 'TabIMiscItems';", 800);

	    setTimeout("document.all('MiscItems').className = 'TabAMiscItems';", 800);
	    setTimeout("document.all('MiscItems').className = 'TabIMiscItems';", 900);

	    setTimeout("document.all('CamsValves').className = 'TabACamsValves';", 900);
	    setTimeout("document.all('CamsValves').className = 'TabICamsValves';", 1000);

	    setTimeout("document.all('CranksRods').className = 'TabACranksRods';", 1000);
	    setTimeout("document.all('CranksRods').className = 'TabICranksRods';", 1100);

	    setTimeout("document.all('ClutchComponents').className = 'TabAClutchComponents';", 1100);
	    setTimeout("document.all('ClutchComponents').className = 'TabIClutchComponents';", 1200);

	    setTimeout("document.all('SinglePistons').className = 'TabASinglePistons';", 1200);
	    setTimeout("document.all('SinglePistons').className = 'TabISinglePistons';", 1300);
	}

	function flashTabs4() 
	{
	    setTimeout("flashTabs();", 1000); 
	    setTimeout("flashTabs();", 1500);
	    setTimeout("flashTabs();", 2000);
	    setTimeout("flashTabs();", 2500);
	    
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}