<!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" />

<?php

//include('../include/db.php');
include('../include/session.php');	
$supply_id = $_GET['supply_id'];

?>


<script>
function print_it()
{
//alert('print');	
  if(document.form1.print_choice[0].checked == true)
  {
   window.open('../store/customer_supplied_print_co.php?supply_id=<?php echo $supply_id?>','_newtab');
   parent.printChoice.hide();
  }
  else {
  		if(document.form1.print_choice[1].checked == true)
  			{
    		window.open('../store/customer_supplied_print_cod.php?supply_id=<?php echo $supply_id?>','_newtab');
			parent.printChoice.hide();
  			}
  		else {
				if(document.form1.print_choice[2].checked == true)
  				{
    			window.open('../store/customer_supplied_print_d.php?supply_id=<?php echo $supply_id?>','_newtab');
				parent.printChoice.hide();
  			}
  			else
  				{  
	  			alert('Please select what to print first.');
  				}
  }
  }

  return true;
}
</script>
  
<script language="JavaScript" src="../jscript/gen_validatorv4_2.js"  type="text/javascript" xml:space="preserve"></script>



<style>
select.store_item_select {
width:230px;
}
select.store_item_select option {
width:220px;
}

label.label_std{
	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#000;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}

label.label_red{
	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#F00;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}

input.imagebutton{
	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
	
}
</style>

<style >
input.imagebutton{
	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
	
}

input.imagebutton:hover{
	background-color:#E4E4E4;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:2px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:5px 5px 5px #666;
	-webkit-box-shadow:5px 5px 5px #666;
	box-shadow:5px 5px 5px #666;
	
}

input.imagebutton1 {	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
}
input.imagebutton1 {	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
}
</style>

</head>
<body>
      
<form method="get" name="form1"  id="form1" onsubmit="print_it()">
    <table width="356" border="0" align="left" cellpadding="0" cellspacing="0" class="list2" id="select_table">
    <tr>
      <td height="31" colspan="2" align="center"><span class="wizard_frame">
        <label class="label_std"><?php echo $_SESSION['print_option'];?>Select what to print and click print.</label>
        <br />
       
      </span></td>
    </tr>
    <tr>
      <td width="79" height="111" align="center"><p><br />
      </p></td>
      <td width="371" align="left"><label class="label_std" <?php if (($_SESSION['print_option']==1) OR ($_SESSION['print_option']==2)){?>style="color:#CCC;"<?php } ?>>
        <input type="radio" name="print_choice" value="1" id="print_choice_0" <?php if (($_SESSION['print_option']==1) OR ($_SESSION['print_option']==2)){?> disabled="disabled" <?php } ?>/>
        Customer and Merchant copy</label>
        <br />
        <label class="label_std" <?php if (($_SESSION['print_option']==1) OR ($_SESSION['print_option']==2)){?>style="color:#CCC;"<?php } ?>>
          <input type="radio" name="print_choice" value="2" id="print_choice_1" <?php if (($_SESSION['print_option']==1) OR ($_SESSION['print_option']==2)){?> disabled="disabled" <?php } ?>/>
          Customer, Merchant and Drivers copy</label>
        <br />
        <label class="label_std" <?php if (($_SESSION['print_option']==0) OR ($_SESSION['print_option']==2)){?>style="color:#CCC;"<?php } ?>> 
          <input type="radio" name="print_choice" value="3" id="print_choice_2" <?php if (($_SESSION['print_option']==0) OR ($_SESSION['print_option']==2)){?> disabled="disabled" <?php } ?>/>Drivers copy only</label>
        <input type="hidden" name="supply_id" id="supply_id" value="<?php echo $supply_id?>" />
        <br />
        <?php if ($_SESSION['print_option']==2) { ?><label class="label_red">All prints are done. You can make a copy print in the delivery reports.</label> <?php } ?>
        </td>
      </tr>
    <tr>
      <td colspan="2" align="center"><input name="Submit" type="submit" class="imagebutton" id="button"  value="Print" />        <input name="button2" type="button" class="imagebutton1" id="button2" value="Cancel" onClick="parent.printChoice.hide()"/>      <br /></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><br /></td>
    </tr>
    </table>
</form>

</body>
</html>