
function s_calculate()
{
	var elm=document.getElementById("s_priceText");
	var price=elm.value;
	
	var discount=0;
	//elm=document.getElementById("discount_check");
	//if (elm.checked)
	//{
		elm=document.getElementById("discount_text");
		elm.disabled=false;
		var disc=elm.value;
		
		if (disc)
		{
			discount=disc*1;
		}
			
	//}
	
	price=price-(price*discount/100);
	
	elm=document.getElementById("finalPrice");
	elm.innerHTML=price;
}

function s_clear()
{
	var elm=document.getElementById("s_priceText");
	elm.value="";
	
	elm=document.getElementById("discount_text");
	elm.value="";
	
	elm=document.getElementById("finalPrice");
	elm.innerHTML="";
}

function s_clearPrice()
{
	var elm=document.getElementById("s_priceText");
	elm.value="";
}