<? if($_GET['filedtype']==1) {?>
<script>
function validate()
{
var d=document.form;

result=0; // variable to hold number of ticked boxes, start with zero
start=0; // variable to hold position in form of first checkbox in group
end=20; // variable to hold position in form of last checkbox in group

for(i=start;i<end;i++)
{
// find if each box is checked, if it is add one to the result variable, else add zero
// if this is the only form then you can reference it as forms[0]
result += document.forms['myform'].elements[i].checked ? 1:0;
}
if(result==0)
        {
			
			alert("Please select at Least one Option");
			return false;
		}
		
		else
		{
			var data=confirm("Are You sure U want to Continue");
  if(data)
  {
     return true;
  }
  else
  {
     return false;
  }
		}
}
</script>
<form  name="myform" method="post" action="addproduct.php" enctype="multipart/form-data" target="_parent">
<table width="85%" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr>
    <td width="4%" align="center"><input type="checkbox" name="check_list[]" value="Certificate" /></td>
    <td width="48%" align="left"><strong>Certificate</strong></td>
    <td width="6%" align="center"><input type="checkbox" name="check_list[]" value="Table Percentage" /></td>
    <td width="42%" align="left"><strong>Table Percentage</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Shape" /></td>
    <td align="left"><strong>Shape</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Girdle" /></td>
    <td align="left"><strong>Girdle</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Cut" /></td>
    <td align="left"><strong>Cut</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Culet" /></td>
    <td align="left"><strong>Culet</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Carat" /></td>
    <td align="left"><strong>Carat</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Polish" /></td>
    <td align="left"><strong>Polish</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Color" /></td>
    <td align="left"><strong>Color</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Pavilion" /></td>
    <td align="left"><strong>Pavilion</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Clarity" /></td>
    <td align="left"><strong>Clarity</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Symmetry" /></td>
    <td align="left"><strong>Symmetry</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Pavilion Angle" /></td>
    <td align="left"><strong>Pavilion Angle</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Fluorescence" /></td>
    <td align="left"><strong>Fluorescence</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Wire Transfer Price" /></td>
    <td align="left"><strong>Wire Transfer Price</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Special Notes" /></td>
    <td align="left"><strong>Special Notes</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Measurements" /></td>
    <td align="left"><strong>Measurements</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Crown Angle" /></td>
    <td align="left"><strong>Crown Angle</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Depth Percentage" /></td>
    <td align="left"><strong>Depth Percentage</strong></td>
    <td align="center"><input type="checkbox" name="check_list[]" value="Crown" /></td>
    <td align="left"><strong>Crown</strong></td>
  </tr>
 
  <tr>
    <td colspan="4" align="center">&nbsp; </td>
  </tr>
 
  <tr>
    <td colspan="4" align="center">
	
	<input type="hidden" name="maincatid" value="<?=$_GET['maincatid']?>">
	<input type="hidden" name="catid" value="<?=$_GET['catid'] ?>">
	<input type="hidden" name="subcat" value="<?=$_GET['subcat']?>">
	<input type="hidden" name="filedtype" value="<?=$_GET['filedtype']?>">
	 <a href="addsubcategory.php?maincatid=<?=$_GET['maincatid']?>&catid=<?=$_GET['catid'] ?>" target="_blank"><img src="images/button_back.gif" border="o"/></a>
		 &nbsp;&nbsp;
		<input type="image" src="images/button_insert.gif" name="inserpr" onclick="return validate();" />
        &nbsp;&nbsp;</td>
  </tr>
</table>
</form>


 <? }else if($_GET['filedtype']==2){?> 
 <script>
function validate()
{
var d=document.form;

result=0; // variable to hold number of ticked boxes, start with zero
start=0; // variable to hold position in form of first checkbox in group
end=9; // variable to hold position in form of last checkbox in group

for(i=start;i<end;i++)
{
// find if each box is checked, if it is add one to the result variable, else add zero
// if this is the only form then you can reference it as forms[0]
result += document.forms['myform'].elements[i].checked ? 1:0;
}
if(result==0)
        {
			
			alert("Please select at Least one Option");
			return false;
		}
		
		else
		{
			var data=confirm("Are You sure U want to Continue");
  if(data)
  {
     return true;
  }
  else
  {
     return false;
  }
		}
}
</script>
<form  name="myform" method="post" action="addproduct.php" enctype="multipart/form-data" target="_parent">
<table width="85%" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr>
    <td colspan="2" align="left"><strong>Setting Information:</strong></td>
    
   
    <td align="left" colspan="2"><strong>Can be set with/Center Stones Information</strong></td>
  </tr>
  <tr>
    <td width="5%" align="center"><input type="checkbox" name="check_list[]" value="Metal" /></td>
    <td width="38%" align="left"><strong>Metal</strong></td>
    <td width="6%" align="center"><input type="checkbox" name="check_list[]" value="Pear" /></td>
    <td width="51%" align="left"><strong>Pear</strong></td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Width" /></td>
    <td align="left"><strong>Width</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Length" /></td>
    <td align="left"><strong>Length</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" colspan="2"><strong>Diamond Information</strong></td>
    
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="# of Round Sapphires" /></td>
    <td align="left"><strong># of Round Sapphires</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Minimum carat total weight" /></td>
    <td align="left"><strong>Minimum carat total weight</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Average color" /></td>
    <td align="left"><strong>Average color</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="Average clarity" /></td>
    <td align="left"><strong>Average clarity</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="checkbox" name="check_list[]" value="# of Round Diamonds" /></td>
    <td align="left"><strong># of Round Diamonds</strong></td>
    <td align="center">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
 
  <tr>
    <td colspan="4" align="center">&nbsp; </td>
  </tr>
 
  <tr>
    <td colspan="4" align="center">
	
	<input type="hidden" name="maincatid" value="<?=$_GET['maincatid']?>">
	<input type="hidden" name="catid" value="<?=$_GET['catid'] ?>">
	<input type="hidden" name="subcat" value="<?=$_GET['subcat']?>">
	<input type="hidden" name="filedtype" value="<?=$_GET['filedtype']?>">
	 <a href="addsubcategory.php?maincatid=<?=$_GET['maincatid']?>&catid=<?=$_GET['catid'] ?>" target="_blank"><img src="images/button_back.gif" border="o"/></a>
		 &nbsp;&nbsp;
		<input type="image" src="images/button_insert.gif" name="inserpr" onclick="return validate();" />
        &nbsp;&nbsp;</td>
  </tr>
</table>
</form>
 
 
 
  <? } ?>