<?
include("../include/config.php");
require_once "../include/Database_functions.php";
$container_drp_val='';
$sqlObj=new sqlclass();

if(isset($_REQUEST['div'])){
$div=$_GET['div'];
$div1=$div;
$div=$div+1;
if(isset($_REQUEST['container_drp_val'])){
$container_drp_val=$_REQUEST['container_drp_val'];
$container_drp_val=stripslashes($container_drp_val);
}
?>
<link rel="stylesheet" type="text/css" href="http://localhost/CandF/js/jquery.autocomplete.css" />
<div id="hidediv<?php echo $div1; ?>">
<?php 
	
?>

<style>
.lableentrytext{
font-size: 12px;
color: #505050;
clear: both;
margin-bottom: 5px;
text-transform: capitalize;
}

body {
	padding:0px;
	margin:0px;
	font-family:Arial, Helvetica, sans-serif;
	color:#000000;
}
.div01 {
	width:80%;
	margin:0 70px;
	padding-bottom:15px;
}
.ptForm {
	/*border:1px solid #000000;*/
	width:100%;
	margin:0 auto;
	padding:4px;
}
.ptText01 {
	font-size:20px;
	font-weight:bold;
}
.ptText02 {
	font-size:12px;
}
.ptText03 {
	font-size:16px;
	font-weight:bold;
}
.ptText04 {
	font-size:16px;
	font-weight:bold;
	border-left:solid 1px #000000;
	border-right:solid 1px #000000;
	border-top:solid 1px #000000;
}
.ptText05 {
	font-size:14px;
	font-weight:bold;
}
.field01 {
	border-bottom:#333333 dotted 1px;
	border-left:none;
	border-top:none;
	border-right:none;
	color:#000000;
	font-size:12px;
	font-weight:bold;
	background-color:#f1f1f1;
}
.field02 {
	border:none;
	color:#000000;
	font-size:12px;
	font-weight:bold;
	background-color:#f1f1f1;
}
.ptText06 {
	font-size:12px;
	font-weight:bold;
}
.rightTd {
	border-bottom:solid 1px #000000;
}
.leftTd {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	padding:4px;
}
.leftTd1 {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	border-left:solid 1px #000000;
	padding:4px;
}
.tdItem {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	padding:4px;
}
.rightTd {
	border-bottom:solid 1px #000000;
	padding:4px;
}
.rightTd1 {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	padding:4px;
}
/*.rightTdBtm {
	border:none;
	padding:4px;
}
.leftTdBtm {
	border-right:solid 1px #000000;
	padding:4px;
}*/
.tdItemBtm {
	
	padding:4px;
}

</style>

<table width="100%" border="0" cellspacing="0" cellpadding="0"   class="List" align="center" >
  <tr>
  	<td class="leftTd1" style="width:5%; "><?=$div1?>    </td>
     
              <td class="tdItem" style="width:20%">
              	<input type="text" name="dealername<?=$div1?>" id="dealername<?=$div1?>" class="input1" onClick="nwtest(this.value);getlocation(this.value,'<?=$div1?>')"  size="50"/>
     		  </td>
              
              <td class="tdItem" style="width:10%">
              	<div id="txtLocation<?=$div1?>">
              		<input type="text" name="location<?=$div1?>" id="location<?=$div1?>" class="input1" size="10"/>
                </div>              
    		  </td>
              
      <td class="tdItem" style="width:15%"><input type="text" name="invoicedate<?=$div1?>" id="invoicedate<?=$div1?>"  maxlength="100" class="input1" style="max-width:120px;" value="" onClick="nwdate()"  /></td>
      <td class="tdItem" style="width:6%"><input type="text" name="invoiceno<?=$div1?>" id="invoiceno<?=$div1?>" class="input9"  value="" size="10"></td>
              <td class="tdItem" style="width:5%"><input type="text" name="drum<?=$div1?>" id="drum<?=$div1?>" class="input9"  value="" onkeyup="sum('<?=$div1?>');" size="2" ></td>
              <td class="tdItem" style="width:5%"><input type="text" name="cases<?=$div1?>" id="cases<?=$div1?>"  class="input9"  value="" onkeyup="sum('<?=$div1?>');" size="2"></td>
              <td class="tdItem" style="width:5%"><input type="text" name="bags<?=$div1?>" id="bags<?=$div1?>" class="input9"  value=""  onkeyup="sum('<?=$div1?>');" size="2"></td>
              <td class="tdItem" style="width:5%"><input type="text" name="others<?=$div1?>" id="others<?=$div1?>"  class="input9"  value=""  onkeyup="sum('<?=$div1?>');" size="2"></td>
              <td class="tdItem" style="width:5%"><input type="text" name="t<?=$div1?>" id="t<?=$div1?>"  class="input9"  value="" size="2" ></td>
              <td class="tdItem" style="width:7%"><input type="text" name="grossweight<?=$div1?>" id="grossweight<?=$div1?>"  class="input9"  value=""  onkeyup="grsum('<?=$div1?>');" size="2"></td>
              <td class="tdItem" style="width:7%"><input type="text" name="netweight<?=$div1?>" id="netweight<?=$div1?>"  class="input9"  value=""  onkeyup="netsum('<?=$div1?>');" size="2"></td>
  
	<td width="5%" align="center" class="tr_td tr_td_r  rightTd1">
	<a style="cursor:pointer;" onclick="addmore('<?=$div?>')">
	<span id="min<?=$div1?>"><img src="images/addmore.jpg" /></span>
	 
	  </a>
	  
	   <span id="max<?=$div1?>" style="display:none;" onclick="minmore('<?=$div?>');"><img src="images/minus.jpg" /></span>
	<!--<a style="cursor:pointer;" onclick="addmore('<?//=$div?>')"><img src="images/addmore.jpg" /></a> --></td>
  </tr>
</table>
</div>
<div id="div<?=$div?>">
</div>
<? }?>
<script type="text/javascript" >
/*function showDealer1(str)
{


var xmlhttp;    
if (str=="")
  {
  document.getElementById("txtDealer1").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	   document.getElementById("txtDealer1").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","testdealer.php?str="+str,true);
xmlhttp.send();
}
*/
</script>


