
	
 function MM_openBrWindow(theURL,winName,features) {
        winName = winName.replace(/[^A-Z,0-9]/gi, '');
  		x = window.open(theURL,winName,features);
  		x.focus();
	}
 

	
  
	zoomStatus=0;
	function zoom(){
	        if (!document.all){
	        alert("Leider steht diese Funktion nur Benutzern des Internet Explorers zur Verfügung.");
	        return;
	        }
	        if (zoomStatus==0){
	                document.all.tags('body')[0].style.setAttribute('zoom','125%','false');
	                zoomStatus=1;
	        }
	        else{
	                document.all.tags('body')[0].style.setAttribute('zoom','100%','false');
	                zoomStatus=0;
	        }

	}


	
  
    function mailTo(){
        var myUrl = escape(parent.location.href);
        parent.location.href="mailto:Ihre%20Kontaktadresse?subject=Link-Tipp&body=Dieser%20Link%20wird%20Ihnen%20empfohlen:%20%20" + myUrl;
}

	
  
function printView(){
        printRequest = getNewRequest("print.html");
        MM_openBrWindow(printRequest,'druckAnsicht','scrollbars=yes,width=600,height=420');
}


	
  
function pdf(){
newRequest = getNewRequest ('content.pdf');
MM_openBrWindow(newRequest,'PDF','scrollbars=yes,width=800,height=600');
}

	
  
function getNewRequest(replacer){
  request = self.location.href;
  temp = /page.html/;  
  newRequest = request.replace(temp,replacer);
  if (request == newRequest) {
      newRequest = request + "/deutsch/" + replacer;
  }
  return newRequest;
}

	
         
            function favorite(label){
                if (label==undefined) label='';
                  if (!document.all){
                      alert("Bitte verwenden Sie die Tastenkombination STRG+D.");
                      return;
                  }
                      var title = 'Städtisches Krankenhaus Kiel';
                      getNewRequest('index_1.html');
                      window.external.AddFavorite(newRequest,label+title);
        }
    
	
        function fastSearch (path) {
    //if wenn kein Suchbegriff, dann keine Suche
    if (document.fastsearch.query.value=="") {
       return;
    }
    else {
        // Suchstring basteln
        document.fastsearch.action ="/de/"+path+"?conquest-searchquery-is-query=true&format=short&conquest-searchquery="
            + "url:(" + document.fastsearch.query.value + "*)^3 "
            + "title:(" + document.fastsearch.query.value + "*)^2 "
            + "contents:(" + document.fastsearch.query.value +"*)";
       // abschickern
       document.fastsearch.submit();
    }
}

    
	
  
function mouseover(imageName,newImageSrc){
eval("oldImageSrc = document."+imageName+".src;");
eval("document."+imageName+".src = '"+newImageSrc+"';");
}

	
  
function mouseout(imageName){
eval("document."+imageName+".src = '"+oldImageSrc+"';");
}

	
  
	
function checkOnSearch() {
             //if wenn kein Suchbegriff, dann keine Suche
            if (document.search.words.value=="") {
       	   return;
            }
            else {
                      // Suchstring basteln
                      document.search.action ="/deutsch/Universit%E4tsklinikum/searchresult.html?format=" +
                        document.search.format.options[document.search.format.selectedIndex].value +
                       "&conquest-searchquery=url:(" + document.search.words.value + ")^3 title:(" +
                        document.search.words.value + ")^2 contents:(" + document.search.words.value +")" +
                        " AND language:" + document.search.s_language.options[document.search.s_language.selectedIndex].value;
                        // wenn Suche auf Seiten mit bestimmtem Template eingeschränkt werden soll, Suchstring ergänzen
        if  (document.search.template.options[document.search.template.selectedIndex].value !="") {
              document.search.action += " AND template:" + document.search.template.options[document.search.template.selectedIndex].value;
           }
            // abschickern
            document.search.submit();
            }
}



	


//============Funktion fuer Sitemap=============================
function showNoShow(layerId){
 x = document.getElementById('sitemap'+layerId).style.display;
 picName = "image_"+layerId;
 plus = new Image(); plus.src = "/httpd/img/sitemap_plus.gif";
 down = new Image(); down.src = "/httpd/img/sitemap_down.gif";
 if (x =='none'){
         if (document.getElementById('sitemap'+layerId).hasChildNodes() == false) {
           reloadSitemap(layerId);
         }
         document.getElementById('sitemap'+layerId).style.display='block';
         eval("document."+picName+".src = down.src");
 }
 else {
         document.getElementById('sitemap'+layerId).style.display='none';
         eval("document."+picName+".src = plus.src");
 }
}

//============ Funktionen fuer das dynamische Nachladen ===========
function reloadSitemap(layerId){
         if (document.getElementById('sitemap'+layerId).innerHTML==''){
                  reference = '/sitemapReloader/'+layerId+'/part.html';
                  window.reloader.location.href = reference;
         }
         else return;
}

function changeContent(targetLayer){
         textOrig = self.reloader.document.getElementById('reloadLayer').innerHTML;
         if (textOrig.indexOf('<!--')!=-1){
            text = textOrig.substring(4,textOrig.length-3);
         }
         else
         text = textOrig;
         document.getElementById('sitemap'+targetLayer).innerHTML = text;
}
//Nachladen mit navmodule

function reloadNavresource(layerId,language){
         if (document.getElementById('sitemap'+layerId).innerHTML==''){
                  //reference = '/sitemapReloader/'+layerId+'/part.html';
                  reference = '/navresource-'+layerId+'/'+language+'//sitemapPart.html';                      
                  window.reloader.location.href = reference;
         }
         else return;
}




	

    function toggle(id) {
      if (document.getElementById(id).style.display == "none") {
        document.getElementById(id).style.display="";
      } else {
        document.getElementById(id).style.display="none";
      }
    }


	

    function extToggle(id, styleLo, styleHi) {
      if (document.getElementById(id).style.display == "none") {
        document.getElementById(id).style.display="";
        document.getElementById('container-'+id).setAttribute("class",styleHi);
      } else {
        document.getElementById(id).style.display="none";
        document.getElementById('container-'+id).setAttribute("class",styleLo);
      }
    }



	
         
                function check() {
                
                if (document.form1.Bild.value == "") {
                alert('Sie haben kein Bild ausgewählt!');
                return;
                }
                else if (document.form1.Absender.value == "") {
                alert('Sie haben keinen Absender eingegeben!');
                return;
                }
                else if (document.form1.Mail.value == "") {
                alert("Bitte Ihre E-Mail-Adresse eingeben!");
                return;
                }
                else if (document.form1.Empfaenger.value == "") {
                alert('Sie haben keinen Empfänger eingegeben!');
                return;
                }
                else if (document.form1.Grusstext.value == "") {
                alert('Sie haben keinen Grußtext eingegeben!');
                return;
                }
                else {
                document.form1.action="mail.html?Bild="+document.form1.Bild.value+
                "&Absender="+document.form1.Absender.value+
                "&Mail="+document.form1.Mail.value+
                "&Anrede="+document.form1.Anrede.value+
                "&Empfaenger="+document.form1.Empfaenger.value+
                "&Station="+document.form1.Station.value+
                "&Grusstext="+document.form1.Grusstext.value+
                "&recipient="+document.form1.recipient.value;
                MM_openBrWindow(document.form1.action,'response','width=300, height=150, top="100", left="100"');
                }
                //  if (document.form1.Bild.value != "" && document.form1.Absender.value != "" && document.form1.Mail.value != ""&& document.form1.Empfaenger.value != "" && document.form1.Grusstext.value != "") MM_openBrWindow(document.form1.action,'response','width=500, height=200, top="100", left="100"');
                }
                
                function radioValue(rObj) {
                for (var i=0; i<rObj.length; i++)
                        if (rObj[i].checked)
                        return rObj[i].value;
                        return false;
                        }
                        
                        function MM_openBrWindow(theURL,winName,features) {
                        x = window.open(theURL,winName,features);
                        x.focus();
                        }
                        
                        function input() {
                        var url = window.location.href;
                        var klinik = url.substring(url.indexOf("?")+1,url.length);
                        document.form1.recipient.value = klinik + "@pk-mx.de";
                        }
                        
                        function kill() {
                        document.form1.Bild.value = "";
                        document.form1.Absender.value = "";
                        document.form1.Empfaenger.value = "";
                        document.form1.Mail.value = "";
                        document.form1.Station.value = "";
                        document.form1.Grusstext.value = "";
                        }
                        
                        function popUp1(wintype)
                        {
                        popUp=window.open(wintype, 'fenster1', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=281');
                        popUp.window.focus(); 
                        }
                        
                        function popUp2(wintype)
                        {
                        popUp=window.open(wintype, 'fenster2', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=250'); 
                        popUp.window.focus(); 
                        }
                        
                        function popUp3(wintype)
                        {
                        popUp=window.open(wintype, 'fenster3', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=290,height=400');
                        popUp.window.focus(); 
                        }
                        
                        function popUp4(wintype)
                        {
                        popUp=window.open(wintype, 'fenster4', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=250');
                        popUp.window.focus(); 
                        }
                        
                        function popUp5(wintype)
                        {
                        popUp=window.open(wintype, 'fenster5', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=281,height=402');
                        popUp.window.focus(); 
                        }
                        
                        function popUp6(wintype)
                        {
                        popUp=window.open(wintype, 'fenster5', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=250');
                        popUp.window.focus(); 
                        }
                        
                        function popUp7(wintype)
                        {
                        popUp=window.open(wintype, 'fenster5', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=290,height=400');
                        popUp.window.focus(); 
                        }
                        
                        
    
	
  
        var http_request = false;
        
        
        function makeRequest(url, func) {
            
            http_request = false;
        
            if (window.XMLHttpRequest) { // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) {
                    http_request.overrideMimeType('text/xml');
                    // zu dieser Zeile siehe weiter unten
                }
            } else if (window.ActiveXObject) { // IE
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) {}
                }
            }
            
            if (!http_request) {
                alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
                return false;
            }
            http_request.onreadystatechange = func;
            http_request.open('GET', url, true);
            http_request.send(null);
            
        }
        
        function response() {
            if (http_request.readyState == 4) {
                if (http_request.status == 200) {
                    changeContent(http_request.responseText);
                } else {
                    alert('Bei dem Request ist ein Problem aufgetreten.');
                }
            }
        }
        
        
        
         
 
	
        
        
        var id = 0;
        
        function showNoShow(myId, language) {
            id=myId;
            makeRequest('/navresource-'+id+'/'+language+'/url/sitemapPartAjax.xhtml', response);
        }
        
        function changeContent(xml){
            document.getElementById('sitemap'+id).innerHTML = xml;
            toggleVisibilityAndImage(id);
        }
        
        function toggleVisibilityAndImage(id) {
            divId = 'sitemap' + id;
            imageName = 'image_' + id;
            if (document.getElementById(divId).style.display == "none") {
                document.getElementById(divId).style.display="block";
                document.images[imageName].src = "/httpd/img/sitemap_down.gif";
                document.images[imageName].alt = "open";
            } else {
                document.getElementById(divId).style.display="none";
                document.images[imageName].src= "/httpd/img/sitemap_plus.gif";
                document.images[imageName].alt="closed";
            }
        }
        
    
	
 
function getTopPosition (e,depth){
 //Fuer ie
 if (document.all){
         posToWindow = window.event.clientY;
         if (depth>1){		 
         	posToElement = window.event.offsetY;
			TOPPOSCORRECT3 =  TOPPOSCORRECT2;
		 }
		 else {
			posToElement = window.event.y;
			TOPPOSCORRECT3 =  TOPPOSCORRECT;
		 }
         posAbsolute = posToWindow-posToElement+document.body.scrollTop-TOPPOSCORRECT3;
		 //posAbsolute = posToWindow+document.body.scrollTop;
 }

  //Fuer NS/Mozilla
  if (!document.all) {

    current = e.currentTarget;
    
    posToElement = current.offsetTop;
    if (depth > 1) {
        posToWindow = e.clientY-e.layerY+window.pageYOffset;
        correction = 0;
    } else {
        posToWindow = current.offsetHeight;
        correction = 5;
    }
    
    posAbsolute = posToWindow+posToElement+correction;
  }

  return posAbsolute;
}


	
 
 function getLeftPosition (e,depth){
 //Fuer ie
 if (document.all){
         posToWindow = window.event.clientX;
   if (depth>1){		
		posToElement = window.event.offsetX;
		LEFTPOSCORRECT3 = LEFTPOSCORRECT2;
	}
	else {
       posToElement = window.event.x;
	   LEFTPOSCORRECT3 = LEFTPOSCORRECT;
	}

		// alert('window.event.x'+window.event.x);
		// alert('window.event.offsetX '+window.event.offsetX);
     	posAbsolute = posToWindow-posToElement+document.body.scrollLeft-LEFTPOSCORRECT3;
	    //posAbsolute = posToWindow+document.body.scrollLeft;
 }

  //Fuer NS/Mozilla
  if (!document.all) {
    current = e.currentTarget;
    
    if (depth > 1) {
        posToWindow = (e.clientX-e.layerX)+(current.offsetWidth+current.offsetLeft)+(window.pageXOffset);
        correction = 11;
    } else {
        posToWindow = current.offsetLeft;
        correction = 0;
    }
    posAbsolute = posToWindow+correction;
 }

 return posAbsolute;
}



	
  
function jumpAnchor(anchor){

 self.location.hash = '#'+anchor;

//a= eval('document.anchors["'+anchor+'"].name');
//a= document.anchors["unten"].name;
//alert(a);

}

	

 	
function showExtra(link,e){
        closeExtra();
        // alert('in showExtra');
         if (switchOff!=0)clearSwitchOff();
        layerId = link.parentNode.getAttribute('id');
        //alert(layerId);
        touchedLayer = document.getElementById(layerId);
        touchedLayer.id = layerId;
        //if (infoContains(touchedLayer)) return;
        touchedLayerDepth = getDepth(touchedLayer);
        touchedSublayer = document.getElementById(layerId+'_sub');
        //Wenn die Sublayer im LeftFrame geöffnet sind, dann keinen extralayer anzeigen
        if (touchedSublayer.style.display=='block') return;
        //Extralayer erst ab der definierten Ebene zeigen
        if (touchedLayerDepth<SHOWEXTRALAYERFROMDEPTH) return;
        text = touchedSublayer.innerHTML;
        extraLayer = getNewExtraLayer(touchedLayerDepth,touchedLayer);
        newText=replacer(text);
       // alert(newText);
        extraLayer.innerHTML = newText;
        //alert('extralayer newText: '+newText);
		depth = getDepth(touchedLayer);
        topPos = getTopPosition(e,depth);
        leftPos = getLeftPosition(e,depth);
        viewExtra(topPos,leftPos,extraLayer);
}


	
         
	
function checkOnSearch(unitId) {
    
    //if wenn kein Suchbegriff, dann keine Suche
    if (document.search.words.value=="") {
        return;
    } else if (document.search.Template.value=="") {
        // Suchstring basteln
        document.search.action =location.pathname + "?format=long" +
            "&conquest-searchquery=url:(" + document.search.words.value + "*)^3 title:(" +
            document.search.words.value + "*)^2 contents:(" + document.search.words.value +"*)"; 
                         
        
        if (unitId) {
            document.search.action += " AND unitId:" + unitId;
        }
        
        //alert(document.search.action);
        
        // abschickern
        document.search.submit();
    } else {
        // Suchstring basteln
        document.search.action =location.pathname + "?format=long" +
            "&conquest-searchquery=url:(" + document.search.words.value + "*)^3 title:(" +
            document.search.words.value + "*)^2 contents:(" + document.search.words.value +"*)"; 
                         
        document.search.action += " AND template:" + document.search.Template.value;
        if (unitId) {
            document.search.action += " AND unitId:" + unitId;
        }
        
        //alert(document.search.action);
        
        // abschickern
        document.search.submit();
    }
}

    
	
         
            function checkBabyalbum() {
                var absender = document.getElementById('absender');
                var email = document.getElementById('email');
                
                if(absender.value == '' || email.value == '') {
                    alert("Bitte füllen Sie alle Felder aus!");
                }
                else {
                    document.form.submit();
                }
            }
         
    
