  	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr class="row1">
  	    <td class="tabledata1" align="left">Client Name<font color="#FF0000">*</font></td>
  	    <td><select style="width:180px;"  name="client" id="client"  onchange="ShowDiv(this.value,'hid-newclient','CRM_leadclient.php')" >
		<option value="0">---</option>
		<option value="new" <?php echo  $_SESSION['crm_company_name']=='new' ?'selected':''?>>--New Client--</option>
		<?php
		  $ClientSQL="Select * from clientmaster where CompanyId='".$_SESSION['ACGCompanyId']."' and  Site='".$_SESSION['AssignedBranch']."' 
		and Zone in(".$_SESSION['AssignedSites'].")";
		$ClientRes=DB_query($ClientSQL,$db);
		while($ClientRow=DB_fetch_array($ClientRes))
		{
 		?>
		<option value="<?php echo $ClientRow['id']?>" <?php echo ($client_id==$ClientRow['id']?'selected':'');?>><?php echo $ClientRow['c_name']?></option>
		<?php  } ?>
 	</select>
	<div id='hid-newclient'><input style="width:180px;" name="crm_newclient" type="text" value="<?php  echo $_SESSION['crm_newclient']?>"/> </div></td>
	<td class="tabledata1">Document Date<font color="#FF0000">*</font></td>
  	    <td><input type="text" name="document_date" id="document_date" value="<? if($_REQUEST['action']=='Edit'){ echo ConvertSQLDate($document_date);}else{echo date('d/m/Y');}?>" class="datepicker" style="width:180px;" /></td>
		</tr>
  	  <tr class="row1">
	  <td class="tabledata1">Shade Name<font color="#FF0000">*</font></td>
  	    <td><select name="shade_name" id="shade_name" style="width:180px;" onChange="getitemcode(this.value)">
  	      		<option value="0">Select</option>
  	      		<option value="new" <?php echo  $_SESSION['crm_company_name']=='new' ?'selected':''?>>--New Shade--</option>
  	      					<?php $itemname=DB_query("Select id,StockID,item_name from item_master ",$db); 
					  while($itemnameRow=DB_fetch_array($itemname)){
					  $selc='';
					  if($shade_name==$itemnameRow['id'])
					  $selc='selected';
					  ?>
				<option value="<? echo $itemnameRow['id']; ?>"<?php echo $selc; ?>><? echo $itemnameRow['item_name']; ?></option>
				<?php } ?>
	      </select>
	      <div id='hid-newclient1' style="display: none;"   ><input style="width:180px;" name="crm_newshade" type="text" value="<?php  echo $_SESSION['crm_newclient']?>"/> </div>
	      </td>
  	    <td class="tabledata1" align="left">Item Code<font color="#FF0000">*</font></td>
  	    <td id="ITEMCODE"><select name="item_code" id="item_code" style="width:180px;">
  	      		<option value="0">Select</option>
				<?php $itemcode=DB_query("Select id,StockID,item_name from item_master ",$db); 
					  while($itemcodeRow=DB_fetch_array($itemcode)){
					  $sel='';
					  if($item_code==$itemcodeRow['id'])
					  $sel='selected';
					  ?>
				<option value="<? echo $itemcodeRow['id']; ?>"<?php echo $sel; ?>><? echo $itemcodeRow['StockID']; ?></option>
				<?php } ?>
	      </select></td>
		</tr>

  	  <tr class="row1">
  	    <td class="tabledata1" align="left">Panel<font color="#FF0000">*</font></td>
	    <td><input type="checkbox" name="panel" id="panel" value="panel" <?php echo($panel=='panel'?'checked':''); ?>></td>
  	    <td class="tabledata1">Approval Dot<font color="#FF0000">*</font></td>
	    <td><input type="checkbox" name="approval_dot" id="approval_dot" value="approvalDot"<?php echo($approval_dot=='approvalDot'?'checked':''); ?>></td>
		</tr>

	 <tr class="row1">
	 <td colspan="4">
  	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr class="row1">
			<td class="tabledata1" colspan="4"><strong>Panel In Details</strong></td>
			</tr>
			<tr class="row1">
			<td class="tabledata1" width="19%">Panel In Date</td>
			<td  width="31%"><input type="text" name="panel_in_date" class="datepicker" value="<?php if($_REQUEST['action']=='Edit'){echo ConvertSQLDate($panel_in_date);} ?>" style="width:180px;"></td>
			<td class="tabledata1" width="17%">Panel Out Date</td>
			<td width="33%"><input type="text" name="panel_out_date" class="datepicker" value="<?php if($_REQUEST['action']=='Edit'){echo ConvertSQLDate($panel_out_date);} ?>" style="width:180px;"></td>
			</tr>
			<tr class="row1">
			<td class="tabledata1">Panel Image</td>
			<td><input type="file" name="panel_img" style="width:180px;"  value="<?php echo $panel_image; ?>">
			<input type="hidden" name="panel_img1" value="<?php echo $panel_image; ?>">
			</td>
			</tr>
			 <tr class="row1">
  	    <td class="tabledata1">Remark</td>
  	    <td colspan="3">
			<textarea name="reamark" style="width:83%"><? echo $reamark; ?></textarea>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		
		
		
		
		 <tr class="row1">
	 <td colspan="4">
  	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr class="row1">
			<td class="tabledata1" colspan="4"><strong>Approval Dot Details</strong></td>
			</tr>
			<tr class="row1">
			<td class="tabledata1" width="19%">Request Date</td>
			<td  width="31%"><input type="text" name="request_date" class="datepicker" value="<?php if($_REQUEST['action']=='Edit'){echo ConvertSQLDate($request_date);} ?>" style="width:180px;"></td>
			<td class="tabledata1" width="17%">In Date</td>
			<td width="33%"><input type="text" name="in_date" class="datepicker" value="<?php if($_REQUEST['action']=='Edit'){echo ConvertSQLDate($in_date);} ?>" style="width:180px;"></td>
			</tr>
			<tr class="row1">
			<td class="tabledata1">Out Date</td>
			<td><input type="text" name="out_date" class="datepicker" value="<?php if($_REQUEST['action']=='Edit'){echo ConvertSQLDate($out_date);} ?>" style="width:180px;"></td>
			<td class="tabledata1">Status</td>
			<td><select name="status" id="status" style="width:180px;">
					<option value="0">Select Staus</option>
					<option value="approved"<?php echo($status=='approved'?'selected':''); ?>>approved</option>
					<option value="unapproved"<?php echo($status=='unapproved'?'selected':''); ?>>Unapproved</option>
					<option value="underdevelopment"<?php echo($status=='underdevelopment'?'selected':''); ?>>Under Development</option>
					<option value="sentforapproval"<?php echo($status=='sentforapproval'?'selected':''); ?>>Sent For Approval</option>
					<option value="2ndtimerequest"<?php echo($status=='2ndtimerequest'?'selected':''); ?>>2nd Time Request</option>
					<option value="resend"<?php echo($status=='resend'?'selected':''); ?>>Resend</option>
				</select>
			</td>
			</tr>
			 <tr class="row1">
  	    <td class="tabledata1">Remark by Executive</td>
  	    <td colspan="3">
			<textarea name="reamrk_by_executive" style="width:83%"><? echo $reamrk_by_executive; ?></textarea>
		</td>
		</tr>
		<tr class="row1">
  	    <td class="tabledata1" align="left">Remark By Commercial </td>
  	    <td colspan="3">
			<textarea name="reamark_by_cmmercial" style="width:83%"><? echo $reamark_by_cmmercial; ?></textarea>
		</td>
		</tr>
		</table>
		</td>
		</tr>	
    </table>