
// ============================================================================
// aq_openPopupWin()
//
// Beschreibung:
// Oeffnet ein neues Fenster (nur Text, ohne Menue) und zeigt als Parameter
// uebergebenes Dokument an.
// Dieses neue Fenster bekommt den Fokus.
//
// Parameter: 
// - doc: Dokument, das angezeigt werden soll
// - height: Hoehe des Fensters
// - width: Breite des Fensters
//
// Aufruf:
// aq_openPopupWin('doc','height','width')
//
// Beispiel:
// <a href="#" onclick="aq_openPopupWin('test.htm','300','400');">Link</a>
// ============================================================================
function aq_openPopupWin(doc,height,width){
	popupwin = open(doc,"displayWindow","height="+height+",width="+width+",toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}


// ============================================================================
// aq_resizeWorkAround() 
// 
// Beschreibung:
// Workaround fuer Netscape bei Seiten mit Layern
// - NS 4.x:  Seiteninhalt wird nach einem Resize wieder richtig angezeigt
// - NS 4.0x: Reload-Endlosschleife wird vermieden
//
// Parameter: 
// - keine
//
// Aufruf:  
// <body onload="aq_resizeWorkAround()">
// ============================================================================

function aq_resizeWorkAround(){
	var NS4 = (document.layers) ? 1 : 0;
	if (NS4){
		//alert("resize 1");
		aq_resizeInit();
	}
}
function aq_resizeInit(){
	setTimeout("onresize = aq_pageReload", 1000);
}
function aq_pageReload(){
	//alert("resize 2");
	location.reload();
}


// ============================================================================
// aq_showHideLayers() 
// 
// Beschreibung:
// Ein- und Ausblenden von Layern
// Behandlung fuer NS 4.x, NS 6, IE 4/5
//
// Parameter: 
// - LayerName
// - 'show' / 'hide'
//
// Aufruf:  
// aq_showHideLayers('LayerName','show/hide')
//
// Beispiel:
// <a href="#" onMouseOver="aq_showHideLayers('Layer1','show')" onMouseOut="aq_showHideLayers('Layer1','hide')">Link</a>
// ============================================================================

function aq_showHideLayers() { 
	var visStr, args, theObj;
	args 		= aq_showHideLayers.arguments; //with args (layerName,visStr)
	layerName 	= args[0];
	visStr		= args[1];
	// NS4
    if (navigator.appName == 'Netscape' && document.layers != null) {		
		theObj = eval(document.layers[layerName]);
		if (theObj) {
			theObj.visibility = visStr;
		}
		//alert("aq_showHideLayers() bei NS 4");
    }
	// NS6
    else if (navigator.appName == 'Netscape' && document.getElementById != null) {		
		if (visStr == 'show') visStr = 'visible'; //convert vals
		if (visStr == 'hide') visStr = 'hidden';
		theObj = eval(document.getElementById(layerName));
		if (theObj) {
			theObj.style.visibility = visStr;
		}
		//alert("aq_showHideLayers() bei NS 6");
    }
	// IE4/5
	else if (document.all != null) { 
		if (visStr == 'show') visStr = 'visible'; //convert vals
		if (visStr == 'hide') visStr = 'hidden';
		theObj = eval(document.all[layerName]);
		if (theObj) {
			theObj.style.visibility = visStr;
		}
		//alert("aq_showHideLayers() bei IE 4/5/5.5");
	}
}


