/* This script is used in conjunction with the option hack for input_option.pl located in the mgr directory. Link to this js is on the store_template-1.htm */
function valOpt(theForm) 
{ 
var theMessage = "The following is Missing Required Information:\n\n"; 
var selError = ".\n\n"; 
var valid = true; 

for (i=0; i<theForm.elements.length; i++) 
{ 


if (theForm.elements[i].type == 'select-one') 
{ 
if (theForm.elements[i].selectedIndex == 0 && 
theForm.elements[i].options[0].value != '|') 
{ 
theMessage += theForm.elements[i].options[0].value + selError; 
valid = false; 
} 
} 


if (theForm.elements[i].type == 'text') 
{ 
if (theForm.elements[i].value == '' &&
theForm.elements[i].value != '|')
{ 
theMessage += theForm.elements[i].id + selError; 
valid = false; 
} 
}


} 

if (!valid) alert(theMessage); 
return valid; 
} 