//
//
//
var xmlFile="partlists/products.xml";
var xmlXFile="partlists/exploded.xml";
var xmlProduct="POWERSTATION";


function select_powerstation()
{
   var x;

   loadXMLDoc( xmlFile );
   document.write( "<table class='ptable2' align='center' width='95%' border='2'>" );
   document.write( "<thead>" );
   document.write( "<tr>" );
   document.write( "<th align='center'>Model Number</th>" );
   document.write( "<th align='center'>Volts</th>" );
   document.write( "<th align='center'>Amps</th>" );
   document.write( "<th align='center'>Heater (kW)</th>" );
   document.write( "<th align='center'>G.F.C.I. 220V</th>" );
//   document.write( "<th align='center'>Timer 24Hr.</th>" );
   document.write( "<th align='center'># Pumps</th>" );
   document.write( "<th align='center'>Pumps (HP)</th>" );
//   document.write( "<th align='center'>Blower (HP)</th>" );
   document.write( "<th align='center'>Plumb Right</th>" );
   document.write( "<th align='center'>Spa Side Ready</th>" );
   document.write( "<th align='center'>T.D.I. Spa Side Digital</th>" );
//   document.write( "<th align='center'>12V Light</th>" );
//   document.write( "<th align='center'>Ozone Ready</th>" );
   document.write( "<th align='center'>No Blower</th>" );
   document.write( "<th align='center'>4 Func</th>" );
   document.write( "<th align='center'>Warm Air</th>" );
//   document.write( "<th align='center'>Aux Plugs</th>" );
//   document.write( "<th align='center'>Thermostat</th>" );
   document.write( "<th align='center'>110V Switch</th>" );
   document.write( "<th align='center'>110V Switch</th>" );
   document.write( "<th align='center'>2&quot; Plumb</th>" );
   document.write( "<th align='center'>7-Day Timer</th>" );
   document.write( "<th align='center'>List Price:</th>" );
   document.write( "</tr>" );
   document.write( "</thead>");
   document.write( "<tbody>" );
   x = xmlhttp.responseXML.documentElement.getElementsByTagName( xmlProduct );

   for (i = 0; i < x.length; i++)
   {
      document.write( "<tr>" );
      document.write( "<td width='6%'>" );
      document.write( x[i].getElementsByTagName( "MODEL" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "VOLTS" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "AMPS" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "HEATER" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "G_GFI" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "TIMER" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "NUM_PUMPS" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "PUMP" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "BLOWER" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "R_PLUMB" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "A_TOPSIDE" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "AT_TOPSIDE" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "L_LIGHT" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "OZONE" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "II_BLOWER" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "FUNCTION_4" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "MH_AIR" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "AUXPLUGS" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
//      document.write( "<td width='2%' align='center'>" );
//      document.write( x[i].getElementsByTagName( "TH_THERMOSTAT" ) [0].childNodes[0].nodeValue );
//      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "F_110SWITCH" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "S_110SWITCH" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "AP_PLUMB" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='2%' align='center'>" );
      document.write( x[i].getElementsByTagName( "TIMER_17" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td align='center'>" );
      document.write( x[i].getElementsByTagName( "PRICE" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "</tr>" );
   }
   document.write( "</tbody>" );
   document.write( "</table>" );
}


function select_powerstation_exploded()
{
   var x;

   loadXMLDoc( xmlXFile );
   document.write( "<table class='ptable' align='center' width='60%' border='2'>" );
   document.write( "<thead>" );
   document.write( "<tr>" );
   document.write( "<th align='center'>Index Number:</th>" );
   document.write( "<th align='center'>Part Number:</th>" );
   document.write( "<th align='center'>Description:</th>" );
   document.write( "<th align='center'>List Price:</th>" );
   document.write( "</tr>" );
   document.write( "</thead>");
   document.write( "<tbody>" );
   x = xmlhttp.responseXML.documentElement.getElementsByTagName( xmlProduct );

   for (i = 0; i < x.length; i++)
   {
      document.write( "<tr>" );
      document.write( "<td width='10%'>" );
      document.write( x[i].getElementsByTagName( "INDEX" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='15%'>" );
      document.write( x[i].getElementsByTagName( "PART_NUM" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='55%'>" );
      document.write( x[i].getElementsByTagName( "DESCRIPTION" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "<td width='20%' align='center'>" );
      document.write( x[i].getElementsByTagName( "PRICE" ) [0].childNodes[0].nodeValue );
      document.write( "</td>" );
      document.write( "</tr>" );
   }
   document.write( "</tbody>" );
   document.write( "</table>" );
}

