<!--
// mps mediaworks webprojects */
// general.js */
// globales javascript fuer verschiedene seitenfunktionen
// zuletzt angepasst am 25.10.2001 von Alexander Baumgartl */
// zuletzt angepasst am 15.07.2003 von Stephan Beck */

// some browsers do not have the value undefined
// so it is set by this workaround
var undefined


// START popup fuer sitemap
function openPopup(sPopupUrl, iWidth, iHeight, sAttrib) {
	//var popurl="/ecap/site/en/sitemap/"
	var winpops=window.open(sPopupUrl,"","width="+iWidth+",height="+iHeight+","+sAttrib)
}

// ENDE popup fuer sitemap


//reloads the window if Nav4 resized
function MM_reloadPage(init) {
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

/*
 * this functions manage a mouse roll over effect e.g. for navigation
 * every image has to have an id tag for identification
 * the image will automatically set back to the original version
 * by calling the mouse out event.
 * 
 * Parameters:
 * string sImgName: unique ID attribute of the IMG tag to switch
 * string sImgSrcUrl: URL for the Image to set on Mouse over
 */

var aRolloverImgSrcUrlOriginal = new Array();

function RolloverOnMouseOver (sImgName, sImgSrcUrl) {
	// save original picture in this array
	//oDebug.writeVar(sImgName, 'Over sImgName');
	//oDebug.writeVar(this.aImgSrcUrlOriginal[sImgName], 'this.aImgSrcUrlOriginal[sImgName]');
	// with ie 6 works: aRolloverImgSrcUrlOriginal[sImgName] = document[sImgName].src;
	// in netscape 4.* images in layer have to been searched explicit
	if (document.images[sImgName] != undefined) {
		if (aRolloverImgSrcUrlOriginal[sImgName] == undefined) {
			aRolloverImgSrcUrlOriginal[sImgName] = document.images[sImgName].src;
		}
		document.images[sImgName].src = sImgSrcUrl;
	}
	else {
		// search all layers (dont search sublayers)
		var i = 0;
		//alert('lookup layers='+document.layers.length)
		while (i < document.layers.length) {
			if (document.layers[i].document.images[sImgName] != undefined) {
				//alert('found');
				if (aRolloverImgSrcUrlOriginal[sImgName] == undefined) {
					aRolloverImgSrcUrlOriginal[sImgName] = document.layers[i].document.images[sImgName].src;
				}
				document.layers[i].document.images[sImgName].src = sImgSrcUrl;
				break;
			}
		}
	}
	//oDebug.writeVar(this.aImgSrcUrlOriginal[sImgName], 'this.aImgSrcUrlOriginal[sImgName]');
}

function RolloverOnMouseOut (sImgName) {
	// Opera 6.01 has problems releasing always a mouse out event
	//oDebug.writeVar(sImgName, 'Out sImgName');
	//document[sImgName].src = aRolloverImgSrcUrlOriginal[sImgName];
	if (document.images[sImgName] != undefined) {
		document.images[sImgName].src = aRolloverImgSrcUrlOriginal[sImgName];
	}
	else {
		// search all layers (dont search sublayers)
		var i = 0;
		//alert('lookup layers='+document.layers.length)
		while (i < document.layers.length) {
			if (document.layers[i].document.images[sImgName] != undefined) {
				//alert('found');
				document.layers[i].document.images[sImgName].src = aRolloverImgSrcUrlOriginal[sImgName];
				break;
			}
		}
	}
}


// -->

