//
var curHostPlan = 0;
var curDomainPlan = 0;
//
function culcPrice(planPrice) {
	//
	curHostPlan = parseInt(planPrice);
	curDomainPlan = getDomainPrice(curHostPlan);
	//
	document.checkout_form.cur_domain_price.value = curDomainPlan;
	//
	var subTotal = 0;
	//
	if( planPrice != "0" )	{
		//
		subTotal += curHostPlan;
		//
		if( document.checkout_form.domain.value.length != 0 )
			subTotal += curDomainPlan;
		//Show info
		document.checkout_form.total_price.value = ""+subTotal;
	}
}
function getDomainPrice(planPrice) {
	if( (planPrice == 6) || (planPrice == 10) || (planPrice == 15) )
		return 14;
	if( planPrice == 20 )
		return 12;
	if( planPrice == 30 )
		return 10;
	if( planPrice == 50 )
		return 8;
	if( planPrice == 0)
		return "";
}
//
function AddDomain() {
		if( document.checkout_form.domain.value.length != 0 ) {
			//
			if( curHostPlan != 0 ) {
				//
				var total = curHostPlan + curDomainPlan;
				//Show info
				document.checkout_form.total_price.value = ""+total;
		   }
		}
}
//
function formCheck() {
	var condition = document.getElementById("agree");
	if(condition.checked)
		return true;
	alert("вы не отметили поле\nо согласии с пользовательским соглашением");
	return false;
}
//