var winPopup = null;
/* Einige Funktionen für Cross-Browser-Eventhandling */
function getSrcElement(eventObj) {
	if ( eventObj.srcElement ) return eventObj.srcElement; // Microsoft
	else if ( eventObj.target ) return eventObj.target; // Mozilla, Netscape
	return false;
}
function getKeyCode(eventObj) {
	if ( eventObj.keyCode ) return eventObj.keyCode; // Microsoft, Mozilla
	// else if () return null;
	return false;
}
/* // Einige Funktionen für Cross-Browser-Eventhandling */
function onFocusHandler() {
	if (!winPopup) return;
	if (!winPopup.closed) winPopup.close();
	winPopup = null;
}
function doGlobalOpen(url,name, width, height, typ){
	width = (width ? width : 390);
	height = (height ? height : 654 );
	url = ( url.indexOf("http") == 0 ? url : getBasePath() + '/' + url );
	winPopup = window.open(url,name,"width=" + width + ",height=" + height + ",screenX=0,screenY=0,left=100,top=50,dependent=yes,status=no,copyhistory=no,scrollbars=no,toolbar=no,location=no");
	if (typ==false) {
		var winPopupLoc=winPopup;
		winPopupLoc.focus();
		winPopup=null;
	}else {
		winPopup.focus();
	}
	return false;
}
function getBasePath() {
	aBaseTags = document.getElementsByTagName("base");
	for( i = 0; i < aBaseTags.length; i++ ) {
		if ( aBaseTags[i].href ) return aBaseTags[i].href;
	}
	return "";
}

