function updateTotal(shipID, totalFieldID, basePrice){
	var ship=document.getElementById(shipID)
	var shipValue=+ship.options[ship.selectedIndex].value;
	var totalValue=basePrice+shipValue;
	var total=totalValue.toFixed(2);
	if(!isNaN(shipValue)) //if it is a number
		document.getElementById(totalFieldID).value="$"+(total);
	else{
		total=basePrice.toFixed(2);
		document.getElementById(totalFieldID).value="$"+total;
	}
}

function testField(shipID, shipText){
	//Tests value of shipID (select) object to see if an option other than default (with text shipText) is chosen
	
	var x=document.getElementById(shipID);
	if(x.options[x.selectedIndex].text!=shipText &&
	   x.options[x.selectedIndex].text!="-------------------" )
		return true;
	return false;
}

function validateSel(shipResult, typeResult, otherResult){
	//shipResult = result from shipping validation
	//typeResult = result from certificate type selection validation
	//otherResult = result from validation of other selection field
	var result="Please select:\n\n";
	returnValue=true;
	
	if(!typeResult){
		result+="o Service type\n";
		returnValue=false;
	}	
	
	if(!shipResult){
		result+="o Shipping location\n";
		returnValue=false;
	}
	
	result+="\nfor your selected service before proceeding to checkout.";
	
	if(!otherResult){
		result="Please make all necessary selections to proceed to checkout.";
		returnValue=false;
	}
	
	if(returnValue==false)
		alert(result);
	
	return returnValue;
}