// Skript zum Oeffnen eines neuen Fensters mit Uebergabe der Groesse und der URL
function PopUp(url, breite, hoehe)
{
  var styles="width=" + breite + ",height=" + hoehe + ",menubar=yes,scrollbars=yes";
  Fenster = open(url, "_blank", styles);
}

/*
	oeffnet das Fenster mit verschiedenen Breiten/Hoehen, je nach Art
	muss wg. NN4.x immer wieder geschlossen wreden zwischendurch.
*/
function popup(url, name, features, is_einrichtung){

		if(is_einrichtung == 1)
		{
			oben = screen.availHeight - (screen.availHeight - 10);
	        links = screen.availWidth -  340;
		}
		else
		{
			oben = screen.availHeight - (screen.availHeight - 10);
	        links = screen.availWidth - 340;
		}

	if ( !window.Auswahl || Auswahl.closed )
	{
		if(is_einrichtung == 1)
		{
			features += (',left='+links+',top='+oben+',scrollbars=1,width=496,height=400');
			Auswahl = window.open(url, name, features, is_einrichtung);
		}
		else
		{
			features += (',left='+links+',top='+oben+',scrollbars=1');
			Auswahl = window.open(url, name, features, is_einrichtung);
		}
	}
    else 
    {
		if(is_einrichtung == 1)
		{
			Auswahl.close();
			features += (',left='+links+',top='+oben+',scrollbars=1,width=600,height=500');
			Auswahl = window.open(url, name, features, is_einrichtung);
		}
		else
		{
			Auswahl.close();
			features += (',left='+links+',top='+oben+',scrollbars=1');
			Auswahl = window.open(url, name, features, is_einrichtung);
		}
    }
    Auswahl.focus();
}

function opopup(url, name, breite, hoehe)
{
	var features = ('left=10,top=10,width=' + breite + ',height=' + hoehe + ',scrollbars=0');
  	
	if ( !window.Auswahl || Auswahl.closed )
  	{
  		Fenster = window.open(url, name, features);
	}
	 Fenster.focus();
}