<?include("header.php")?>
         
                
                <tr> 
                  <td background="images/stripbg.jpg" colspan="2"><img src="images/stripbg.jpg" width="4" height="11"></td>
                </tr>
                <tr> 
                  <td colspan="2" background="images/pagebg.jpg" class="text" style="background-repeat:no-repeat; padding:10px"><p align="justify">
				  <font class=toptext><strong><? echo $rscategory["category_name"]?> </strong></font> <br>
					 <? echo str_replace(chr(13),"<br>",$rscategory["category_description"]);?> </p></td>
                </tr>
				<?if ($rscategory["category_sub_yes_no"]==1) {
					if ($rscategory["category_id"]==5)
						$xy=3;
					else
						$xy=2;
					?>
				<tr> 
                  <td colspan="2" background="images/pagebg.jpg" class="text" style="background-repeat:no-repeat; padding:10px"><p align="justify">
				  <strong>Collections: </strong><table width="100%">
					<?while ($rscategorysub = mysql_fetch_array($cmdsub)) { 
						$rscategorysub_category_id=$rscategorysub["category_id"];
						if ($rscategorysub["category_id"]==18)
							$rscategorysub_category_id=16;
						?>
					  <?if($counter++%$xy==0)
							echo "<tr>";
						echo "<td align=center width='33%'><a href='category.php?category=".$rscategorysub_category_id."' class=toplinks><strong>".$rscategorysub["category_name"]."</strong></a>";
						if ($rscategorysub["category_image"]!='') {
							echo "<br><a href='category.php?category=".$rscategorysub_category_id."' class=toplinks><img src='".$rscategorysub["category_image"]."' border=0></a>";
						}
						echo "</td>";
					}
					  ?>
					  </table></td>
                </tr>
				<?}?>
				<?if ($_GET["category"]==1 || $_GET["category"]==2 || $_GET["category"]==3 || $_GET["category"]==4 || $_GET["category"]==13 || $_GET["category"]==15) {?>
                <tr> 
                  <td  background="images/topsellingprod.jpg" height="24" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="71%" class="heading" style="padding-left:10px"><strong><font color="#FFFFFF">PRODUCTS</font></strong></td>
                        <td width="29%" class="leftlinks"><a href="allproducts.php" class="leftlinks">ALL RING MODELS&gt;&gt;</a></td>
                      </tr>
                    </table></td>
                </tr>
				<?}?>
                <tr valign="top"> 
                  <td colspan="2"  style="background-repeat:no-repeat; PADDING:10px"><table width="76%" border="0" cellspacing="3" cellpadding="0">
					<?while ($rsproduct = mysql_fetch_array($cmdproduct)) {
						
						?>
                      <tr align="center" class="heading"> 
                        <td class="toplinks" align=left colspan=2><font  size=2><strong><?echo $rsproduct["product_name"];?></font></strong></td>
                      </tr>
					  <? if ($rsproduct["ring_count"]!=0) {?>
                      <tr> <?if ($rsproduct["product_image1"]!='') {?>
                        <td width="24%" background="product_images/<?echo $rsproduct["product_image1"];?>" style="background-repeat:no-repeat;background-position: center " align=center><a href="#" onClick="javascript:openWin('allimages.php?product=<?php echo($rsproduct["product_id"]); ?>&productname=<?php echo($rsproduct["product_name"]); ?>', 'width=420, height=210');" class=toplinks><img src="images/imgframe.gif" width="<?if ($_GET["category"]==15) echo "152"; else echo "137";?>" <?if ($_GET["category"]==15) echo "\"height=99\""; ?> border="0"></a></td>
						<?}?>

					 <td width="64%" class=text valign=top>
							<?echo $rsproduct["product_description"];?> <br>
							<!img src="images/addtocart.gif" border=0>&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="#" onClick="javascript:openWin('chooseoptions.php?product=<?php echo($rsproduct["product_id"]); ?>', 'width=580, height=810');"><img src="images/designring.gif" border=0></a>
					</td>
                        
                      </tr>
                      <tr align="center" class="toplinks" valign=top colspan=2> 
                        <td align=left class=text colspan=2><a href="#" onClick="javascript:openWin('allimages.php?product=<?php echo($rsproduct["product_id"]); ?>&productname=<?php echo($rsproduct["product_name"]); ?>', 'width=<?if ($rsproduct["ring_count"]>2) {echo "650";}else {echo "420";}?>, height=210');" class=toplinks>View all <?echo $rsproduct["product_name"];?> Rings (<?echo $rsproduct["ring_count"];?>)</a></td>
                        
                      </tr>
					  <? } else {?>
					   <tr> <?if ($rsproduct["product_image1"]!='') {?>
                        <td width="24%" background="product_images/<?echo $rsproduct["product_image1"];?>" style="background-repeat:no-repeat" align=left valign=top><img src="images/trans.gif" width="137"  border="0">
						<img src="images/addtocart.gif" border=0></td>
						<?}?>

					 <td width="64%" class=text valign=top>
							<?echo str_replace(chr(13),"<br>",$rsproduct["product_description"]);?> <br>
							&nbsp;&nbsp;&nbsp;&nbsp;
							
					</td>
                        
                      </tr>
                     
					  <?}?>
					  <tr>
						<td height="1" bgcolor="#BDDAFA" width="100%" colspan=2></td>
					  </tr>
					  <?}?>
					  <?if ($rsproduct["product_name"]!=''){?>
					  <tr class="text">
					   <td align="center" class="text" colspan=2>More Products :
							<?php $pg->showPaging("", "&ps=".$_GET["ps"]."&category=".$_GET["category"]."&sortorder=".$_GET["sortorder"]); ?>
					  </td>
					</tr> 
					<?}?>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
	<script  language="JavaScript">
function openimg(imgname)
{
	document.theform.imgname.value = imgname;
	var x = window.open("popup.php","virginia","fullscreen=0,scrollbars=no, status=no, toolbar=no, menubar=no, left=50, top=50, height=20, width= 20");
	x.focus();
}
function openWin(argURL, argSize) {
	window.open(argURL, "x_win" + (new Date()).getTime(), "resizable=yes,scrollbars=yes," + argSize);
}
</script>
<form name="theform">
		<input type="hidden" name="imgname">

</form>
  <?include("footer.php")?>
