var suchpop;
function such_popup(thePOPURL) 
{
suchpop=window.open(thePOPURL,'SuchePopup','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=380,height=500');suchpop.focus();
}



function suche_starten(Popupdesign, pfad)
{
	q = document.forms['Suche'].q.value;
	
// Ersetzt die Leerzeichen durch +  Für Netscape Bug bei mehreren Suchbegriffen
var Leerzeichen = q.search(/\s/);
if(Leerzeichen != -1)
{ 
var q = q.replace(/\s/g,"+");  
}
// Ende Netscape Bug	
	if (!q)
		{
		alert('Bitte geben Sie einen Suchbegriff ein!');
		document.forms['Suche'].q.focus();
		}
	else
		{
		POPURL = pfad + '.php?q=' + q + '&Popupdesign=' + Popupdesign;
		such_popup(POPURL);
		}
}






function formLinker(formularname)
{ 
var URL = document.forms[formularname].die_URLs.options[document.forms[formularname].die_URLs.options.selectedIndex].value;
if(URL)
  {
  top.document.location.href = URL;
  }
return false; 
}



var win1;
function popup_1(theURL) { win1=window.open(theURL,'PopupWindow1','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=730,height=430');win1.moveTo(20,20);win1.focus();}

var win2;
function popup_2(theURL) { win2=window.open(theURL,'PopupWindow2','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=380,height=475');win2.moveTo(350,20);win2.focus();}

var win3;
function popup_3(theURL) { win3=window.open(theURL,'PopupWindow3','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=380,height=475');win3.moveTo(350,20);win3.focus();}

var win4;
function popup_4(theURL) { win4=window.open(theURL,'PopupWindow4','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=480,height=475');win4.moveTo(350,20);win4.focus();}

var win5;
function popup_5(theURL) { win5=window.open(theURL,'PopupWindow5','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=790,height=350');win5.moveTo(5,20);win5.focus();}
// ---------------------------------------------------------------------------------------------------------
// Funktionen für die Anpassung der Seite an die aktuellen Abmessungen des Browserfensters
// ---------------------------------------------------------------------------------------------------------
var window_width = 1;
var window_height;
var contentheight_min = 1;
var nichtvariableHoehe;
var Abschlussbalken_sichtbar = false;
var Abschlussbalken_Rand = 32; // Abstand zwischen Abschlussbalken und rechtem Fenster-Rand
var Abschlussbalken_Verschiebung;


if((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) 
{
window_width = window.innerWidth;
window_height = window.innerHeight;
}


if((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )) 
{
window_width = document.body.clientWidth;
window_height = document.body.clientHeight;
}


// Erst ab 822 Pixel Fensterbreite wird der Abschlussbalken angezeigt. 822 Pixel setzen sich zusammen aus 770 Pixel Fensterbreite + 52 Pixel Balkenbreite 
Abschlussbalken_Verschiebung = window_width - 770 - 52 - Abschlussbalken_Rand; // 52Px = Breite des Abschlussbalkens 
if (Abschlussbalken_Verschiebung < 1) Abschlussbalken_Verschiebung = 1;
if (window_width > 822) Abschlussbalken_sichtbar = true; // Abschlussbalken nur dann anzeigen, wenn Browserfensterbreite mehr als 822 Pixel beträgt. 





function footer_nach_unten(Seite)
{
if(Seite=='glasmuseum' || Seite=='konzertreihe' || Seite=='alterhofherding')
	{
	nichtvariableHoehe = 322; // nichtvariableHoehe = Höhe obere Leiste (48PX) +  Höhe oberer Contentbereich (156 Px) + Höhe Trennlinie (1 Px) + Höhe Footer (117 Px)  
	}
	
contentheight_min = window_height - nichtvariableHoehe;	
if (contentheight_min < 0) contentheight_min = 1;
document.write('<img src="../common_images/pixel.gif" border="0" alt="" width="1" height="',contentheight_min,'"><br>');
}



function abschlussbalken_oben()
{
	if (Abschlussbalken_sichtbar)
	{
	document.write('<td valign="top"><img src="../common_images/pixel.gif" alt="" width="1" height="1" border="0"><br></td>');
	document.write('<td valign="top" background="images/bg_abschluss_oben.gif"><img src="../common_images/pixel.gif" alt="" width="52" height="1" border="0"><br></td>');
	}
}


function abschlussbalken_mitte()
{
	if (Abschlussbalken_sichtbar)
	{
	document.write('<td valign="top" background="../common_images/pixel_linie.gif"><img src="../common_images/pixel.gif" alt="" width="',Abschlussbalken_Verschiebung,'" height="1" border="0"><br></td>'); 
	document.write('<td valign="top" background="images/bg_abschluss_mitte.gif"><img src="../common_images/pixel.gif" alt="" width="1" height="1" border="0"><br></td>');
	}
}


function abschlussbalken_unten()
{
	if (Abschlussbalken_sichtbar)
	{
	document.write('<td valign="top"><img src="../common_images/pixel.gif" alt="" width="1" height="1" border="0"><br></td>'); 
	document.write('<td valign="top" background="images/bg_abschluss_unten.gif"><img src="../common_images/pixel.gif" alt="" width="1" height="1" border="0"><br></td>');
	}
}





// ---------------------------------------------------------------------------------------------------------
// 										MouseOver
// ---------------------------------------------------------------------------------------------------------

var browserOK=false;
if (document.images) {browserOK=true;}
//------------------ Grafik-Preload --------------
if (browserOK)
{
grafik=new Array();
grafik['pfeilan']=new Image();  grafik['pfeilan'].src="../common_images/pfeil_ln_an.gif";
grafik['pfeilaus']=new Image(); grafik['pfeilaus'].src="../common_images/pfeil_ln_aus.gif"; 

grafik['punktan']=new Image(); 	grafik['punktan'].src="../common_images/punkt_ln_an.gif";
grafik['punktaus']=new Image(); grafik['punktaus'].src="../common_images/punkt_ln_aus.gif"; 
}
//------------------------------------------------

function swapImage(name,schluessel)
{ 
   if(browserOK) document.images[name].src=grafik[schluessel].src;
}






