

function GetCalculations() { 
	var x=0;
	var temp=0;
	var temp2=0;
	var tempkv=0;
	var temp2kv=0;
        var lineas =0;
	var detalles=new String();
	var comienzo=new String();
	var htmlfin=new String();
	comienzo="<html>";
	comienzo+="<body bgcolor=white>"
	comienzo+="<body>"
	comienzo+="<img  src='wattagecalculator.jpg' width='200' height='33' border='0'><br>";
	htmlfin="</table></body></html>"
detalles="<table border='0' cellspacing='0' cellpadding='4'>"
detalles+="<tr><td colspan='4'><p align='center'><br><font face='Helvetica,Arial' color='red' size='3'><b>Wattage Calculator Results</b></font></p><p align='left'><font face='Helvetica,Arial' color='#000000' size='3'><b>You selected the following items:</b></font></p></td></tr>";
detalles+="<tr bgcolor='#555555'><td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Quantity</b></font></td>";
detalles+="<td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Appliance</b></font></td align='center'><td><font face='Helvetica,Arial' color='white' size='2'><b>Running</b></font></td><td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Starting</b></font></td></tr>";

for(var i = 0; i<(document.forms.length - 1); i++) {       
     x = document.forms[i].number.selectedIndex;
     if (x!=0) {
        detalles += "<TR><TD align='center'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + document.forms[i].number.selectedIndex + "</b></TD><TD><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].name + "</b></TD><TD align='right'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].running + "</b></TD><TD align='right'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].starting + "</b></TD></TR>"
        temp += itemList[i].running * x
        temp2 += itemList[i].starting * x
	}
}
tempkv = Math.round(temp/1000)
temp2kv = Math.round(temp2/1000)

detalles += "<TR><TD align='center'></TD><TD></TD><TD align='right'></TD><TD align='right'></TD></TR>"
detalles+="<tr><td colspan='4'><p align='justify'><font face='Helvetica,Arial' color='#000000' size='2'><br><b>*Based on these selections, you would need a standby system that meets these minimum requirements:</b></font></p></td></tr>";


var params=new String();
params="menubar=no,scrollbars=yes,width=500,height=500,scrollbars=yes";
display=window.open("","newform",params);
display.document.open()
display.document.clear()
display.document.writeln(comienzo);
display.document.write(detalles);
display.document.write("<tr><td colspan='4'><br><center><font face='Helvetica,Arial' size='3' color='red'><b>" + temp + " <font color='#000000'> rated (running) watts            = </font><font face='Helvetica,Arial' size='3'><b>" + tempkv + " KW</b></font></b><br><font face='Helvetica,Arial' size='2'></font><br><font face='Helvetica,Arial' size='2'></font></center></td></tr>");
display.document.write("<tr><td colspan='4'><center><font face='Helvetica,Arial' size='3' color='red'><b><b>" + temp2 + " <font color='#000000'> surge (starting) watts           = </font><font face='Helvetica,Arial' size='3'><b>" + temp2kv + " KW</b></font></b><br><br><font face='Helvetica,Arial' size='2'></font><br><font face='Helvetica,Arial' size='2'></font></center></td></tr>");
display.document.write("<tr><td colspan='4'><p align='justify'><font face='Helvetica,Arial' color='#555555' size='2'><b>Take a look at all our Generator Set models to determine which will best meet your needs and budget. Other considerations may include, engine life, warranty, relative noise levels, etc.</b></font></p></td></tr>");	
display.document.write("<tr><td colspan='4'><p align='justify'><font face='Helvetica,Arial' color='#555555' size='2'><b>Or consult a USA Power & Light associate at <b>305.225.4475</b> or by E-mail at <a href='mailto:info@usa-power.com'>info@usa-power.com </a> for additional guidance in selecting a proper, well balanced Generator System</b></font></p></td></tr>");
display.document.write("<tr><td colspan='4'><p align='justify'><font face='Helvetica,Arial' color='red' size='2'><b>*Disclaimer: This wattage selection guide should be considered an estimating tool only. Check actual tools and appliances wattage for a more detailed estimate.</b></font></p></td></tr>");	



display.document.writeln("<tr><td colspan='2' align='center'><br><input type='button' name='close window' value='Close Window' onclick=window.close();></td><td colspan='2' align='center'><br><input type='button' name='print' value='Print' onclick=window.print();></td></tr>")
display.document.write(htmlfin);
display.document.close()
}



function item(name, running, starting, number) {
	this.name = name
	this.running = running
	this.starting = starting
}


var itemTotal=42;
var i=0;

var beginning=new String();
beginning="<html>";
beginning+="<body bgcolor=white>"
beginning+="<body>"
beginning+="<font face='Helvetica,Arial' size='4'><b>Wattage Calculator</b></font><br><br>";

var details=new String();

var htmlstop=new String();
htmlstop="</table></body></html>"

var itemList = new Array(78)
itemList[0] = new item("Freezer", 500, 1000)
itemList[1] = new item("Interior Lightning", 75, 75)
itemList[2] = new item("Overhang Spot Lights", 100, 100)
itemList[3] = new item("Refrigerator/Freezer", 800, 2400)
itemList[4] = new item("Television", 500, 500)
itemList[5] = new item("Outdoors/Patio Lights", 100, 100)
itemList[6] = new item("Cofee Maker", 1500, 1500)
itemList[7] = new item("Computer", 720, 720)
itemList[8] = new item("Dehumidifier", 650, 800)
itemList[9] = new item("Dish Washer", 700, 1400)
itemList[10] = new item("Electric Blanket", 400, 400)
itemList[11] = new item("Electric Fan", 800, 2000)
itemList[12] = new item("Electric Frying Pan", 1300, 1300)
itemList[13] = new item("Electric Range/Oven", 3410, 3410)
itemList[14] = new item("Electric Tools(Drill,Saw,Chain Saw)", 2200, 2750)
itemList[15] = new item("Garage Door Opener - 1/3 HP", 1650, 1650)
itemList[16] = new item("Garage Door Opener - 1/4 HP", 1000, 1000)
itemList[17] = new item("Gas Dryer", 1800, 1800)
itemList[18] = new item("Hair Dryer", 1200, 1200)
itemList[19] = new item("Iron", 1200, 1200)
itemList[20] = new item("Security Lighting", 1000, 1000)
itemList[21] = new item("Microwave", 800, 800)
itemList[22] = new item("Radio", 300, 300)
itemList[23] = new item("Space Heater", 1800, 1800)
itemList[24] = new item("Sump Pump - 1/2 HP", 1050, 2150)
itemList[25] = new item("Sump Pump - 1/3 HP", 800, 1300)
itemList[26] = new item("Toaster", 1650, 1650)
itemList[27] = new item("Vacuum", 1100, 1100)
itemList[28] = new item("Washing Machine", 1150, 2300)
itemList[29] = new item("Well Pump - 1/2 HP", 1050, 3000)
itemList[30] = new item("Pool Pump - 1 1/2 HP", 1600, 4000)
itemList[31] = new item("Window Air Conditioner", 1200, 2160)
itemList[32] = new item("Central Air Conditioner - 10,000 BTU", 1500, 2200)
itemList[33] = new item("Central Air Conditioner - 20,000 BTU", 2500, 3300)
itemList[34] = new item("Central Air Conditioner - 24,000 BTU", 3800, 4950)
itemList[35] = new item("Central Air Conditioner - 32,000 BTU", 5000, 6500)
itemList[36] = new item("Central Air Conditioner - 40,000 BTU", 6000, 7800)
itemList[37] = new item("Central Air Conditioner - 48,000 BTU", 7000, 9000)
itemList[38] = new item("Central Air Conditioner - 60,000 BTU", 9000, 10500)
itemList[39] = new item("Electric Dryer", 5400, 6750)
itemList[40] = new item("Electric Water Heater", 5000, 5000)
itemList[41] = new item("Heat Pump", 4669, 11672)




function DisplayTable() {

<!-- Creat Table  -->
var details = "<table border=1 bordercolor='#000000' cellspacing='0' cellpadding='4' width='600'>"
var bColor = false;
var strbgColor = "";

details += "<tr bgcolor='#555555'>" 
	+ "<td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Quantity</b></font></td>"
	+ "<td align='left'><font face='Helvetica,Arial' color='white' size='2'><b>Appliances</b></font></td>"
	+ "<td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Rated (Running)<br>Wattage</b></font></td>"
	+ "<td align='center'><font face='Helvetica,Arial' color='white' size='2'><b>Surge (Starting) <br>Wattage</b></font></td>"
	+ "</tr>"

for(var i = 0 ; i < itemTotal; i++) {
  if (bColor) {
    strbgColor = "#FFCC99" ;
	bColor = false;
	}
	else {
	strbgColor = ""; 
	bColor = true;
	}
	
details += "<form><tr bgcolor="+ strbgColor +">"
	+ "<td align='center'><select name='number'>"
	+ "<option selected>0</option>"
	+ "<option>1</option>"
	+ "<option>2</option>"
	+ "<option>3</option>"
	+ "<option>4</option>"
	+ "<option>5</option>"
	+ "<option>6</option>"
	+ "<option>7</option>"
	+ "<option>8</option>"
	+ "<option>9</option>"
	+ "</select></td>"
	+ "<td align='left' valign='middle'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].name   + "</b></font></td>"
	+ "<td align='right'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].running  + "</b></font></td>"
	+ "<td align='right'><font face='Helvetica,Arial' color='#555555' size='2'><b>" + itemList[i].starting   + "</b></font></td>"
	+ "</form></tr><tr>"
}

details += "</tr></table>"
document.write(details)

for(i=0;i<(document.forms.length);i++) {
	document.forms[i].running.value = itemList[i].running
	document.forms[i].starting.value = itemList[i].starting
	}
}

function exit_Window() {
	window.close();
}
function clearCalculator() {
   for(var i = 0; i<(document.forms.length - 2); i++) {
            document.forms[i].number.value=0
	}
}
