var UPGRADE_JS = 2;function updateextralistings( isonsubmit )	{	if ( document.renewform.M_is_loggedin.value ==1)		{		var extratot = parseFloat(document.renewform.M_extralistings.selectedIndex*20);		if ( document.renewform.M_extralistings.selectedIndex == 0 )			{			if ( isonsubmit )				{				alert('Please select how many extra listings you wish to purchase');				}			document.renewform.amount.value=0;			return false;			}		else			{			document.renewform.amount.value=makeprice(extratot);			document.renewform.desc.value = document.renewform.M_extralistings.selectedIndex + " extra bold listings";			return true;			}		}	}function updatetotal() 	{	if ( document.renewform.M_is_loggedin.value ==1)		{		var discountpc= 0;		var discount = 0;		var extratot = 0;		var subtot =0;		var grandtotal =0;		for (var i=0; i<document.renewform.M_prodprice.length; i++)			{			if ( document.renewform.M_prodprice[i].checked )				{				subtot = parseFloat(document.renewform.M_prodprice[i].value);				}			}		if ( document.renewform.proupgrade.value ==1)			{			if ( !document.renewform.M_prodprice[3].checked )				{				if ( document.renewform.M_extralistings.selectedIndex!=0 )					{					alert("Extra listings only available for 1 year option");					document.renewform.M_extralistings.selectedIndex=0;					}				document.renewform.M_extralistings.disabled=true;				}			else				{				document.renewform.M_extralistings.disabled=false;				}			// is pro upgrade form so look for extra listings too!			extratot = parseFloat(document.renewform.M_extralistings.selectedIndex*20);			//alert( document.renewform.M_extralistings.selectedIndex );			//alert( document.renewform.M_extralistings.selectedIndex*20);			document.renewform.extralistingscost.value = extratot;			}		subtot = subtot+extratot;		// discount		discountpc = document.renewform.M_discount.value;		grandtotal = subtot;		if ( discountpc )			{			discount = discountpc/100;			grandtotal = subtot-(subtot*discount);			}		var refundamount = document.renewform.M_refund.value;		if ( refundamount )			{			grandtotal = grandtotal - refundamount;			}		document.renewform.amount.value=makeprice(grandtotal);		}	}
