// JavaScript Document



	function switcher(id){
        openText(id);
	}
    
    function openText(id){
		var tabNumber = id.substring(3);
        var textId = 'hidden_content'+tabNumber;
        var textBox = document.getElementById(textId);
		var tab = document.getElementById(id);
		var arrow = 'arrow'+tabNumber;
		
		if(textBox.style.display != 'block'){
			textBox.style.display = 'block';
			tab.onmouseout = function(){tab.style.backgroundColor = colorArray[tabNumber-1];};
			document.getElementById(arrow).style.backgroundImage = 'url(../images/arrow_down.gif)';
		}else{
			textBox.style.display = 'none';
			tab.onmouseout = function(){this.style.backgroundColor = '#aaa';};
			document.getElementById(arrow).style.backgroundImage = 'url(../images/arrow.gif)';
		}
        
    
    }
	
	function changeBackground(id, newColor){
		var tab = document.getElementById(id);
		tab.onmouseout = function(){tab.style.backgroundColor = none;};
	}  
	
	
	function greyAll(){
		for(i=1;i!=numberOfTabs;i++){
				tabbie = 'tab'+i;
				arrow = 'arrow'+i;
				
				document.getElementById(tabbie).style.backgroundColor = '#aaa';
				document.getElementById(tabbie).onmouseout = function(){this.style.backgroundColor = '#aaa';};
				document.getElementById(arrow).style.backgroundImage = 'url(../images/arrow.gif)';
				document.getElementById(arrow).style.backgroundRepeat='no-repeat';

			}
	}
		
function initAll(){

		var tab = document.getElementById('tab1');
		var arrow = document.getElementById('arrow1');
		
		/*
		for(i=1;i<numberOfTabs;i++){
			var textBox = document.getElementById('hidden_content'+i);
			textBox.style.display = 'none';
		}
		*/
		
		/* init first tab */
		greyAll();
		openText('tab1');
		
		tab.style.backgroundColor =colorArray[0] ;
		tab.onmouseout = function(){tab.style.backgroundColor = colorArray[0];};
		tab.style.backgroundColor = colorArray[0];
		
}