function updatePrice(theForm,theSelection,addedCost1,addedCost2)
{
	var itemSize = document.forms[theForm].elements["os0"].value;
	var goldType = document.forms[theForm].elements["os1"].value;
	var currentPrice = document.forms[theForm].elements["amount"].value;
	var lgRingTorF = "no";
	var antiquingTorF = "no";
	var extracost1TorF = "no";
	var whiteGoldTorF = "no";
	var theActualPrice = currentPrice;
	

	if (theSelection == "None") {			// For basic sales with no upgrades.  Basically...nothing happens. 
		theActualPrice = currentPrice;
		document.forms[theForm].elements["amount"].value = theActualPrice;
		alert("No Upgrades. The actual price is going to be " + theActualPrice)
		return;
	}
///////////
	else {
	
		///////// Checks for large ring sizes
		if(itemSize.indexOf("13" || "14" || "15" || "16" || "17" || "Antiquing")>-1) { 		// Checks to see if those ring sizes are selected
			lgRingTorF = "yes";
			alert("Large Ring size selected. Extra cost added");
		}
		else {
			lgRingTorF = "no";
		}
		
		///////// Checks for Antiquing option
		if(antiquingTorF.indexOf("Antiquing")>-1) { 		// Checks to see if those ring sizes are selected
			antiquingTorF = "yes";
			alert("Antiquing option slected. Extra cost added");
		}
		else {
			antiquingTorF = "no";
		}

		////////// Checks for White Gold Option
		if(goldType.indexOf("White Gold")>-1) { 		// Checks to see if those ring sizes are selected
			whiteGoldTorF = "yes";
			alert("White Gold Option added. Extra cost will be added");
		}
		else {
			whiteGoldTorF = "no";
		}
		
		if(lgRingTorF=="yes" || antiquingTorF == "yes"){
			extracost1TorF = "yes";			
		}
		else {
			extracost1TorF = "no";
		}
		theActualPrice = getActualPrice(currentPrice,addedCost1,addedCost2,extracost1TorF,whiteGoldTorF);
		document.forms[theForm].elements["amount"].value = theActualPrice;
		alert("FINAL PRICE IS: " + theActualPrice);				
	}
////////////			
		

	
}










function getActualPrice(originalPrice,addedCost1,addedCost2,extracost1TorF,whiteGoldTorF) {
	var theActualPrice = originalPrice;
	
	if(extracost1TorF == "yes"){
		theActualPrice = theActualPrice + addedCost1;
	}
	else {
		theActualPrice = theActualPrice;
	}
	
	if(whiteGoldTorF == "yes"){
		theActualPrice = theActualPrice + addedCost2;
	}
	else {
		theActualPrice = theActualPrice;
	}
	
	return(theActualPrice);
}