function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}


/* Flash .swf einbinden */
function flash(dateiname, breite, hoehe, noflash)
	{
	var str = '<object width="' + breite + '" height="' + hoehe + '" data="/userfiles/flash/' + dateiname + '.swf" type="application/x-shockwave-flash">\n';
	str += '<param name="quality" value="high" />\n';
	str += '<param name="wmode" value="transparent" />\n';
	str += '<param name="movie" value="/userfiles/flash/' + dateiname + '.swf" />\n';
	str += '<img src="' + noflash + '" width="' + breite + '" height="' + hoehe + '" alt="" />\n';
	str += '</object>\n';

	document.write(str);
	}

/* FlashVideo .flv einbinden */
function flashvideo(dateiname, breite, hoehe, abspielen, zurueck)
	{
	var str = '<div class="flashvideo" style="width:' + breite + 'px;height:' + hoehe + 'px;">\n';
	str += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + breite + '" height="' + hoehe + '" class="FLVPlayer">\n';
	str += '<param name="movie" value="http://192.168.125.25/muster/flash/FLVPlayer_Progressive.swf" />\n';
	str += '<param name="salign" value="lt" />\n';
	str += '<param name="quality" value="high" />\n';
	str += '<param name="wmode" value="transparent" />\n';
	str += '<param name="scale" value="noscale" />\n';
	str += '<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=http://192.168.125.25/muster/flash/Corona_Skin_3&streamName=http://192.168.125.25/muster/userfiles/flash/' + dateiname + '&autoPlay=' + abspielen + '&autoRewind=' + zurueck + '" />\n';
	str += '<embed src="http://192.168.125.25/muster/flash/FLVPlayer_Progressive.swf" wmode="transparent" flashvars="&MM_ComponentVersion=1&skinName=http://192.168.125.25/muster/flash/Corona_Skin_3&streamName=http://192.168.125.25/muster/userfiles/flash/' + dateiname + '&autoPlay=' + abspielen + '&autoRewind=' + zurueck + '" quality="high" scale="noscale" width="' + breite + '" height="' + hoehe + '" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	str += '</object>\n';
	str += '</div>\n';

	document.write(str);
	}

/* Bookmark */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

/* Volltextsuche */
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
