function showMonitoring( opt ){
	if( opt==1 ){
		document.getElementById("solarmonitoring").src = "/erneuerbare_energien_solarenergie_solarstrom/Solar_Monitoring.php";
		document.getElementById("solarmonitoringLayer").style.left = '160px';
		document.getElementById("solarmonitoringLayerSchatten").style.left = '165px';
	}else{
		top.document.getElementById("solarmonitoringLayer").style.left = '-1000px';
		top.document.getElementById("solarmonitoringLayerSchatten").style.left = '-1000px';	
	}
}

function hideLayer( lay ){
	element = document.getElementById( lay );
	for(i = 0;i <= 100;i++){
		window.setTimeout('element.style.filter = "Alpha(opacity=' + (100 - i) + ')"; element.style.MozOpacity = ' + (1 - i / 100) + '; element.style.opacity = ' + (1 - i / 100) + ';', i * 5);
	}
}

function showLayer( lay ){
	element = document.getElementById( lay );
	centerLayer( lay );
	for(i = 0;i <= 100;i++){
		window.setTimeout('element.style.filter = "Alpha(opacity=' + i + ')"; element.style.MozOpacity = ' + i / 100 + '; element.style.opacity = ' +  i / 100 + ';', i * 5);
	}
}

function centerLayer( lay ){
	var height = document.getHeight();
	var offset = (height - 795) / 2;
	element = document.getElementById( lay );
	element.style.top = (getScrollY() + offset) + 'px';
}

function getWidth() {
	var de = document.documentElement;
	var myWidth = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	return myWidth;
}

function getHeight() {
	var de = document.documentElement;
	var myHeight = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
	return myHeight;
}

function getScrollY() {
	var scrOfY = 0;
	
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
	}
	return scrOfY;
}
