	//generate array with id tags of content divs. One for each content tab
	/*var tabs = new Array();
		tabs[0] = "content1";
		tabs[1] = "content2";
	//alert("hallo");
	//set the current tab to the first tab.
	var currentTab = 0;

	var cookieval = readCookie('ctab');
	if(cookieval != "null")
	{
		//alert(cookieval + "; currentTab: " + currentTab);
		if(tabSet == false)
		{
			currentTab = cookieval;
			//alert("currentTab > 0");
		}
	}*/
	
	//alert(cookieval);
	//set color for tabs backgrounds
	var currentTabbg = "#A2B0D5";
	//var currentTabbg = "#FFFFFF";
	var otherTabsbg = "#7085BE";
	//var otherTabsbg = "#5F7EB7";
	if(!currentTab) currentTab = 0;

	//----------------------
	function tabSwitch(newTabID)
	{
		//takes the id of the new tab and makes it visible while making all other tabs invisible
		var newTab = $(newTabID);
		//alert(newTab.id);
		//sets the new tab to visible
		makeVisible(newTabID);
		//makes all other tabs hidden
		for(var i = 0; i < tabs.length ; i++)
		{
			//if iterated tab is not the new tab, hide it.
			if(tabs[i] != newTabID)
			{
				makeHidden(tabs[i]);
			}
			//if the iterated tab is the new tab, make it the current tab
			if(tabs[i] == newTabID)
			{
				currentTab = i;
				//set cookie that indicates current tab so page can be refreshed.
				createCookie("ctab",i,"");
			}
			
		}
		//call function that sets styles of tab buttons to indicate which one is visible
		makeCurrent();
	}
	//----------------------
	function makeHidden(objID)
	{	//hides a tab whose id value is objID	
		//alert('makeHidden: ' + objID);
		$(objID).setStyle({visibility: 'hidden'});
	}
	//------------------------
	function makeVisible(objID)
	{	//unhides an element whose id value is objID
		//alert('makeVisible: ' + objID);
		$(objID).setStyle({
			visibility: 'visible'
		});
	}
	//---------------------
	function makeCurrent()
	{
		//alert(currentTab);
		//sets styles of tab buttons to indicate which is visible
		//alert(tabs.length);
		
		for(var t = 0; t < tabs.length; t++)
		{
			
			var linkID = "link" + t;
			//alert(linkID);
			//alert("currentTab: " + currentTab + "; t: " + t);
			//alert(t + " current: " + currentTab + "; linkID: " + linkID);
			if(t == currentTab)
			{
				//set current tab color
				//alert("current tab: " + t);
				$(linkID).setStyle({backgroundColor: currentTabbg});
				$(linkID).addClassName('currentTab');
			}
			else
			{
				//set all other colors
				$(linkID).setStyle({backgroundColor: otherTabsbg});
				$(linkID).addClassName('tab');
			}
		}
	}
	//=====================
	function mouseOverTab(objID)
	{	//sets mouseover styles for tab buttons.
		$(objID).setStyle({
			backgroundColor: '#FFFFFF'
		});
	}
	//----------------------
	function mouseOutTab(objID)
	{
		var currentLink = "link" + currentTab;
		
		if(currentLink == objID)
		{
			//this is the current tab
			$(objID).setStyle({
				backgroundColor: currentTabbg
			});
		}
		else
		{
			$(objID).setStyle({
				backgroundColor: otherTabsbg
				
			});
		}
		//borderBottomColor: '#666666'
	}
	
	//-------------------
	
	function expandDrop(objID)
	{
		$(objID).setStyle({
			height: '12px'
		});
	}
	
	//------------------
	
	function loadTabs()
	{
		//alert("load Tabs");
		for(var inow = 0; inow < tabs.length; inow++)
		{
			//alert('inow: ' + inow + '; currentTab: ' + currentTab);
			if(inow == currentTab)
			{
				makeVisible(tabs[inow]);
				//alert(inow);
			}
			else
			{
				makeHidden(tabs[inow]);
				//alert("hidden: " + inow);
			}
		}
		document.getElementById("Home").focus();
		//highlight the current tab
		makeCurrent();
	}
	
	//------------------
	
	function createCookie(name,value,days) 
	{
		if (days) 
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}
	
	////-----------------------
	
	function readCookie(name) 
	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) 
		{
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	
	//----------------------
	
	function eraseCookie(name) 
	{
		createCookie(name,"",-1);
	}
