<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="JavaScript" src="gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<?php

include('../include/db.php');
include('../include/session.php');	
include('../include/formValidations.php');


$cat = mysql_real_escape_string($_GET['cat']);
$product = mysql_real_escape_string($_GET['productSelect']);
$productTitle = mysql_real_escape_string($_GET['productTitle']);
$color = mysql_real_escape_string($_GET['colorSelect']);
$colorTitle = mysql_real_escape_string($_GET['colorTitle']);

?>
<script type="text/javascript">
function stopRKey(evt) {
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
</script> 

<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

 
</head>

<form action="showAllProducts.php" method="get" name="form1" target="_top" id="form1">
<body onload="document.getElementById(;MM_callJS('document.getElementById(\'quantityText\').focus();')"editText").focus();">
<table width="290" border="0" align="center" cellpadding="0" cellspacing="0" class="list2">
  <tr>
    <td width="290" align="center"><p>
      <label class="std">Change list to:</label>
      <br />
      <span class="main">
        <select name="productSelect" id="productSelect">
          <option value="<?php echo $product?>" selected="selected">
            <?php echo $productTitle?>
          </option>
          <option value="double">Double Roman</option>
          <option value="DR">Double Roman Antique</option>
          <option value="mono">Mono Ridge</option>
          <option value="rake">Rake Verge</option>
          <option value="slate">Slate</option>
          <option value="tapered hip">Tapered Hip Starter</option>
          <option value="tapered ridge">Tapered Ridge</option>
          <option value="v hip">V Hip Starter</option>
          <option value="v ridge">V Ridge</option>
          <option value="All" >All</option>
        </select>
      </span></p>
      <p><span class="main">
        <select name="colorSelect">
          <option value="<?php echo $color?>" selected="selected">
            <?php echo $colorTitle?>
          </option>
          <option value="All" >All</option>
          <option value="Black">Black</option>
          <option value="Brown">Brown</option>
          <option value="deep">Deep black</option>
          <option value="Grey">Grey</option>
          <option value="Kalahari">Kalahari</option>
          <option value=" Red">Red</option>
          <option value="terra">Terra cotta </option>
        </select>
      </span><span class="main">
      <input name="cat" type="hidden" value="Tiles and Accessories" />
      </span></p>
      </td>
  </tr>
  <tr>
    <td align="center"><br />
      <input name="input" type="submit" value="OK" class="imagebutton"  />
      <input name="button" type="button" id="button" class="imagebutton" onclick="MM_goToURL('parent','showAllProducts.php?productSelect=<?php echo $product ?>&edit=0&cat=<?php echo $cat ?>&colorSelect=<?php echo $color ?>');return document.MM_returnValue" value="Cancel" />      </form>
    </td>
  </tr>
</table>

<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("ProductSelect","req","Please select a product.");
  frmvalidator.addValidation("QuantityText","req","Please enter the quantity.");
    
    
    
   


  
</script>
</body>
</html>