<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<?php
$tab = 1;
if (isset($_GET['tab']))
   {
    if ($_GET['tab']==1) $tab=1;
    if ($_GET['tab']==2) $tab=2;
    if ($_GET['tab']==3) $tab=3;
   }
   
function highlightTab($tabNo)
{
 global $tab;
 if ($tabNo == $tab)
    echo ' class="selected"';
 else 
    echo ' class="unsel"';
}
function showOrHide($tabNo)
{
 global $tab;
 if ($tab==$tabNo)
    {
	 echo " show";
	}
 else
     echo " hide";
}
?>
<body>

<div class="tabs">
<a href="index.php?tab=1"<?php highlightTab(1);?>>[Tab 1]</a>
<a href="index.php?tab=2"<?php highlightTab(2);?>>[Tab 2]</a>
<a href="index.php?tab=3"<?php highlightTab(3);?>>[Tab 3]</a>
</div>
<div class="content <?php showOrHide(1); ?>"><h1>Tab 1 content</h1>Nothing to see here, move along.</div>
<div class="content <?php showOrHide(2); ?>"><h1>Tab 2 content</h1>This is some really silly content.</div>
<div class="content <?php showOrHide(3); ?>"><h1>Tab 3 content</h1><?php for($i=0; $i<20; $i++) { ?>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. <?php } ?></div>
</body>
</html>
