//
//
//
var xmlFile="partlists/products.xml";
var xmlProduct="TURBOAIR";

function select_turboair()
{
    var x;
    var y = null;
    var z = null;

       loadXMLDoc(xmlFile);
       document.write( "<table class='ptable' align='center' width='80%' border='2'>" );
       document.write( "<thead>" );
       document.write( "<tr>" );
       document.write( "<th align='center'><input type='button' value='Copy' class='btn-sml' onClick='Copy2Clipboard(false)' ></th>" );
       document.write( "<th align='center'>Model Number</th>" );
       document.write( "<th align='center'>Voltage</st>" );
       document.write( "<th align='center'>Silent</th>" );
       document.write( "<th align='center'>Warm Air</th>" );
       document.write( "<th align='center'>List Price</th>" );
       document.write( "<th align='center'>Quantity:</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( "<form name='product" + i + "'>" );
          document.write( "<td width='5%' align='center'><input type='checkbox' name='clipcopy'></td>" );
          document.write( "<td width='25%'>" );
          y = x[i].getElementsByTagName( "NUMBER" ) [0].childNodes[0].nodeValue;
          document.write( y );
          document.write( "<input type='hidden' name='ID_NUM' value='" + y + "' />");
          document.write( "</td>" );
          document.write( "<td width='15%' align='center'>" );
          z = x[i].getElementsByTagName( "VOLTAGE" ) [0].childNodes[0].nodeValue
          document.write( y );
          document.forms[i].ID_NUM.value.search( "10-" ) > 0 ? z = ", 1.0hp" : z = ", 1.5hp";
          z = y + ", " + z + "V, ";
          document.write( "</td>" );
          document.write( "<td width='15%' align='center'>" );
          document.write( x[i].getElementsByTagName( "SILENT" ) [0].childNodes[0].nodeValue );
          document.write( "</td>" );
          document.write( "<td width='15%' align='center'>" );
          z = x[i].getElementsByTagName( "WARM_AIR" ) [0].childNodes[0].nodeValue;
          document.write( z );
          z.match( /\+/ ) ? y += " + Warm Air." : ".";
          document.write( "</td>" );
          document.write( "<input type='hidden' name='NAME' value='" + y + "' />");
          document.write( "<td align='center'>" );
          y = x[i].getElementsByTagName( "PRICE" ) [0].childNodes[0].nodeValue;
          document.write( y );
          y.length == 1 ? y = 0 : y = y.slice( 1, y.length );
          document.write( "<input type='hidden' name='PRICE' value='" + y + "' />");
          document.write( "</span></td>" );
          document.write( "<td width='10%' align='center'>" );
          if ( y == 0 )
          {
              document.write( "&nbsp;" );
          } else {
              document.write( "<input type='text' size=6 maxlength=4 name='QUANTITY' onchange='this.value=CKquantity(this.value)' value='1' /><br />" );
              document.write( "<input type='button' value='Add to Order' class='btn-sml' onClick='AddToCart(this.form)' /><br />" );
              document.write( "<input type='button' value='View Order' class='btn-sml' onclick='DisplayCartAsWindow()' />" );
          }
          document.write( "</td>" );
          document.write( "</form>" );
          document.write( "</tr>" );
       }
       document.write( "</tbody>" );
       document.write( "</table>" );
       document.write( "<form name='clip'><textarea name='clip_copy' style='display:none'></textarea></form>" );
}


