// Skript zum Oeffnen eines neuen Fensters mit Uebergabe der Groesse und der URL

 features="";





function PopUpGastgeber(url, breite, hoehe)

{

  var styles="width=" + breite + ",height=" + hoehe + ",menubar=yes,scrollbars=yes";

  Fenster = open(url, "_blank", styles);

}





function PopUp(url, breite, hoehe)

{

	var styles="width=" + breite + ",height=" + hoehe + ",menubar=yes,scrollbars=yes";



	if ( !window.Fenster || Fenster.closed )

 	{

		Fenster = window.open(url, name, styles);

	}

	else

	{

		Fenster.location = url,name,styles;

	}

	 Fenster.focus();

}





function Popper(url, name, breite, hoehe)

{

	oben = screen.availHeight - (screen.availHeight - 10);

	links = screen.availWidth - 530;

	var features = ('left='+links+',top='+oben+',width=' + breite + ',height=' + hoehe + ',scrollbars=1');



	if ( !window.Auswahl || Auswahl.closed )

  	{

 		Fenster = window.open(url, name, features);

	}

	 Fenster.focus();

}





function PopperPlan(url, name, breite, hoehe)

{

	oben = screen.availHeight - (screen.availHeight - 0);

	links = screen.availWidth - 0;

	var features = ('left='+links+',top='+oben+',width=' + breite + ',height=' + hoehe + ',scrollbars=1');



	if ( !window.Auswahl || Auswahl.closed )

  	{

  		Fenster = window.open(url, name, features);

	}

	 Fenster.focus();

}

//	slices des Ortsplan





function PopperSlice(url, name, breite, hoehe, feldLinks, feldRechts, coordXLeft, coordXRight, coordYTop, coordYBottom)

{

	if ( window.Fenster )

	{

		url = url + '&koordinaten=' + koordinaten + '&feldLinks=' + feldLinks + '&feldRechts=' + feldRechts + '&coordXLeft=' + coordXLeft + '&coordXRight=' + coordXRight + '&coordYTop=' + coordYTop + '&coordYBottom=' + coordYBottom;

		oben = screen.availHeight - (screen.availHeight - 10);

		links = screen.availWidth - (screen.availWidth - 100);

		var features = ('left='+links+',top='+oben+',width=' + breite + ',height=' + hoehe + ',scrollbars=0');

		Fenster = window.open(url, name, features);

	}

		url = url + '&koordinaten=' + koordinaten + '&feldLinks=' + feldLinks + '&feldRechts=' + feldRechts + '&coordXLeft=' + coordXLeft + '&coordXRight=' + coordXRight + '&coordYTop=' + coordYTop + '&coordYBottom=' + coordYBottom;

		oben = screen.availHeight - (screen.availHeight - 10);

		links = screen.availWidth - (screen.availWidth - 100);

		var features = ('left='+links+',top='+oben+',width=' + breite + ',height=' + hoehe + ',scrollbars=0');



	if ( !window.Fenster || Fenster.closed )

  	{

 		Fenster = window.open(url, name, features);

	}

	 Fenster.focus();

}



// fuer den Ortsplan

// versch. Ansichten fuer Browser...



function opopup(url, name)

{

	nn4 = (document.layers) ? true : false;

	nn6 = ( (document.getElementById) && (!document.all) ) ? true : false;

	ie = (document.all) ? true : false;

	(nn6) ? (breite = '730', hoehe = '498') : (ie) ? (breite = '730', hoehe = '498') : (breite = '730', hoehe = '498');

	oben = screen.availHeight - (screen.availHeight - 16);

	links = screen.availWidth - 750;

	var features = ('left='+links+',top='+oben+',width=' + breite + ',height=' + hoehe + ',scrollbars=0');

	if ( !window.Fenster || Fenster.closed )

  	{

  		Fenster = window.open(url, name, features);

	}

	else

	{

		Fenster = window.open(url, name, features);

	}

	 Fenster.focus();

}

/*

	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 -  630;

		}

		else

		{

			oben = screen.availHeight - (screen.availHeight - 10);

		  	links = screen.availWidth - 530;

		}

	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,width=450,height=300');

			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,width=496,height=300');

			Auswahl = window.open(url, name, features, is_einrichtung);

		}

    }

    Auswahl.focus();

}

/*



function PopUp(url, breite, hoehe)

{

  var styles="width=" + breite + ",height=" + hoehe + ",menubar=yes,scrollbars=yes";

  Fenster = open(url, "_blank", styles);



if ( !window.Auswahl || Auswahl.closed )

  	{

 		Fenster = window.open(url, name, features);

	}

	 Fenster.focus();

}

*/