// JavaScript Document

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_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_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function flvFSTI4(){//v1.01
this.style.filter="";}

function flvFSTI3(v1,v2){//v1.01
var v3;if (v1.filters[0]&&v1.filters[0].status==2){v1.filters[0].Stop();}if (v2==0){v3="blendTrans(Duration="+v1.STI8+")";}else {v3="revealTrans(Duration="+v1.STI8+",Transition="+(v2-1)+")";}v1.style.filter=v3;}

function flvFSTI2(){//v1.01
var v1,v2=document,v3=v2.STI4,v4;for (v4=0;v3&&v4<v3.length&&(v1=v3[v4])&&v1.STI5;v4++){if (v1.filters&&!v2.STI7){flvFSTI3(v1,v1.STI3);v1.filters[0].Apply();}v1.src=v1.STI5;if (v1.filters&&!v2.STI7){v1.filters[0].Play();}}}

function flvFSTI1(){//v1.01
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.STI1.nl/dreamweaver/)
var v1=arguments,v2=document,v3;v2.STI4=new Array();v2.STI7=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);for (var v4=0;v4<v1.length-2;v4+=5){v3=MM_findObj(v1[v4]);if (v3){v3.STI5=v3.src;v3.STI6=v1[v4+1];v3.STI2=v1[v4+2];v3.STI3=v1[v4+3];v3.STI8=v1[v4+4];v2.STI4[v2.STI4.length]=v3;if (v3.filters&&!v2.STI7){flvFSTI3(v3,v3.STI2);v3.onfilterchange=flvFSTI4;v3.filters[0].Apply();}v3.src=v3.STI6;if (v3.filters&&!v2.STI7){v3.filters[0].Play();}}}}

function smclick(wer){
	actstyle = document.getElementById("sm3_"+wer).style.display;
	if (actstyle == 'none'){
	  document.getElementById("sm3_"+wer).style.display = "block";
	}else{
	  document.getElementById("sm3_"+wer).style.display = "none";	
	}
}

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_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];}
}

function sitemap(icon,block){
	switcher = document.getElementById(block);
	if(switcher && icon){
		if (switcher.style.display == "block"){
		  switcher.style.display = "none";
		  icon.className = "sitemap_onoff_plus";
		}else{
		  switcher.style.display = "block";
		  icon.className = "sitemap_onoff_minus";
		}
	}
}

function moremedia(target){
	if(document.getElementById("img_moremedia_"+target) && document.getElementById("img_moremedia_action_"+target)){
		if(document.getElementById("img_moremedia_"+target).style.display == "none"){
			document.getElementById("img_moremedia_"+target).style.display = "block";
			document.getElementById("img_moremedia_action_"+target).className = "imgblock_miniaction_zu";
		}else{
			document.getElementById("img_moremedia_"+target).style.display = "none";
			document.getElementById("img_moremedia_action_"+target).className = "imgblock_miniaction_auf";
		}
	}
}

function makeacoolsound(container,content,xmlurl,backcolor){

		var flashvars = {};
        	flashvars.xmlurl = xmlurl;
			flashvars.backcolor = backcolor;
                   
        var params = {};
            params.movie = content;
            params.quality = "high";
            params.wmode = "transparent";
       
        var attributes = {};
            attributes.align = "center";
			attributes.id = "galerie";
       
    	swfobject.embedSWF(content, container, "150", "44", "8.0", "../seite_daten/scripts/swfobject_2_1/swfobject/expressInstall.swf", flashvars, params, attributes);

}

function makeacoolvideo(container,content,xmlurl,medwidth,medheight){
var flashvars = {
				 xmlfile: xmlurl
				};
				var params = {
				  allowFullScreen: "true",
				  allowScriptAccess: "always"
				};
				var attributes = {
				  id:container,
				  name:container
				};
				swfobject.embedSWF(content, container, medwidth, medheight, "9.0.115", "../seite_daten/scripts/swfobject_2_1/swfobject/expressInstall.swf", flashvars, params, attributes);
}

function SuchenUndErsetzen(QuellText, SuchText, ErsatzText)
        {   // Erstellt von Ralf Pfeifer
            // Fehlerpruefung
            if ((QuellText == null) || (SuchText == null))           { return null; }
            if ((QuellText.length == 0) || (SuchText.length == 0))   { return QuellText; }

            // Kein ErsatzText ?
            if ((ErsatzText == null) || (ErsatzText.length == 0))    { ErsatzText = ""; }

            var LaengeSuchText = SuchText.length;
            var LaengeErsatzText = ErsatzText.length;
            var Pos = QuellText.indexOf(SuchText, 0);

            while (Pos >= 0)
            {
                QuellText = QuellText.substring(0, Pos) + ErsatzText + QuellText.substring(Pos + LaengeSuchText);
                Pos = QuellText.indexOf(SuchText, Pos + LaengeErsatzText);
            }
            return QuellText;
        } // -->

function newstickersnap(){
	if(document.getElementById("newssnap").className == "lay_newst_snap"){
		document.getElementById("newssnap").className = "lay_newst_snap_off";
		document.getElementById("klinikticker").className = "lay_ticker_off";
	}else{
		document.getElementById("newssnap").className = "lay_newst_snap";
		document.getElementById("klinikticker").className = "lay_ticker";
	}
}

function infoeventtab(tabid){
	elem = document.getElementById("event_tab_"+tabid);
	tab1 = document.getElementById("event_tab_1");
	tab2 = document.getElementById("event_tab_2");
	tabcont1 = document.getElementById("event_tabcont_1");
	tabcont2 = document.getElementById("event_tabcont_2");
	
	if (elem.className != "lay_info_tab_butact"){
		if(tabid == 1){
			tab1.className = "lay_info_tab_butact";
			tab2.className = "lay_info_tab_but";
			tabcont1.className = "fo_info_norm";
			tabcont2.className = "fo_info_norm infotabcontoff";	
		}else{
			tab1.className = "lay_info_tab_but";
			tab2.className = "lay_info_tab_butact";
			tabcont1.className = "fo_info_norm infotabcontoff";
			tabcont2.className = "fo_info_norm";
		}
	}
}

function eventtab(tabid){
	elem = document.getElementById("event_tab_"+tabid);
	tab1 = document.getElementById("event_tab_1");
	tab2 = document.getElementById("event_tab_2");
	tabcont1 = document.getElementById("event_tabcont_1");
	tabcont2 = document.getElementById("event_tabcont_2");
	
	if (elem.className != "lay_info_tab_butact"){
		if(tabid == 1){
			tab1.className = "lay_info_tab_butact";
			tab2.className = "lay_info_tab_but";
			tabcont1.className = "lay_news_income_cont";
			tabcont2.className = "lay_news_income_cont infotabcontoff";	
		}else{
			tab1.className = "lay_info_tab_but";
			tab2.className = "lay_info_tab_butact";
			tabcont1.className = "lay_news_income_cont infotabcontoff";
			tabcont2.className = "lay_news_income_cont";
		}
	}
}




