function expand(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuHover";
  d.className = "menuHover";
}

function collapse(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuNormal";
  d.className = "menuNormal";
}


function DisplayAddItemsForm(NumItems)
         {
          document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
          document.writeln('<html>');
          document.writeln('<head>');
          document.writeln('<title>Amazon Management </title>');
          document.writeln('<LINK REL="StyleSheet" HREF="menu.css">');
          document.writeln('  <script language="javascript" src="menu.js"></script>');
          document.writeln('  <style type="text/css">');
          document.writeln('<!--');
          document.writeln('.style1 {');
          document.writeln('background-color:lightgray;');
          document.writeln('height:30px;');
          document.writeln('width:198px;');
          document.writeln('	font-size: 10pt;');
          document.writeln('	font-weight: bold;');
          document.writeln('	color: #330099; }');
          document.writeln('.style3 {font-size: 18pt; font-weight: bold; }');
		  
          document.writeln('-->');
          document.writeln('  </style>');
          document.writeln('</head>');

          document.writeln('<body>');
          document.writeln('<p>&nbsp;</p>');
          document.writeln('<p>&nbsp;</p>');
document.writeln('&nbsp;<div id="MainMenu" class="MainDisplay" > <!-- class="MenuBar" -->');
document.writeln('    <table width="90%" height="35" align="center" bgcolor="#cccccc" class="navbar">');
document.writeln('    <tr bgcolor="#cccccc" >');
document.writeln('      <td width="160" height="30" bgcolor="#cccccc" class="menuNormal" onmouseover="expand(this);" onmouseout="collapse(this);">');
document.writeln('        <p class="style1">Inventory Summary</p>');
document.writeln('        <div class="menuNormal" width="155">');
document.writeln('          <table class="menu" width="155">');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="InventorySummery.php" class="menuitem">Get Summery</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="SummeryOptions.htm" class="menuitem">Set Options</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 3</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 4</a>');
document.writeln('            </td></tr>');
document.writeln('          </table>');
document.writeln('      </div>      </td>');

document.writeln('      <td width="160" class="menuNormal" onmouseover="expand(this);" onmouseout="collapse(this);">');
document.writeln('        <p class="style1">Add An Item</p>');
document.writeln('        <div class="menuNormal" width="155">');
document.writeln('          <table class="menu" width="155">');
document.writeln('            <tr><td class="menuNormal" onClick="DisplayAddItemsForm(5);">');
document.writeln('              <a href="page.htm" class="menuitem">5 items</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal" onClick="DisplayAddItemsForm(10);">');
document.writeln('              <a href="page.htm" class="menuitem">10 items</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal" onClick="DisplayAddItemsForm(15);">');
document.writeln('              <a href="page.htm" class="menuitem">15 items</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal" onClick="DisplayAddItemsForm(20);">');
document.writeln('              <a href="page.htm" class="menuitem">20 items</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal" onClick="DisplayAddItemsForm(25);">');
document.writeln('              <a href="page.htm" class="menuitem">25 items</a>');
document.writeln('            </td></tr>');          
document.writeln('			<tr><td class="menuNormal" onClick="DisplayAddItemsForm(30);">');
document.writeln('              <a href="page.htm" class="menuitem">30 items</a>');
document.writeln('            </td></tr>');
document.writeln('			<tr><td class="menuNormal" onClick="DisplayAddItemsForm(50);">');
document.writeln('              <a href="page.htm" class="menuitem">50 items</a>');
document.writeln('            </td></tr>');
document.writeln('		  </table>');
document.writeln('      </div>      </td>');

document.writeln('      <td width="160" class="menuNormal" onmouseover="expand(this);" onmouseout="collapse(this);">');
document.writeln('        <p class="style1">Get Product Data</p>');
document.writeln('        <div class="menuNormal" width="155">');
document.writeln('          <table class="menu" width="155">');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="GetSProductData.htm" class="menuitem">Single Product</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="GetMProductData.htm" class="menuitem">Multiple Products</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 3</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 4</a>');
document.writeln('            </td></tr>');
document.writeln('          </table>');
document.writeln('      </div>      </td>');

document.writeln('      <td width="160" class="menuNormal" onmouseover="expand(this);" onmouseout="collapse(this);">');
document.writeln('        <p class="style1">Edit Settings</p>');
document.writeln('        <div class="menuNormal" width="155">');
document.writeln('          <table class="menu" width="155">');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 1</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 2</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 3</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 4</a>');
document.writeln('            </td></tr>');
document.writeln('          </table>');
document.writeln('      </div>      </td>');

document.writeln('      <td width="160" bgcolor="#cccccc" class="menuNormal" onmouseover="expand(this);" onmouseout="collapse(this);">');
document.writeln('        <p class="style1"><a href="logout.htm">Log Out </a></p>');
document.writeln('      <!--    <div class="menuNormal" width="155">');
document.writeln('       <table class="menu" width="155">');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 1</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 2</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 3</a>');
document.writeln('            </td></tr>');
document.writeln('            <tr><td class="menuNormal">');
document.writeln('              <a href="page.htm" class="menuitem">Item 4</a>');
document.writeln('            </td></tr>');
document.writeln('          </table> ');
 document.writeln('        </div>-->      </td>');
document.writeln('    </tr>');
document.writeln('  </table> </div>	');		 
			 
          document.writeln('<p class="style3">&nbsp;&nbsp; Add Items</p>'); 
          document.writeln('<form  method="post" name="AddItemForm" id="AddItemForm" action="AddItems.php">');
          document.writeln('  <table width="85%"  border="1" align="right">');
          document.writeln('    <tr>');
          document.writeln('      <td width="15%">Product Source </td>');
          document.writeln('      <td width="73%">Keyord Title </td>');
          document.writeln('      <td width="12%">Product ID </td>');
		  document.writeln('      <input type="hidden" name="NumRecord" value="' + NumItems + '" />');
          document.writeln('    </tr>');
          
		  for(var n = 0, C = 0; n < NumItems; n++, C++) 
             { 
			 if(C < 10)
			   Str = '0' + C
			 else
			   Str = C
             document.writeln('    <tr>');
             document.writeln('      <td><select name="PrdSource' + Str +'" id="PrdSource' + Str +'">');
             document.writeln('	          <option value=""></option>');
             document.writeln('           <option value="Amazon">Amazon</option>');
             document.writeln('           <option value="Overstock">Overstock</option>');
             document.writeln('         </select></td>');
             document.writeln('      <td><input name="KeywordTitle' + Str + '" type="text" id="KeywordTitle' + Str +'" size="108" maxlength="132"></td>');
             document.writeln('      <td><input name="ProductID' + Str + '" type="text" id="ProductID' + Str + '" size="16" maxlength="24"></td>');
             document.writeln('    </tr>');
			 }
         document.writeln('    <tr>');
         document.writeln('      <td>&nbsp;</td>');
         document.writeln('      <td>&nbsp;</td>');
         document.writeln('      <td>&nbsp;</td>');
         document.writeln('    </tr>');
         document.writeln('    <tr>');
         document.writeln('      <td>&nbsp;</td>');
         document.writeln('      <td><input type="submit" name="Submit" value="Add Items"></td>');
         document.writeln('      <td><div align="center"><input name="Reset" type="reset" id="Reset" value="Clear Entries"> </div></td>');
         document.writeln('    </tr>');
         document.writeln('  </table>');
         document.writeln('  <p>&nbsp;</p>');
         document.writeln('  <p>&nbsp;</p>');   
         document.writeln('</form>');
         document.writeln('<p>&nbsp;</p>');
         document.writeln('<p>&nbsp;</p>');
         document.writeln('<p>&nbsp;</p>');
         document.writeln('</body>');
         document.writeln('</html>');	 
          }

