// This function, triggered by a submit button click to add to cart, 
//   evaluates whether both size and quantity  have been set 
// by the user. if both ok, sends message to order form, 
// and lets the user know it has been done.
//Else, sends  alert to user requesting missing parameter
//  submitReset.js  

//moved out of catPwiretxl.htm back to /JS 080819 rnf
// This function, triggered by a submit button click to add to cart,  checks that 
//  both inputs are ok, if so, sends message to order form & resets all globals
// alert( "presubmit1") 
	     function submitReset()
    {  	      	
       		//alert("submitReset " +1)
	resetRQ = "1"
	  		//alert("submitReset " +2)
checkInputs()
			//alert("submitReset " +3)
		if (( wireFtColGauSet == 1))
		{ 
		 	//alert("submitReset " +4)	
	 		// insert the prodno.|price|prodname|size|weight  string onto the name field 
			//to send to QS 
		// from working code....newName = "item-"+ selectedSKU+ "|"+formTwoPlcDec(selectedPrice)+"|" + Item + "|" +"na"+"|"+"0.002";

		newName = "item-"+wireSKU+ "|"+formTwoPlcDec(wirePrice)+"|"+wireGauge+" "+ wireColor+"|" +"na"+"|"+.001
			//alert("submitReset " +5)		
		document.entryf2.elements[0].name = newName
		document.entryf2.elements[0].value = wireFeet
			//alert("submitReset " +6)
			// Let the customer know what happened
		subTotL1A  = formTwoPlcDec(wirePrice*wireFeet);
		d.entryf1.txtL1C8.value  = wireFeet  +" ft of "+wireGauge +" "+wireColor + "\n"+"SubTotal :  "+ formTwoPlcDec(subTotL1A)+"\n"+
									   "Was sent to your cart. ";  
			//alert("newName=" +newName + "  wireFeet= " +wireFeet +" ft .. ")					   
			//alert("submitReset " +6)						   
resetGlobs()
	  		//alert("submitReset " +7)					     
cartWindow()
			//   return true;
		} 
	  	  else 
	  //alert("submitReset " +7)
	  return false;
	}
 
//end  submitReset.js
