// JavaScript Document






var sLastSeleced = "tabOne";
function changeTab(myValue)
{
	
	$('tabOneContent').style.display = 'none';
	$('tabTwoContent').style.display = 'none';
	$('tabThreeContent').style.display = 'none';
	$('tabFourContent').style.display = 'none';

	$('tabOne').className = 'tabOneHead';
	$('tabTwo').className = 'tabTwoHead';
	$('tabThree').className = 'tabThreeHead';
	$('tabFour').className = 'tabFourHead';
	
	//alert(myValue);
	if (myValue == "TAB_ONE")
	{
		$('tabOneContent').style.display = 'block';
		$('tabOne').className = 'tabOneHeadSelected';
	}
	
	if (myValue == "TAB_TWO")
	{
		$('tabTwoContent').style.display = 'block';
		$('tabTwo').className = 'tabTwoHeadSelected';		
	}
	
	if (myValue == "TAB_THREE")
	{
		$('tabThreeContent').style.display = 'block';
		$('tabThree').className = 'tabThreeHeadSelected';		
	}
	
	if (myValue == "TAB_FOUR")
	{
		$('tabFourContent').style.display = 'block';
		$('tabFour').className = 'tabFourHeadSelected';		
	}
	
	
}

var sLastemployeeDesc = "-1";
function showDescription (myValue)
{
	//alert(myValue);
	if (sLastemployeeDesc != myValue)
	{
		//alert("Test");

		$(myValue).style.display = 'block';
		//var myInnerDiv = $(myValue).getElement('div');
		
		//var myNewString = myValue.replace('employeeDesc', 'employeeDescInner');
		//alert(myNewString);

		//alert($(myNewString));
		//var size = myInnerDiv.getScrollSize();
		//alert("The element is "+size.x+" pixels wide and "+size.y+"pixels high.");

		
		//alert($(myNewString).style.height + 'px');
		//$(myValue).style.height = '170px';	
		//$(myValue).style.top = '0px';	
		//$(myValue).style.verticalAlign = 'bottom';		
		//$(myValue).style.display = 'table-cell';	
		//$(myValue).style.position = 'relative';	
		
		
		//display: table-cell; vertical-align:bottom;
		
		//$(myValue).style.zIndex = '20';	
		sLastemployeeDesc = myValue; 
		//$('employeeDesc1').className = 'employeeDesc';
	}
}

function hideDescription()
{
	
	$$('.employeeDesc').setStyle('display', 'none');

	//alert(myValue);
	if (sLastemployeeDesc != "-1")
	{
		$(sLastemployeeDesc).style.display = 'none';		
		sLastemployeeDesc = "-1"; 
		//$('employeeDesc1').className = 'employeeDesc';
	}
}

function test() {
	
		//$$('div[class=employeeDesc]').setStyle('none');
	//$('employeeArea').getElement('.employeeDesc').setStyle('display', 'none');	
	$$('.employeeDesc').setStyle('display', 'none');
	
}

var sLastHighlight = "link1";
function setActiveAfter(myValue)
{	
	//alert("sdf dfg");
	//$$('a[class^=link]').className = 'normalOnly';
	if (sLastHighlight != "-1")
	{
		$(sLastHighlight).className = 'normalOnly';
	}
	
	
	$(myValue).className = 'activeOnly';
	sLastHighlight	= myValue;
}

var iMaxZoom = 3;
var iMinZoom = 1;
var iActZoom = 2;
function setZoom(myZoom)
{
	if (myZoom == 'ZOOM_OUT')
	{
		iActZoom--;
		if (iActZoom <= 0)
		{
			iActZoom = iMinZoom;
		}
	}
	if (myZoom == 'ZOOM_IN')
	{
		iActZoom++;
		if (iActZoom > iMaxZoom)
		{
			iActZoom = iMaxZoom;
		}
	}
	
	resetZoomImg();
	
	if (iActZoom == 1) {
		$('skizzeKlein').style.display = 'block';
	}
	else if (iActZoom == 2) {
		$('skizzeMittel').style.display = 'block';
	}
	else if (iActZoom == 3) {
		$('skizzeGross').style.display = 'block';	
	}
	else {
		$('skizzeGross').style.display = 'block';
	}
	
	
	//alert(iActZoom);
}

function resetZoomImg ()
{
	//alert('reset');
	$('skizzeKlein').style.display = 'none';	
	$('skizzeMittel').style.display = 'none';	
	$('skizzeGross').style.display = 'none';	
}