//MODEL S - ALL S DOORS

function openWindow(url) {
newWin = window.open ( url, "_blank", "width=450 height=375 left=150 top=75 toolbar=0 statusbar=0 scrollbars=1 menubar=0 location=0" )
}
//function openWin(url) {
//newWin = window.open ( url, "_blank", "width=600 height=400 left=100 top=50 toolbar=1 statusbar=0 scrollbars=1 menubar=1 location=0" )
//}
function openPrintWindow(url) {
newWin = window.open ( url, "_blank", "width=600 height=400 left=100 top=50 toolbar=no statusbar=no scrollbars=yes menubar=yes location=yes" )
}

                window.onerror=null;
                browserName = navigator.appName;
                browserVer = parseInt(navigator.appVersion);
				


function right(e) {

var msg = "oops...";

if (navigator.appName == 'Netscape' && e.which == 3) {

alert(msg);  

return false;

}

else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {

alert(msg); 

return false;

}

return true;

}

document.onmousedown = right;

//Functions for CR Doors - info from forms

function setdoorPrice(selection){ 
var DoorWidth = document.myForm.theWidth.options[document.myForm.theWidth.selectedIndex].value;

var DoorHeight = 
document.myForm.theHeight.options[document.myForm.theHeight.selectedIndex].value;

if (DoorWidth == "One 36 in. door" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "1621";
}
else 
if (DoorWidth == "One 36 in. door with 12 in. sidelight" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "2274";
}
else 
if (DoorWidth == "One 36 in. door with 14 in. sidelight" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "2274";
}
else 
if (DoorWidth == "One 36 in. door with 2 12 in. sidelights" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "2862";
}
else 
if (DoorWidth == "One 36 in. door with 2 14 in. sidelights" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "2862";
}
else 
if (DoorWidth == "2 36 in. doors" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "2819";
}
else 
if (DoorWidth == "2 36 in. doors with 2 12 in. sidelights" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "3996";
}
else 
if (DoorWidth == "2 36 in. doors with 2 14 in. sidelights" && DoorHeight == "96 in.") {
document.myForm.DoorPrice.value = "3996";
}
}

//		function TotalSet() {
//		var DoorCost, DoorQty
//		DoorCost = document.myForm.DoorPrice.value
//		DoorQty = document.myForm.prehangquantity.value
//		var result = DoorQty * DoorCost
//				document.myForm.TotalPrice.value = result
//			}


function finish(form) {
	form.finalwidth.value = eval(form.doorwidth.value)+1.5;
	form.finalheight.value = eval(form.doorheight.value)+1.75;
	form.finalwidth2.value = eval(form.doorwidth.value)+1.5;
	form.finalheight2.value = eval(form.doorheight.value)+2.50;
}
			
function validQty(myForm) {
if (document.myForm.prehangquantity.value == "") 
		{alert("Please Choose a Quantity")

return false

}

return true

}