<table width="800" border="0" cellpadding="0" cellspacing="0" class="tpBg">
          <tr>
            <td width="223" height="2" rowspan="2" align="right" valign="bottom">			  </td>
            <td width="577" height="104" valign="bottom" align="left"><table height="20" border="0" cellpadding="0" cellspacing="0" class="mnu">
              <tr>
                <td width="10" align="center" valign="middle" class="sep"></td>
				
				<?php
			  $parent_tabsql="select * from cmspages where `type`='tabs' and parent_id=0";
			  $parent_result=mysql_query($parent_tabsql);
			  $td=0;
			  $colsp=0;
			  $parent_tab_count=mysql_num_rows($parent_result);
			   while($parent_tab_row=mysql_fetch_array($parent_result)){
			   $td++;
			   $colsp=$colsp+2;
			   
			   ?>                
                <td width="0" height="5" align="center" valign="bottom"  class="sep"><div id="menuh-container">
                    <div id="menuh">
                      <ul style="width:auto;" >
                        <li style="width:auto;" ><a href="<?php echo $parent_tab_row['page_name'];?>.html" class="top_parent"><?php echo $parent_tab_row['page_name'];?></a>
						
						
						
						 
						
						<?php 
						 $tabsql="select * from cmspages where `type`='tabs' and parent_id=".$parent_tab_row['page_id']."";
			  $results=mysql_query($tabsql);
			  $numtab=mysql_num_rows($results);
			  if($numtab>0)
			  {?>
			  <ul><?php }
			   while($child_tab_row=mysql_fetch_array($results)){
			   
			   
			   $sqlcount_child="select * from cmspages where `type`='tabs' and parent_id=".$child_tab_row['page_id']."";
			   $count_result=mysql_query($sqlcount_child);
			   $count_chil=mysql_num_rows($count_result);
			   if($count_chil>0){$arrow_class='parent';}
			   
			 
			   
			   
			   
			   ?>
			 <li><a href="<?php echo $child_tab_row['page_name'];?>.html" style="width:147px;text-align:left;" class="<?php echo $arrow_class; ?>"><?php echo $child_tab_row['page_name'];?></a>
			 
			 
			     <ul>
				 
				 <?php
				 
				   $sql_subchild="select * from cmspages where `type`='tabs' and parent_id=".$child_tab_row['page_id']."";
			   $subchild_result=mysql_query($sqlcount_child);
				  while($sub_child_tab_row=mysql_fetch_array($subchild_result))
						{
				 
				 ?>
				<li><a href="<?php echo $sub_child_tab_row['page_name'];?>.html" style="width:167px;text-align:left;"><?php echo $sub_child_tab_row['page_name'];?></a></li>
				
				<?php }?>
				</ul>
			 
			 </li>
			 
						 
							<?php }
							if($numtab>0)
			  { ?>
						  </ul><?php }?>
                        </li>
                      </ul>
                    </div>
                  <!-- end the menuh-container div -->
                  </div>
                <!-- end the menuh div -->                </td>
                <td width="2" height="5" align="center" valign="middle"  class="sep"><?php if($parent_tab_count!=$td){?>|<?php }else {?><?php }?></td>
                <?php }
				
				
				?>
                <!--  <td align="center" valign="middle"><a href="#" class="mnu">HOME</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">ABOUT</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">GALLERY</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">LOCATION</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">DESCRIPTION</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">TRANSPORT</a></td>
                <td width="10" align="center" valign="middle" class="sep">|</td>
                <td align="center" valign="middle"><a href="#" class="mnu">ENQUIRE</a></td>-->
                <td width="20" align="center"></td>
              </tr>
			   
		    </table></td>
          </tr>
          <tr>
            <td align="right" valign="bottom" height="24"></td>
          </tr>
        </table>