var oMenu = top.fra_top;
var oElement = document.frmCalc;

function verifyQty(){
	if (isNaN (document.frmCalc.txtQty.value / 3)){
		alert ("Incorrect number.");
		document.frmCalc.txtQty.value = '1';
		document.frmCalc.txtQty.focus();
	}
	else if (parseInt(document.frmCalc.txtQty.value) > 100) {
		alert ("Quantity was set beyond 100 limit.");
		document.frmCalc.txtQty.value = '100';
		document.frmCalc.txtQty.focus();
	}
	
	oMenu.computeCost();
}

function addOption(oElement, text, val, idx){
	var option = new Option(text,val, true, true);
	oElement.options[idx] = option;
}

function init() {
	var returnflag = false;
	if ("object" != typeof(oMenu.document.fMenu)) return;
	var oElement = document.frmCalc;
	oMenu.polulateSelect (oElement.selHD, 24);
	oMenu.polulateSelect (oElement.selMD, 59);
	oMenu.polulateSelect (oElement.selDM, 31);
	oMenu.fillAppliances();
	oMenu.restoreList();
	if (oMenu.isStateCalc == false) oMenu.setStateCalc();
	oMenu.checkThreshold();
}

function openApplTip()
{
	var newTipWindow = window.open ('calculator/calc_tip.htm', 'tip', 'location=0,resizable=yes,width=400,height=200,top=20,left=0');
	if (parseInt(navigator.appVersion) >= 4) newTipWindow.window.focus();
}