<!--
// -- Your Browser should be JavaScript enabled to use this Form -- //

    var pro, des, eng, cap, pri, col, pip, old, req, total, jhd;
    var proi, desi, engi, capi, prii, coli, pipi, oldi, reqi, totali, jhdi;
    var coment = "";
    var send="";
function mail(form){
      //alert(send);
      Price.action = "./sendmailv23.php?ZXN0XzI4NTFfamhAamV0LWhvdC5jb20uYXU=+"+send;
      Price.submit();

}
function stats(form){
        Price.Browser.value=navigator.appName;
        Price.browserOS.value=escape(navigator.userAgent);
        Price.screenRes.value=screen.width+"X"+screen.height;
}

function gather(form){
  var lr="\r\n";
	product(form);
  if(pro != "" ){
    description(form);
    engine(form);
	  capacity(form);
    primaries(form);
    exhaust(form);
    collector(form);
    old_coating(form);
    req_finish(form);
  }
    coment="Name: "+Price.req_name.value+"\r\nAddress: "+Price.req_address.value+"\r\nCity :"+Price.req_city.value+"\r\nCode: "+Price.req_code.value+"\r\nEmail: "+Price.email.value+"\r\n";
    coment=coment+"Car brand: "+Price.Car_Brand.value+"\r\nCar model: "+Price.Car_Model.value+"\r\n";
//  alert("Engine type: "+eng +lr+"Capacity: "+cap +lr+ "Produce: "+pro +lr+ "Primary Pipe Dia: "+pri +lr+ col +lr+ pip +lr+ old +lr+ pro +lr+ req +lr+ total +lr+ jhd);
  var msg="\r\nPlease review the above information before you send. \r\n";
      msg=msg+"\r\nIf you have other parts you require an estimate please submit more than one form.\r\n";
  document.Price.finalinfo.value=coment + engi + capi  + desi + prii + coli + pipi + oldi + proi + reqi + msg;
  send=coment +"~"+ eng +"_"+ cap +"_"+ des +"_"+ pri +"_"+ col +"_"+ pip +"_"+ old +"_"+ pro +"_"+ req;
}

function validEmail(form){
var address=Price.email.value;
  if(address.indexOf(".")<=0){
    alert("Email Error: No valid email has been entered.");
    showPane('menu2');
    return false;
  }
  if(address.indexOf("@")<=0){
    alert("Email Error: No valid email has been entered.");
    showPane('menu2');
    return false;
  }
return true;
}
function product(form){
        if(Price.Product.selectedIndex == 0){
	         alert("Product Error: No JET-HOT product has been selected.");
	         showPane('menu5');
           return false;
        }
        pro = "1-"+Price.Product.selectedIndex+"-Product: "+Price.Product.value+"\r\n";
        proi = "Product: "+Price.Product.value+"\r\n";
}
function description(form){
      if(Price.Engine_Type.selectedIndex <= 2 && Price.Description.selectedIndex >= 4 && Price.Description.selectedIndex <= 11){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan001");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex >= 10 && Price.Description.selectedIndex >= 4 && Price.Description.selectedIndex <= 15){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan002");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex >= 3 && Price.Engine_Type.selectedIndex <= 4 && Price.Description.selectedIndex != 4 && Price.Description.selectedIndex != 16){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan003");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex == 5 && Price.Description.selectedIndex !=5){
          if(Price.Description.selectedIndex <=11){
            alert("Warning: Engine type "+Price.Engine_Type.value+" does not suit header Description "+Price.Description.value+".\r\n Please reselect Part Description. \r\n wan004");
          }
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex == 6 && (Price.Description.selectedIndex < 6 || Price.Description.selectedIndex > 7)){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan006");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex == 7 && (Price.Description.selectedIndex < 8 || Price.Description.selectedIndex > 9)){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan007");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex == 8 && (Price.Description.selectedIndex < 10 || Price.Description.selectedIndex > 11)){
          alert("Warning: Description selected "+Price.Description.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect Description. \r\n wan007");
	       showPane('menu4');
	       return false;
      }
      if( Price.Description.selectedIndex == 16 && Price.Finish_Required.selectedIndex != 3 && Price.Finish_Required.selectedIndex != 4){
          alert("Warning: The Part description "+Price.Description.value+" does not suit required finish you selected "+Price.Finish_Required.value+".\r\n Please review selections. \r\n wan008");
	       showPane('menu4');
	       return false;
      }
      if(Price.Engine_Type.selectedIndex == 9 && Price.Description.selectedIndex != 4){
          alert("Warning: Description selected "+Price.Description.value+
          " does not suit Engine type "+Price.Engine_Type.value+
          ".\r\n Please reselect Description 6cyl or V6 header. \r\n wan009");
	       showPane('menu4');
	       return false;
      }
        if(Price.Description.selectedIndex == 0){
	    alert("Description Error: No Header or Exhauts description has been selected.");
	    showPane('menu4');
	    return false;
        }
        des = "2-"+Price.Description.selectedIndex+"-Header type: "+Price.Description.value+"\r\n";
        desi = "Header type: "+Price.Description.value+"\r\n";
}
function engine(form){
        if(Price.Engine_Type.selectedIndex == 0){
	    alert("Engine Type Error: No Engine type has been selected.");
      showPane('menu3');
	    return false;
        }
        eng = "3-"+Price.Engine_Type.selectedIndex+"-Engine type: "+Price.Engine_Type.value+"\r\n";
        engi = "Engine type: "+Price.Engine_Type.value+"\r\n";
}
function capacity(form){
      if(Price.Engine_Type.selectedIndex == 1 && Price.Engine_Capacity.selectedIndex <=2){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan007");
      showPane('menu3');
	    return false;
      }
      if(Price.Engine_Type.selectedIndex == 2 && Price.Engine_Capacity.selectedIndex <=6){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan009");
      showPane('menu3');
	    return false;
      }
      if(Price.Engine_Type.selectedIndex == 3 && Price.Engine_Capacity.selectedIndex >=6){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan010");
      showPane('menu3');
	    return false;
      }
      if(Price.Engine_Type.selectedIndex == 4 && Price.Engine_Capacity.selectedIndex >=6){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan011");
      showPane('menu3');
	    return false;
      }
      if(Price.Engine_Type.selectedIndex >= 10 && Price.Engine_Capacity.selectedIndex <7){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan012");
      showPane('menu3');
	    return false;
      }
      if(Price.Engine_Type.selectedIndex >= 6 && Price.Engine_Type.selectedIndex <= 9 && Price.Engine_Capacity.selectedIndex >=5){
          alert("Warning: Engine capacity "+Price.Engine_Capacity.value+" does not suit Engine type "+Price.Engine_Type.value+".\r\n Please reselect engine capacity. \r\n wan013");
      showPane('menu3');
	    return false;
      }
        if(Price.Engine_Capacity.selectedIndex == 0){
	    alert("Engine Capacity Error: No Engine Capacity has been selected.\r\nIf no exact capacity is shown Select the nearest.");
      showPane('menu3');
	    return false;
        }
        cap = "4-"+Price.Engine_Capacity.selectedIndex+"-Engine Capacity: "+Price.Engine_Capacity.value+"\r\n";
        capi = "Engine Capacity: "+Price.Engine_Capacity.value+"\r\n";
}
function primaries(form){
        if(Price.Primary_Dia.selectedIndex == 0 && Price.Description.selectedIndex <= 3){
	    alert("Primary Dia Error: No Primary tube diameter has been selected.");
	    showPane('menu4');
	    return false;
        }
        pri = "5-"+Price.Primary_Dia.selectedIndex+"-Primary pipe dia: "+Price.Primary_Dia.value+"\r\n";
        prii = "Primary pipe dia: "+Price.Primary_Dia.value+"\r\n";
}
function exhaust(form){
        if(Price.Description.selectedIndex == 12 && Price.Exhaust_Dia.selectedIndex == 0){
	       alert("Exhaust Dia Error: No Exhaust pipe diameter has been selected.");
	       showPane('menu4');
	       return false;
        }else if(Price.Description.selectedIndex == 13 && Price.Exhaust_Dia.selectedIndex == 0){
	       alert("Exhaust Dia Error: No Exhaust pipe diameter has been selected.");
	       showPane('menu4');
	       return false;
        }else if(Price.Description.selectedIndex == 12 || Price.Description.selectedIndex == 13){
          pip = "6-"+Price.Exhaust_Dia.selectedIndex+"-Exhaust pipe dia: "+Price.Exhaust_Dia.value+"\r\n";
          pipi = "Exhaust pipe dia: "+Price.Exhaust_Dia.value+"\r\n";
          return ;
        }
          pip="6-0- " ;
          pipi="" ;
}
function collector(form){
        if(Price.Collector_Length.selectedIndex == 0 && Price.Description.selectedIndex == 2){
	    alert("Collector Length Error: No Collector length has been selected.");
	    showPane('menu4');
	    return false;
        }else if(Price.Description.selectedIndex == 2) {
        col="7-"+Price.Collector_Length.selectedIndex+"-Collector length: "+Price.Collector_Length.value+"\r\n";
        coli="Collector length: "+Price.Collector_Length.value+"\r\n";
        return ;
        }
        col = "7-0- ";
        coli = "";
}
function old_coating(form){
        if(Price.Current_Finish.selectedIndex == 0){
	    alert("Current Finish Error: No Current finish has been selected.");
	    showPane('menu4');
	    return false;
        }
        old = "8-"+Price.Current_Finish.selectedIndex+"-Current finish: "+Price.Current_Finish.value+"\r\n";
        oldi = "Current finish: "+Price.Current_Finish.value+"\r\n";
}
function req_finish(form){
        if(Price.Finish_Required.selectedIndex == 0 && Price.Product.selectedIndex <= 1){
	    alert("Finish Required Error: No Finish or color has been selected.");
	    showPane('menu5');
	    return false;
        }
        if(Price.Product.selectedIndex == 3 && Price.Description.selectedIndex > 5){
	       var msg="Product Selection Error: JET-HOT DIRECT does not provide headers for this vehicle exhaust description. ("+Price.Description.value+")\r\n";
          msg+="Please select option 1 JET-HOT Coating.\r\n\r\nJET-HOT DIRECT provides new Headers complete that is a new set of headers coated in JET-HOT Sterling.\r\n";
          msg+="JET-HOT DIRECT has a large range of Headers for Cars and 4WD check our list at www.jethotdirect.com. ";
	       alert(msg);
	       showPane('menu5');
	       return false;
        }
        req = "9-"+Price.Finish_Required.selectedIndex+"-Required finish: "+Price.Finish_Required.value+"\r\n";
        reqi = "Required finish: "+Price.Finish_Required.value+"\r\n";
}
function help(coment){
        alert(coment);
}
// -->
