function hover(id) {
	id.getElementsByTagName('img')[0].src = id.getElementsByTagName('img')[0].src.substring(0,id.getElementsByTagName('img')[0].src.length-4) + '_.gif';
}

function out(id) {
	id.getElementsByTagName('img')[0].src = id.getElementsByTagName('img')[0].src.substring(0,id.getElementsByTagName('img')[0].src.length-5) + '.gif';
}

function resize() {
	
	var y;
	if (self.innerHeight) // all except Explorer
	{
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		y = document.body.clientHeight;
	}
	
	var y2;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		y2 = document.body.scrollHeight;
	}
	else // Explorer Mac;
	     //would also work in Explorer 6 Strict, Mozilla and Safari
	{
		y2 = document.body.offsetHeight;
	}
	
	//alert(y+' '+y2);
	if (y >= y2) {
		document.getElementById('wrap').style.height = y+'px';
	}
}


function team(id) {
	divs = document.getElementById('team').getElementsByTagName('div');
	for (var i=0;i<divs.length;i++) {
		divs[i].style.left = -9000+'px';
	}
	div = id.parentNode.parentNode.getElementsByTagName('div')[0];
	div.style.left = 290+'px';

	if (div.offsetHeight > eval(document.getElementById('team').offsetHeight-30)) {
		document.getElementById('team').style.height = eval(div.offsetHeight)+'px';
	}
	
	//culori
	as = document.getElementById('team').getElementsByTagName('a');
	for (var i=0;i<as.length;i++) {
		as[i].style.color = '';
		as[i].style.backgroundImage = '';
	}
	id.style.color = '#555';
	id.style.backgroundImage = 'url(http://www.sigogroup.de/fileadmin/images/arrow_right_black.gif)';
}

function firstTeam() {
	document.getElementById('team').getElementsByTagName('div')[0].style.left = 290+'px';
	link = document.getElementById('team').getElementsByTagName('ul')[0].getElementsByTagName('a')[0];
	link.style.color = '#555';
	link.style.backgroundImage = 'url(http://www.sigogroup.de/fileadmin/images/arrow_right_black.gif)';
}

function popup() {
	window.open ('/karte.html', 'newwindow', config='height=610,width=530, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
}

function OpenPopUp(uid,nr) {
	window.open ('/popup.php?uid='+uid+'&nr='+nr, 'ImageWindow', 'height=580, width=530, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, directories=no, status=no');
}

function PrintPopUp(uid) {
	window.open ('/print.php?uid='+uid, 'PrintWindow', 'height=800,width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');
}

function PrintPopUpRef(uid) {
	window.open ('/print.php?ref=1&uid='+uid, 'PrintWindow', 'height=800,width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');
}
function PrintPopUpServ(uid) {
	window.open ('/print.php?serv=1&uid='+uid, 'PrintWindow', 'height=800,width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');
}

function PopUpTeam(uid) {
	window.open ('/team.php?uid='+uid, 'TeamWindow', 'height=800,width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');
}

function OpenPopUpPartner(file,w,h) {
	window.open ('/pop.php?file='+file, 'ImageWindow', 'height=580, width=530, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, directories=no, status=no');
}
