self.name = "main";

IE = (navigator.appName=="Microsoft Internet Explorer" ? 1 : 0);
NS = (navigator.appName=="Netscape" ? 1 : 0);
bVer = parseInt(navigator.appVersion);

/* $$ ------------------------------------------------------------------
    Function      :  popup_swf
    Beschreibung  :  Öffnet ein Popup mit swf-Datei (file)
    Beginn        :  14.04.2006
    Letzte Bearb. :
    Bearbeiter    :  Ansgar Hiller 
    Projekt       : 
------------------------------------------------------------------ && */
function popup_swf(val_x,val_y,file) {
	 _width = val_x+40
	 _height = val_y+40
	 _params = "width=" + _width + ",height=" + _height + ",resizable=no,status=no,scrollbars=no";
	
	if (bVer >= 4) {
		 //FÜR ZENTRIERUNG:
		 //_left = ( (screen.width-val_x) >>1 );
		 //_top = ( (screen.height-val_y) >>1 );
		 _top=200, _left=100;
	} else {
		 _top=50, _left=60;
	}
	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;
	
	newWin = null;
	newWin = window.open("","popup", _params);
	newWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n');
	newWin.document.write('<html>\n<head>\n<title>DEMO</title>\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n</head>\n');
	newWin.document.write('<body topmargin="20" leftmargin="20" background="bilder/bg_tile.gif">\n');
	newWin.document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="'+val_x+'" height="'+val_y+'">\n');
	newWin.document.write('<param name="movie" value="'+file+'">\n');
	newWin.document.write('<param name="quality" value="high">\n');
	newWin.document.write('<embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+val_x+'" height="'+val_y+'"></embed>\n');
	newWin.document.write('</object>\n');
	newWin.document.write('</body>\n</html>');
	newWin.document.close();
	
}

/* $$ ------------------------------------------------------------------
    Function      :  popup_img
    Beschreibung  :  Öffnet ein Popup mit einem Image (bild)
    Beginn        :  14.04.2006
    Letzte Bearb. :
    Bearbeiter    :  Ansgar Hiller 
    Projekt       : 
------------------------------------------------------------------ && */
function popup_img(val_x,val_y,bild) {
	 _width = val_x+40
	 _height = val_y+40
	 _params = "width=" + _width + ",height=" + _height + ",resizable=no,status=no,scrollbars=no";
	
	if (bVer >= 4) {
		 //FÜR ZENTRIERUNG:
		 //_left = ( (screen.width-val_x) >>1 );
		 //_top = ( (screen.height-val_y) >>1 );
		 _top=200, _left=100;
	} else {
		 _top=50, _left=60;
	}
	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;
	
	newWin = null;
	newWin = window.open("","popup", _params);
	newWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n');
	newWin.document.write('<html>\n<head>\n<title>I M A G E</title>\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n</head>\n');
	newWin.document.write('<body topmargin="20" leftmargin="20" bgcolor="#9C9fA7">\n');
	newWin.document.write('<img src="'+bild+'" width="'+val_x+'" height="'+val_y+'">\n');
	newWin.document.write('</body>\n</html>');
	newWin.document.close();
	
}

/* $$ ------------------------------------------------------------------
    Function      :  popup_htmlURL
    Beschreibung  :  Öffnet ein Popup mit einer HTML-Datei (file)
    Beginn        :  14.04.2006
    Letzte Bearb. :
    Bearbeiter    :  Ansgar Hiller 
    Projekt       : 
------------------------------------------------------------------ && */
function popup_htmlURL(val_x,val_y,htmlURL) {
	 _width = val_x
	 _height = val_y
	 _params = "width=" + _width + ",height=" + _height + ",resizable=no,status=no,scrollbars=auto";
		
	if (bVer >= 4) {
		 //FÜR ZENTRIERUNG:
		 //_left = ( (screen.width-val_x) >>1 );
		 //_top = ( (screen.height-val_y) >>1 );
		 _top=200, _left=100;
	} else {
		 _top=50, _left=60;
	}
	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = null;
	newWin = window.open(htmlURL,"popup", _params);
		 
}
/* $$ ------------------------------------------------------------------
    Function      :  toggleLayer
    Beschreibung  :  eine Layer (whichLayer) an- und aus-schalten
    Beginn        :  02.08.2006
    Letzte Bearb. :
    Bearbeiter    :  Ansgar Hiller 
    Projekt       : 
------------------------------------------------------------------ && */
function toggleLayer(whichLayer) {
	if (document.getElementById) {
	// this is the way the standards work
	var style2 = document.getElementById(whichLayer).style;
	style2.display = style2.display? "":"block";
	} else if (document.all) {
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
	} else if (document.layers) {
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
}