var chosenTab = 1;
  
  function ControlTabs(Val)
    {
	chosenTab=Val;
	
        for (x=1; x<8; x++) {
			if (x!=chosenTab){
				document.images['StartTab' + x].src='images/buttons/black.gif';
				document.images['FinishTab' + x].src='images/buttons/black.gif';
				if (document.all)
		 			document.all['TabLayer' + x].style.backgroundImage='url(images/buttons/black.gif)';
				else
		 			document.getElementById('TabLayer' + x).style.backgroundImage='url(images/buttons/black.gif)';
        	}
		}
       	document.images['StartTab' + chosenTab].src='images/buttons/left.gif';
		document.images['FinishTab' + chosenTab].src='images/buttons/right.gif';
		if (document.all)
		 document.all['TabLayer' + chosenTab].style.backgroundImage='url(images/buttons/center.gif)';
		else
		 document.getElementById('TabLayer' + chosenTab).style.backgroundImage='url(images/buttons/center.gif)';
	}
	
   function ChangeTabsOn(Val)
    {
        for (x=1; x<8; x++) {
			if (x!=chosenTab){
				document.images['StartTab' + x].src='images/buttons/black.gif';
				document.images['FinishTab' + x].src='images/buttons/black.gif';
				if (document.all)
			 		document.all['TabLayer' + x].style.backgroundImage='url(images/buttons/black.gif)';
				else
			 		document.getElementById('TabLayer' + x).style.backgroundImage='url(images/buttons/black.gif)';
        	}
		}
		
       	document.images['StartTab' + Val].src='images/buttons/left.gif';
		document.images['FinishTab' + Val].src='images/buttons/right.gif';
		if (document.all)
		 document.all['TabLayer' + Val].style.backgroundImage='url(images/buttons/center.gif)';
		else
		 document.getElementById('TabLayer' + Val).style.backgroundImage='url(images/buttons/center.gif)';
	}
	
	function ChangeTabsOff(Val)
    {
        for (x=1; x<8; x++) {
			if (x!=chosenTab){
				document.images['StartTab' + x].src='images/buttons/black.gif';
				document.images['FinishTab' + x].src='images/buttons/black.gif';
				if (document.all)
		 			document.all['TabLayer' + x].style.backgroundImage='url(images/buttons/black.gif)';
				else
		 			document.getElementById('TabLayer' + x).style.backgroundImage='url(images/buttons/black.gif)';
        	}
        }
	}