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

	
  
	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 fastSearch (path) {
    //if wenn kein Suchbegriff, dann keine Suche
    if (document.fastsearch.query.value=="") {
       return;
    }
    else {
        // Suchstring basteln
        document.fastsearch.action ="/deutsch/"+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 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();
            }
}



	

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


	
	
	
  
        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";
            }
        }
        
    
	
        
            var spamSpanMainClass		= 'spamspan';
            var spamSpanUserClass		= 'u';
            var spamSpanDomainClass		= 'd';
            var spamSpanAnchorTextClass = 't';
            var spamSpanParams			= new Array('subject', 'body');
            
            addEvent(window, 'load', spamSpan);
            
            function spamSpan() {
                var allSpamSpans = getElementsByClass(spamSpanMainClass, document, 'span');
                for (var i = 0; i < allSpamSpans.length; i++) {
                    // get data
                    var user = getSpanValue(spamSpanUserClass, allSpamSpans[i]);
                    var domain = getSpanValue(spamSpanDomainClass, allSpamSpans[i]);
                    var anchorText = getSpanValue(spamSpanAnchorTextClass, allSpamSpans[i]);
                    // prepare parameter data
                    var paramValues = new Array();
                    for (var j = 0; j < spamSpanParams.length; j++) {
                        var paramSpanValue = getSpanValue(spamSpanParams[j], allSpamSpans[i]);
                        if (paramSpanValue) {
                            paramValues.push(spamSpanParams[j] + '=' +
                            encodeURIComponent(paramSpanValue));
                        }
                    }
                    // create new anchor tag
                    var at = String.fromCharCode(32*2);
                    var email = cleanSpan(user) + at + cleanSpan(domain);
                    var anchorTagText = document.createTextNode(anchorText ? anchorText : email);
                    var mto = String.fromCharCode(109,97,105,108,116,111,58);
                    var hrefAttr = mto + email;
                    hrefAttr += paramValues.length ? '?' + paramValues.join('&') : '';
                    var anchorTag = document.createElement('a');
                    anchorTag.className = spamSpanMainClass;
                    anchorTag.setAttribute('href', hrefAttr);
                    anchorTag.appendChild(anchorTagText);
                    // replace the span with anchor
                    allSpamSpans[i].parentNode.replaceChild(anchorTag, allSpamSpans[i]);
                }
            }
            
            function getElementsByClass(searchClass, scope, tag) {
                var classElements = new Array();
                if (scope == null) node = document;
                if (tag == null) tag = '*';
                var els = scope.getElementsByTagName(tag);
                var elsLen = els.length;
                var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)");
                for (var i = 0, j = 0; i < elsLen; i++) {
                    if ( pattern.test(els[i].className) ) {
                        classElements[j] = els[i];
                        j++;
                    }
                }
                return classElements;
            }
            
            function getSpanValue(searchClass, scope) {
                var span = getElementsByClass(searchClass, scope, 'span');
                if (span[0]) {
                    return span[0].firstChild.nodeValue;
                } else {
                    return false;
                }
            }
            
            function cleanSpan(string) {
                // string = string.replace(//g, '');
                // replace variations of [dot] with .
                string = string.replace(/[\[\(\{]?[dD][oO0][tT][\}\)\]]?/g, '.');
                // replace spaces with nothing
                string = string.replace(/\s+/g, '');
                return string;
            }
            
            // http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html
            function addEvent(obj, type, fn) {
                if (obj.addEventListener)
                    obj.addEventListener(type, fn, false);
                else if (obj.attachEvent)
                {
                    obj['e' + type + fn] = fn;
                    obj[type + fn] = function() { obj['e' + type + fn](window.event); }
                    obj.attachEvent('on' + type, obj[type + fn]);
                }
            }
        
    
