
	
  
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 MM_openBrWindow(theURL,winName,features) {
        winName = winName.replace(/[^A-Z,0-9]/gi, '');
  		x = window.open(theURL,winName,features);
  		x.focus();
	}
 

	
  
    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 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=long&conquest-searchquery=" + "metadata:(" + document.fastsearch.query.value + ")^4 " + "url:(" + document.fastsearch.query.value + ")^3 " + "title:(" + document.fastsearch.query.value + ")^2 " + "contents:(" + document.fastsearch.query.value +")";
                    // abschickern
                    document.fastsearch.submit();
                }
            }
            
            function checkSearchValue() {
                if(document.getElementById('searchValue').value=='SUCHE') { 
                    document.getElementById('searchValue').value='';
                } else {
                    if(document.getElementById('searchValue').value=='') {
                        document.getElementById('searchValue').value='SUCHE';
                    }
                }
            }
        
	
	

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


	
  
	
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();
            }
}



	
  
        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 arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
 
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 and 6.
{
   if ((version >= 5.5) && (document.body.filters)) 
   {
       for(var i=0; i<document.images.length; i++)
       {
	      var img = document.images[i]
	      var imgName = img.src.toUpperCase()
	      if (imgName.match(/\.png/i) != null)
	      {
		     var imgID = (img.id) ? "id='" + img.id + "' " : ""
		     var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		     var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		     var imgSrc = "src='/httpd/img/layout/spacer.gif' "
		     var imgStyle = "display:block;position:relative;" + img.style.cssText 
		     var imgAttribs = img.attributes;
		     for (var j=0; j<imgAttribs.length; j++)
			 {
			    var imgAttrib = imgAttribs[j];
			    if (imgAttrib.nodeName == "align")
			    {		  
			       if (imgAttrib.nodeValue == "left") imgStyle = "float:left;" + imgStyle
			       if (imgAttrib.nodeValue == "right") imgStyle = "float:right;" + imgStyle
			       break
			    }
             }
		     var strNewHTML = "<img " + imgSrc + imgID + imgClass + imgTitle
		     strNewHTML += " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	         strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		     strNewHTML += "(src='" + img.src + "', sizingMethod='scale');\""
		     if(img.id=='large'||img.id=='medium'||img.id=='small'){
		     	strNewHTML += " onmouseover=\"PNGswap2('" + img.id + "');\" onmouseout=\"PNGswap2('" + img.id +"');\""
		     }else if(img.id=='logo'||img.id=='tagline'|| img.className=='clicked'){
		     }else{
		     	strNewHTML += " onmouseover=\"PNGswap('" + img.id + "');\" onmouseout=\"PNGswap('" + img.id +"');\""
		     }
		     strNewHTML += "></img>" 
		     img.outerHTML = strNewHTML
		     i = i-1
	      }
       }
   }
}                                       
if(window.attachEvent){
window.attachEvent("onload", correctPNG);
}
function PNGswap(myID)
{
   var strOver  = "a41e1e"
   var strOff = "343209"
   var oSpan = document.getElementById(myID)
   var currentAlphaImg = oSpan.filters(0).src
   if (currentAlphaImg.indexOf(strOver) != -1)
      oSpan.filters(0).src = currentAlphaImg.replace(strOver,strOff)
   else
      oSpan.filters(0).src = currentAlphaImg.replace(strOff,strOver)
}
function PNGswap2(myID)
{
   var strOver  = "_over"
   var strOff = "_normal"
   var oSpan = document.getElementById(myID)
   var currentAlphaImg = oSpan.filters(0).src
   if (currentAlphaImg.indexOf(strOver) != -1)
      oSpan.filters(0).src = currentAlphaImg.replace(strOver,strOff)
   else
      oSpan.filters(0).src = currentAlphaImg.replace(strOff,strOver)
}

function imgSwap(oImg)
{
   var strOver  = "a41e1e"    // image to be used with mouse over
   var strOff = "343209"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) 
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}
function imgSwap2(oImg)
{
   var strOver  = "_over"    // image to be used with mouse over
   var strOff = "_normal"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) 
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}



         
        
        var id = 0; 
        
        function showNoShow(myId, language) {
            
            id=myId;
            makeRequest('/navresourcelocal-'+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/sitemap_down.gif";
                document.images[imageName].alt = "open";
            } else {
                document.getElementById(divId).style.display="none";
                document.images[imageName].src= "/httpd/img/sitemap/sitemap_plus.gif";
                document.images[imageName].alt="closed";
            }
        }
        
    
	
		
            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=long&conquest-searchquery=" + "metadata:(" + document.fastsearch.query.value + ")^4 " + "url:(" + document.fastsearch.query.value + ")^3 " + "title:(" + document.fastsearch.query.value + ")^2 " + "contents:(" + document.fastsearch.query.value +")";
                    // abschickern
                    document.fastsearch.submit();
                }
            }
            
            function checkSearchValue() {
                if(document.getElementById('searchValue').value=='SUCHE') { 
                    document.getElementById('searchValue').value='';
                } else {
                    if(document.getElementById('searchValue').value=='') {
                        document.getElementById('searchValue').value='SUCHE';
                    }
                }
            }
        
	
	
        
            function setCookieVotingPoll(name){
                var cName = name;
                document.cookie =cName+'=true; expires=Fri, 6 Aug 2020 20:47:11 UTC; path=/';
            }
            
            function checkCookieVotingPoll(cookieName, idToHide, idToShow) {
                var theCookie=""+document.cookie;
                var ind=theCookie.indexOf(cookieName);
                if (ind==-1 || cookieName=="") return ""; 
                var ind1=theCookie.indexOf(';',ind);
                if (ind1==-1) ind1=theCookie.length;
                
                var cookieStatus = unescape(theCookie.substring(ind+cookieName.length+1,ind1));
                
                if(cookieStatus != '' && cookieStatus != null && cookieStatus != undefined){
                    $('#'+idToHide).hide();
                    $('#'+idToShow).show();
                }
                return;
            }
        
    

