<!--
	Application	:	SmartHR
	Version		:	3
	File name	:	tab.php
	Purpose		:	To apply tabs in forms
	How to Use	:	1.	Include this file in the required file
					2.	$tab_quantity=2;//How many tabs
						$tab_name=array("Company Profile","Company Bank");//The names of the tabs (in array)
						require_once('../tab.php');//Embed the tab.php file
						set your table 99% like this:
						<table width="99%" border="0" cellspacing="0" cellpadding="0">
						<tr>
						<td>your content</td>
						</tr>
						</table>
	
	Created by	:	Mohd Izwan Ismail			(22-03-2006)
	Amendment by:	1.	Mardiana Ahmad			(26-06-2006)
					2.	Ghijkl					(01-03-2006)
					3.	Mnopqr					(01-03-2006)

-->
<? 


$tab_name0=$tab_name['0'];
$tab_name1=$tab_name['1'];
$tab_name2=$tab_name['2'];
$tab_name3=$tab_name['3'];
$tab_name4=$tab_name['4'];
$tab_name5=$tab_name['5'];
$tab_name6=$tab_name['6'];
$tab_name7=$tab_name['7'];
$tab_name8=$tab_name['8'];
$tab_name9=$tab_name['9'];

?>

<style>
	div.tab-body {
		font-family: verdana, arial;
		font-size: 11px;
		background: white; 
		border: 1px solid #999999; 
		padding: 0px; 

	}
</style>


<?
// firus 3/12/2009
$tabstate=array();
for ($tabi=0;$tabi<10;$tabi++) {
  $tabstate[$tabi]="inactive";
}
if ((!isset($_SESSION['Xactivetab']))||($_SESSION['Xactivetab']=="")) {
  $_SESSION['Xactivetab']=0;
}
$tabstate[$_SESSION['Xactivetab']]="active";

?>


<? 
if ($tab_style==2){
  if ($tab_quantity==1){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>";
  } elseif ($tab_quantity==2){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	";
  } elseif ($tab_quantity==3){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>
	";
  }elseif ($tab_quantity==4){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>
	";
  }elseif ($tab_quantity==5){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>
	";
  }elseif ($tab_quantity==6){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:5'></td>

	</tr><tr>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:4'></td>
	";
  }elseif ($tab_quantity==7){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:6'></td>

	</tr><tr>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:4'></td>
	";	
  }elseif ($tab_quantity==8){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:7'></td>

	</tr><tr>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:4'></td>
	";	
  }elseif ($tab_quantity==9){

	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:7'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:8'></td>
	<td align='center' id='tab-bg:8' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(8)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name8</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:8'></td>

        </tr><tr>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[8].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[8].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[8].".gif' border='0' id='tab-right:4'></td>
	";	
  }elseif ($tab_quantity==10){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:7'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:8'></td>
	<td align='center' id='tab-bg:8' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(8)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name8</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:8'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:9'></td>
	<td align='center' id='tab-bg:9' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(9)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name9</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:9'></td>

	</tr><tr>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[8].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[8].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[8].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[9].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[9].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[9].".gif' border='0' id='tab-right:4'></td>
	";	
  }
} else if ($tab_style==1) {
  if ($tab_quantity==1){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>";
  } elseif ($tab_quantity==2){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	";
  } elseif ($tab_quantity==3){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>
	";
  }elseif ($tab_quantity==4){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>
	";
  }elseif ($tab_quantity==5){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>
	";
  }elseif ($tab_quantity==6){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:5'></td>
	";
  }elseif ($tab_quantity==7){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:6'></td>
	";	
  }elseif ($tab_quantity==8){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:7'></td>
	";	
  }elseif ($tab_quantity==9){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:7'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[8].".gif' border='0' id='tab-left:8'></td>
	<td align='center' id='tab-bg:8' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[8].".gif)' onClick='changeActiveTab(8)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name8</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[8].".gif' border='0' id='tab-right:8'></td>
	";	
  }elseif ($tab_quantity==10){
	$content="<td width='6'><img src='images/tab/tab-left_".$tabstate[0].".gif' border='0' id='tab-left:0'></td>
	<td align='center' id='tab-bg:0' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[0].".gif)' onClick='changeActiveTab(0)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name0</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[0].".gif' border='0' id='tab-right:0'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[1].".gif' border='0' id='tab-left:1'></td>
	<td align='center' id='tab-bg:1' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[1].".gif)' onClick='changeActiveTab(1)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name1</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[1].".gif' border='0' id='tab-right:1'></td>
	
	<td width='6'><img src='images/tab/tab-left_".$tabstate[2].".gif' border='0' id='tab-left:2'></td>
	<td align='center' id='tab-bg:2' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[2].".gif)' onClick='changeActiveTab(2)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name2</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[2].".gif' border='0' id='tab-right:2'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[3].".gif' border='0' id='tab-left:3'></td>
	<td align='center' id='tab-bg:3' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[3].".gif)' onClick='changeActiveTab(3)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name3</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[3].".gif' border='0' id='tab-right:3'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[4].".gif' border='0' id='tab-left:4'></td>
	<td align='center' id='tab-bg:4' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[4].".gif)' onClick='changeActiveTab(4)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name4</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[4].".gif' border='0' id='tab-right:4'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[5].".gif' border='0' id='tab-left:5'></td>
	<td align='center' id='tab-bg:5' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[5].".gif)' onClick='changeActiveTab(5)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name5</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[5].".gif' border='0' id='tab-right:5'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[6].".gif' border='0' id='tab-left:6'></td>
	<td align='center' id='tab-bg:6' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[6].".gif)' onClick='changeActiveTab(6)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name6</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[6].".gif' border='0' id='tab-right:6'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[7].".gif' border='0' id='tab-left:7'></td>
	<td align='center' id='tab-bg:7' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[7].".gif)' onClick='changeActiveTab(7)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name7</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[7].".gif' border='0' id='tab-right:7'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[8].".gif' border='0' id='tab-left:8'></td>
	<td align='center' id='tab-bg:8' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[8].".gif)' onClick='changeActiveTab(8)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name8</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[8].".gif' border='0' id='tab-right:8'></td>

	<td width='6'><img src='images/tab/tab-left_".$tabstate[9].".gif' border='0' id='tab-left:9'></td>
	<td align='center' id='tab-bg:9' style='cursor: pointer; background: url(images/tab/tab-bg_".$tabstate[9].".gif)' onClick='changeActiveTab(9)'><span style='font-family: verdana, arial; font-size: 12px; font-weight: bold;'>$tab_name9</span></td>
	<td width='6'><img src='images/tab/tab-right_".$tabstate[9].".gif' border='0' id='tab-right:9'></td>
	";	
  }
}
		
		$tab_js="<script>
	
		tabCount = $tab_quantity;
		
		function activateTab(i) {
			document.getElementById( 'tab-left:'+i ).src='images/tab/tab-left_active.gif';
			document.getElementById( 'tab-bg:'+i ).style.background='url(images/tab/tab-bg_active.gif)';
			document.getElementById( 'tab-right:'+i ).src='images/tab/tab-right_active.gif';
			document.getElementById( 'tab-body:'+i ).style.display='block';
		}
		
		function deactivateTab(i) {
			document.getElementById( 'tab-left:'+i ).src='images/tab/tab-left_inactive.gif';
			document.getElementById( 'tab-bg:'+i ).style.background='url(images/tab/tab-bg_inactive.gif)';
			document.getElementById( 'tab-right:'+i ).src='images/tab/tab-right_inactive.gif';
			document.getElementById( 'tab-body:'+i ).style.display='none';
		}
		
		function changeActiveTab(i) {
			for( j=0; j < tabCount; ++j ) {
				if( j==i ) {
					activateTab(j);
				} else {
					deactivateTab(j);
				}
			}
		}
		

		
		
</script>";
echo $tab_js;

?>

<div align='left'><table border='0' cellspacing='0' cellpadding='0'><tr>
<?=$content;?>
</tr></table></div>


<div align='left'>
<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>
<td height='8'><img src='images/tab/tab-hr_left.gif' height='8'></td>
<td height='8' width='100%'><img src='images/tab/tab-hr_center.gif' height='8' width='100%'></td>
<td height='8'><img src='images/tab/tab-hr_right.gif' height='8'></td>
</tr></table>
</div>
<?
// <div id='tab-body:0' class='tab-body' style='display: block;'>Content Tab One</div>
// <div id='tab-body:1' class='tab-body' style='display: none;'>Content Tab Two</div>
// <div id='tab-body:2' class='tab-body' style='display: none;'>Content Tab Three</div>
?>
