<script>
function submitform(start,limit)
{
	document.searchfrm.act.value=document.location.href;
	document.getElementById("start").value=start;
	document.getElementById("limit").value=limit;
		
	//document.searchfrm.action = u;
	
	document.searchfrm.submit();
}
function gotolink(u,sec_id,subsec_id,page_id)
{
	document.getElementById("subsecid").value=subsec_id;
	document.getElementById("pageid").value=page_id;
	document.search_frm.action = u;
	document.search_frm.secid.value = sec_id;
	document.search_frm.submit();
}
</script>
<form action="" method="post" name="search_frm" id="search_frm">
<input type="hidden" name="start_client" value="" />
<input type="hidden" name="keyword" value="<?php echo $keyword;?>" />
<input type="hidden" name="start_No" value="<?php echo $start_No;?>" />
<input type="hidden" name="startNo" value="<?php echo $startNo;?>" />
<input type="hidden" name="secid" id="secid" value="" />
<input type="hidden" name="subsecid" id="subsecid" value="" />
<input type="hidden" name="pageid" id="pageid" value="" />
 <div style="padding-top:100px;">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td colspan="2" align="left" class="breadcrumb"><a href="index.php" class="bnav">Home</a> &raquo; Search Result</td>
                </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
                </tr>
              <tr>
                <td width="76%"><h3>Search Result</h3></td>
                <td width="24%" align="right"><table width="100%" border="0" cellspacing="3" cellpadding="0">
                  <tr>
                    <td width="45%" align="center">&nbsp;</td>
                    <td width="55%" align="center">&nbsp;</td>
                  </tr>
                </table></td>
                </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
                </tr>
              <tr>
                <td colspan="2">
					<tr>
	                        <td align="center" valign="top" class="msg"><b>Total <?php echo $nume?> result(s) found for</b> <b><i>&quot;<?php echo $keyword?>&quot;</i></b></td>
	                        </tr>
	                      <?php
							
							
							$k=0;
							for($i=$start_client;$i<$RecLimit;$i++){
								
								
										?>
								  <tr>
									<td valign="top" class="td"><table align="center" border="0" width="100%" class="table table-bordered table-striped">
									  <tr>	                           
										<td width="100%" valign="top"><table align="center" border="0" width="100%">
										  <tr>
											<td align="left"><a <?php echo $SearchLinks[$i]?> class="other" style="padding-left:0px;">
											  <?php  echo $SearchTitles[$i]; ?>
											  </a></td>
											</tr>
										  <tr>
											<td align="left" class="text"><?php echo $SearchText[$i];?></td>
											</tr>
										  </table></td>
										</tr>
									  </table></td>
									</tr>
								  <?php
														   
							}
							
							?>
	                      <tr>
	                        <td>
							
							<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
                                                  <tr class="light-blue">
                                                    <td width="15%" height="30" align="left" class="text"  >
													
										<?php
											if(isset($_REQUEST['startNo']) && $_REQUEST['startNo'] != ""){
												$start_No =$_REQUEST['startNo'];
											}else{
												if(isset($_REQUEST['start_No']) && $_REQUEST['start_No'] != ""){
													$start_No =$_REQUEST['start_No'];
												}else{
													$start_No =1;
												}
											}
										?>
										
											<?php //echo $th;//echo $back;//echo var_dump($nume);die; $back 
											
											//echo $nume;
											if($back >=0 ) 
											{ 
													$l=1;
													  for($i=0;$i < $nume; $i=$i+$limit){		
														
															if($i == $eu){
																
																if($l%10 == 1)	{
																	$startNo = ceil($l/10) - 1;
																	if($startNo <= 0){
																		$startNo=1;
																	}
																	//$startNoQuery_1 ="&startNo=$startNo";
																	$startNoQuery_1 ="$startNo";
																}else{
																	$startNoQuery_1 = "";
																}
																
																/*if($l%10 == 0)	{
																	$startNo = ceil($l/10) + 1;
																	if($startNo <= 0){
																		$startNo=1;
																	}
																	$startNoQuery ="&startNo=$startNo";
																}else{
																	$startNoQuery = "";
																}	*/
																
															}													
														$l=$l+1;
													  }
												
												//echo " <a href='$page_name?start_client=$back&fname=$fname&lname=$lname&blood_group=$blood_group&company=$company&industry_type=$industry_type&sub_industry_type=$sub_industry_type&member_type=$member_type$startNoQuery$startNoQuery_1&start_No=$start_No'><font face='Verdana' size='2'>Previous</font></a> ";
												?>
												  &nbsp;<a class="nav" href="javascript:doPaging('<?php echo $back?>','<?php echo $start_No?>','<?php echo $startNoQuery.$startNoQuery_1?>')">Previous</a>
												<?php
												}
	
											?>
                                                      &nbsp; </td>
                                                    <td width="72%" align="center" class="text" style="text-align:center"  >
													
													<?php
														$num_limit=10;
														
														$l=1;
														
														$totalPages = $nume/$limit ;
														$totalSlots = ceil($totalPages/$num_limit);
														//echo $start_client+$limit;
														for($i=0;$i < $nume; $i=$i+$limit){																
															
															if($l%10 == 1)	{
																$startNo = ceil($l/10) - 1;
																if($startNo <= 0){
																	$startNo=1;
																}
																//$startNoQuery_1 ="&startNo=$startNo";
																$startNoQuery_1 ="$startNo";
															}else{
																$startNoQuery_1 = "";
															}
															
															if($l%10 == 0)	{
																$startNo = ceil($l/10) + 1;
																if($startNo <= 0){
																	$startNo=1;
																}
																//$startNoQuery ="&startNo=$startNo";
																$startNoQuery ="$startNo";
															}else{
																$startNoQuery = "";
															}	
																
																if(ceil($l/10) == $start_No){				
																								
																if($i <> $eu){
																
																	if($l%10 == 1 && $start_No != 1)	{		
																																	
																		//echo " <a href='$page_name?start_client=$i&fname=$fname&lname=$lname&blood_group=$blood_group&company=$company&industry_type=$industry_type&sub_industry_type=$sub_industry_type&member_type=$member_type$startNoQuery$startNoQuery_1&start_No=$start_No'><font face='Verdana' size='2'> << </font></a> &nbsp;&nbsp;";
																	?>
																	  &nbsp;<a class="nav" href="javascript:doPaging('<?php echo $i?>','<?php echo $start_No?>','<?php echo $startNoQuery.$startNoQuery_1?>')"><font face='Verdana' size='2'> &laquo; </font></a>
																	<?php	
																		
																	}
																
																//echo " <a href='$page_name?start_client=$i&fname=$fname&lname=$lname&blood_group=$blood_group&company=$company&industry_type=$industry_type&sub_industry_type=$sub_industry_type&member_type=$member_type$startNoQuery$startNoQuery_1&start_No=$start_No'><font face='Verdana' size='2'>$l</font></a> ";
																?>
																	 &nbsp;<a class="nav" href="javascript:doPaging('<?php echo $i?>','<?php echo $start_No?>','<?php echo $startNoQuery.$startNoQuery_1?>')"><?php echo $l; ?></a>
																	<?php	
																	if($l%10 == 0 && $start_No < $totalSlots)	{
																		
																		//echo "&nbsp;&nbsp; <a href='$page_name?start_client=$i&fname=$fname&lname=$lname&blood_group=$blood_group&company=$company&industry_type=$industry_type&sub_industry_type=$sub_industry_type&member_type=$member_type$startNoQuery$startNoQuery_1&start_No=$start_No'><font face='Verdana' size='2'> >> </font></a> ";
																		?>
																	  &nbsp;<a class="nav" href="javascript:doPaging('<?php echo $i?>','<?php echo $start_No?>','<?php echo $startNoQuery.$startNoQuery_1?>')"> <font face='Verdana' size='2'> &raquo; </font></a>
																	<?php
																	}
																
																}
																else { echo " &nbsp;<font face='Verdana' size='2' color=red>$l</font>";}       
																
															 }																	
																$l=$l+1;
														} 
														?>													
													</td>
                                                    <td width="13%" align="right" ><?php
												  if($th < $nume) { 
												  
												  $l=1;
												  for($i=0;$i < $nume; $i=$i+$limit){		
												  	
														if($i == $eu){																														
															
															if($l%10 == 0)	{
																$startNo = ceil($l/10) + 1;
																if($startNo <= 0){
																	$startNo=1;
																}
																//$startNoQuery ="&startNo=$startNo";
																$startNoQuery ="$startNo";
															}else{
																$startNoQuery = "";
															}	
															
														}													
													$l=$l+1;
												  }
														
												//echo " <a href='$page_name?start_client=$next&fname=$fname&lname=$lname&blood_group=$blood_group&company=$company&industry_type=$industry_type&sub_industry_type=$sub_industry_type&member_type=$member_type$startNoQuery$startNoQuery_1&start_No=$start_No'><font face='Verdana' size='2'>Next</font></a> ";	
												?>
												 &nbsp;<a class="nav" href="javascript:doPaging('<?php echo $next?>','<?php echo $start_No?>','<?php echo $startNoQuery.$startNoQuery_1?>')">Next</a>
												<?php															
																}
												  ?></td>
                                                    </tr>
                                                  <tr>
                                                    <td height="30" colspan="3" class="td" style="text-align:center"  >
															<?php
																$totalrow=ceil($nume/$limit);
																
																$l=1;
																for($i=0;$i < $nume;$i=$i+$limit){
																if($i <> $eu){
																
																}
																else { $currpage=$l;}       
																$l=$l+1;
																} 
																if($totalrow != 0)
																{
																echo "<b> &nbsp;&nbsp;&nbsp;&nbsp;Page ".$currpage." of ".$totalrow."</b>";
																}
															?>	
                                                      </td>
                                                    </tr>
                                                  </table>
							
							</td>
	                        </tr>
				</td>
              </tr>
			  <tr><td colspan="5">
	  
			 </td></tr>
              </table>
             </div>
</form>
<script language="javascript">
 function doPaging(StartClient,Start_No,StartNo){
 var frm = document.search_frm;
 
 frm.start_client.value = StartClient;
 frm.start_No.value = Start_No;
 frm.startNo.value = StartNo;
 frm.submit();
 }
</script>