/* drop down menus */

function dropdown(objectID,opacity) {
	if (document.getElementById) document.getElementById(objectID).style.visibility = (opacity) ? "visible" : "hidden";
}

/* updates paypal price based on selected option */

function fnUpdateAddToCartForm(oForm) {
    oSelect = oForm.elements['item[options][option]'];
	if (oSelect.selectedIndex < 0) return false;
	
	oOption = oSelect.options[oSelect.selectedIndex];
	
	strAmount = oOption.getAttribute('amount');
	/* strShipping = oOption.getAttribute('shipping'); */
	
	oForm.elements['item[amount]'].value = strAmount;
	/* oForm.elements.shipping.value = strShipping; */
	
	return true;
}

/* displays price based on selected option */

function fnDisplayPrice(oSelect,strSpanId){
	oDisplaySpan = document.getElementById(strSpanId);
	
	if (oSelect.selectedIndex < 0 || !oDisplaySpan) return false;
	oOption = oSelect.options[oSelect.selectedIndex];
	
	strAmount = oOption.getAttribute('amount');
	
	oDisplaySpan.innerText = '$'+strAmount;
	return true;
}
