function add2cart(PN){
document.codeform.id.value = PN;
document.codeform.weight.value = eval(PN+".weight");
document.codeform.price.value = eval(PN+".price");
document.codeform.prodname.value = PN.substr(0,2)+" Series";
document.codeform.imgsrc.value = "/limit-switches/models/"+PN.substr(0,2)+".jpg";
if (PN.substr(0,2) == "ST") {
document.codeform.prodname.value = "YE,YO,YH Series";
document.codeform.prodseries.value = "Limit Switch Mounting Kit";
document.codeform.imgsrc.value = "/limit-switches/models/"+PN+".jpg";
if (PN == "ST960106") {
var infotext = "Switch Series: YE, YO, YH
NAMUR Size: 1";
}
if (PN == "ST960110") {
var infotext = "Switch Series: YE, YO, YH
NAMUR Size: 2";
}
if (PN == "ST960115") {
var infotext = "Switch Series: YE, YO, YH
NAMUR Size: 3";
}
} else {
var infotext = "Switches: "+document.getElementById(PN+'descrip').innerHTML +"
"+ document.getElementById(PN.substr(0,2)+'specs').innerHTML;
}
document.codeform.info.value = infotext;
//alert(infotext);
document.codeform.submit('add');
}