//--- Copyright STRUGGER DESIGN

var statustext = "Willkommen im Markt Glonn";
window.defaultStatus = statustext;
// MM-Objekte
function MM_preloadImages()
         { //v3.0
         var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
         var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
         if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
         }
function MM_swapImgRestore()
         { //v3.0
         var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
         }
function MM_findObj(n, d)
         { //v4.01
         var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
         d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
         if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
         for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
         if(!x && d.getElementById) x=d.getElementById(n); return x;
         }
function MM_swapImage()
         { //v3.0
         var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
         if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
         }
		 
// Gemeinde Popupfenster öffnen (aus dem Verzeichnis html)
function popup_baiern()
         {
         baiern = window.open('baiern_ortsplan.php','baiern','width=617,height=727,scrollbars=yes');
         baiern.focus();
         }
function popup_bruck()
         {
         bruck = window.open('bruck_ortsplan.php','bruck','width=617,height=727,scrollbars=yes');
         bruck.focus();
         }
function popup_glonn()
         {
         glonn = window.open('glonn_ortsplan.php','glonn','width=617,height=727,scrollbars=yes');
         glonn.focus();
         }
function popup_egmating()
         {
         egmating = window.open('egmating_ortsplan.php','egmating','width=617,height=727,scrollbars=yes');
         egmating.focus();
         }
function popup_moosach()
         {
         moosach = window.open('moosach_ortsplan.php','moosach','width=617,height=727,scrollbars=yes');
         moosach.focus();
         }
function popup_oberpframmern()
         {
         oberpframmern = window.open('oberpframmern_ortsplan.php','oberpframmern','width=617,height=727,scrollbars=yes');
         oberpframmern.focus();
         }
function popup_radwege()
         {
         radwege = window.open('wanderwege_radwege.php','radwege','width=617,height=727,scrollbars=yes');
         radwege.focus();
         }
function popup_loibersdorf()
         {
         loibersdorf = window.open('planskizze_loibersdorf.php','loibersdorf','width=617,height=727,scrollbars=yes');
         loibersdorf.focus();
         }
function popup_altenburg()
         {
         altenburg = window.open('planskizze_kloster_altenburg.php','altenburg','width=617,height=727,scrollbars=yes');
         altenburg.focus();
         }
function popup_igel()
         {
         igel = window.open('planskizze_igel_tour.php','igel','width=617,height=727,scrollbars=yes');
         igel.focus();
         }
function popup_aying()
         {
         aying = window.open('planskizze_aying_glonn.php','aying','width=617,height=727,scrollbars=yes');
         aying.focus();
         }
function popup_eglharting()
         {
         eglharting = window.open('planskizze_eglharting_glonn.php','eglharting','width=617,height=727,scrollbars=yes');
         eglharting.focus();
         }
function popup_unterelkofen()
         {
         unterelkofen = window.open('planskizze_glonn_unterelkofen.php','unterelkofen','width=617,height=727,scrollbars=yes');
         unterelkofen.focus();
         }
function popup_ortsplan()
         {
         ortsplan = window.open('ortsplan.php','ortsplan','width=728,height=777,scrollbars=yes');
         ortsplan.focus();
         }		 
		 
// A - Z Popupfenster öffnen (aus dem Verzeichnis a_z_popup)

function popup_bauamt()
         {
         bauamt = window.open('../a_z_popup/bauamt.php','bauamt','width=617,height=727,scrollbars=yes');
         bauamt.focus();
         }
function popup_fin_kasse()
         {
         fin_kasse = window.open('../a_z_popup/fin_kasse.php','fin_kasse','width=617,height=727,scrollbars=yes');
         fin_kasse.focus();
         }
function popup_ord_stand()
         {
         ord_stand = window.open('../a_z_popup/ord_stand.php','ord_stand','width=617,height=727,scrollbars=yes');
         ord_stand.focus();
         }
function popup_ord_einw()
         {
         ord_einw = window.open('../a_z_popup/ord_einw.php','ord_einw','width=617,height=727,scrollbars=yes');
         ord_einw.focus();
         }
function popup_finanz_steu()
         {
         finanz_steu = window.open('../a_z_popup/finanz_steu.php','finanz_steu','width=617,height=727,scrollbars=yes');
         finanz_steu.focus();
         }
function popup_ord_gew()
         {
         ord_gew = window.open('../a_z_popup/ord_gew.php','ord_gew','width=617,height=727,scrollbars=yes');
         ord_gew.focus();
         }
function popup_ord_pass()
         {
         ord_pass = window.open('../a_z_popup/ord_pass.php','ord_pass','width=617,height=727,scrollbars=yes');
         ord_pass.focus();
         }
function popup_fin_kaemm()
         {
         fin_kaemm = window.open('../a_z_popup/fin_kaemm.php','fin_kaemm','width=617,height=727,scrollbars=yes');
         fin_kaemm.focus();
         }
function popup_ord_fund()
         {
         ord_fund = window.open('../a_z_popup/ord_fund.php','ord_fund','width=617,height=727,scrollbars=yes');
         ord_fund.focus();
         }
function popup_rath_haupt()
         {
         rath_haupt = window.open('../a_z_popup/rath_haupt.php','rath_haupt','width=617,height=727,scrollbars=yes');
         rath_haupt.focus();
         }
		 
// zahlen.php Popups öffnen (aus dem Verzeichnis html)

function popup_einwohnerentwicklung()
         {
         einwohnerentwicklung = window.open('einwohnerentwicklung.php','einwohnerentwicklung','width=617,height=727,scrollbars=yes');
         einwohnerentwicklung.focus();
         }
function popup_altersstruktur()
         {
         altersstruktur = window.open('altersstruktur.php','altersstruktur','width=617,height=727,scrollbars=yes');
         altersstruktur.focus();
         }
function popup_staatsangehoerigkeit()
         {
         staatsangehoerigkeit = window.open('staatsangehoerigkeit.php','staatsangehoerigkeit','width=617,height=727,scrollbars=yes');
         staatsangehoerigkeit.focus();
         }
function popup_schulden()
         {
         schulden = window.open('schulden.php','schulden','width=617,height=727,scrollbars=yes');
         schulden.focus();
         }
function popup_einkommenssteueranteil()
         {
         einkommenssteueranteil = window.open('einkommenssteueranteil.php','einkommenssteueranteil','width=617,height=727,scrollbars=yes');
         einkommenssteueranteil.focus();
         }
function popup_gewerbesteuer()
         {
         gewerbesteuer = window.open('gewerbesteuer.php','gewerbesteuer','width=617,height=727,scrollbars=yes');
         gewerbesteuer.focus();
         }
function popup_grundsteuerb()
         {
         grundsteuerb = window.open('grundsteuerb.php','grundsteuerb','width=617,height=727,scrollbars=yes');
         grundsteuerb.focus();
         }
function popup_flaechennutzung()
         {
         flaechennutzung = window.open('flaechennutzung.php','flaechennutzung','width=617,height=727,scrollbars=yes');
         flaechennutzung.focus();
         }
function popup_wohnen()
         {
         wohnen = window.open('wohnen.php','wohnen','width=617,height=727,scrollbars=yes');
         wohnen.focus();
         }
		 
// vandalismus.php Popups öffnen (von Index Seite aus vandalismus.php liegt im Ordner Popup)

function popup_vandalismus()
         {
         vandalismus = window.open('popup/vandalismus.php','vandalismus','width=617,height=521,scrollbars=yes');
         vandalismus.focus();
         }
function popup_senioren()
         {
         senioren = window.open('popup/senioren.php','senioren','width=617,height=521,scrollbars=yes');
         senioren.focus();
         }
function popup_spendeumweltbildung2006()
         {
         spendeumweltbildung2006 = window.open('popup/spendeumweltbildung2006.php','senioren','width=617,height=521,scrollbars=yes');
         spendeumweltbildung2006.focus();
         }

//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

		 
		 


