ns4=(document.layers)?1:0;
ie4=(document.all)?1:0;

function check()
{
xoff=false;
if(xoff) xoff = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)));

with(document.forms)
{
	msg="";

	if(bfrm.domain_reg.value.length<3 && bfrm.domain.value!=3)
		msg+="Domain name should contain at least 3 symbols. You may also enter \"N/A\".\n";
}

if((msg.length>1)&&(!xoff)){
	alert("The order form is filled incorrect:\n\n"+msg);
	return false;
}else{
	return true;
}
}

function calc(hpd1,hpd2,hpd3,hp1,hp2,hp3){
	type = document.forms.bfrm['type'].options[document.forms.bfrm['type'].selectedIndex].value;
	term = document.forms.bfrm['term'].options[document.forms.bfrm['term'].selectedIndex].value;

	if(term == 12){
		if (type=='m') p1=hpd1;
		if (type == 'o') p1=hpd2;
		if (type == 'b') p1=hpd3;
	}else{
		if (type=='m') p1=hp1;
		if (type == 'o') p1=hp2;
		if (type == 'b') p1=hp3;
	}

	document.forms.bfrm['mp1'].value = p1;
	document.forms.bfrm['mt1'].value = term;
	document.forms.bfrm['mpr1'].value = Math.round(p1*term);
}