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



	
  
        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;
        var sitemapDown;
        var sitemapPlus;
        
        function setSitemapImages(down, plus) {
            
            sitemapDown=down;
            sitemapPlus=plus;
        }
        
        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 = sitemapDown;   //"/httpd/img/sitemap_down.gif";
                document.images[imageName].alt = "open";
            } else {
                document.getElementById(divId).style.display="none";
                document.images[imageName].src=sitemapPlus;   //"/httpd/img/sitemap_plus.gif";
                document.images[imageName].alt="closed";
            }
        }
        
        function toggleCourse(divId) {
            if (document.getElementById(divId).style.display == "none") {
                document.getElementById(divId).style.display="block";
            } else {
                document.getElementById(divId).style.display="none";
            }
        }
        
       
   var request = false;
   try {
     request = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       request = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         request = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         request = false;
       }  
     }
   }
   
   var request2 = false;
   try {
     request2 = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       request2 = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         request2 = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         request2 = false;
       }  
     }
   }

   if (!request)
     alert("Error initializing XMLHttpRequest!");

   function getCustomerInfo() {
     var url = "/en/content.rewrite_xmlsession";
     request.open("GET", url, true);
     request.onreadystatechange = updatePage;
     request.send(null);
   }

   function updatePage() {
     //alert("Server is done!");
   }
        
        
        
        
        
	
	
		 

	function launchInPopup(courseid){
	    //default Wert fuer Verbindung
	    var connection = 'DSL';
	    if (document.connnectionForm){
	        connection = document.connnectionForm.connectionValue.value;
	    }
	    var url = "/courses/";
	    url += courseid;
	    url += "/index.html";
	    url += "?connection="+connection;
	    javascript:MM_openBrWindow(url, 'module', 'width=1005, height=702, left=0, top=0');
	}

	 
	
		  

	function launchInLmsPopup(coursid, sessionid, userid, language){
	    var agent = navigator.userAgent.toLowerCase(); 
		var name="Firefox/3.6";
		if (agent.indexOf(name.toLowerCase())>-1) {  
			for (var i = 0; i < navigator.plugins.length; i++) {
			if(navigator.plugins[i].name.search(/Platform SE/) != -1) {
					var name = navigator.plugins[i].name;
					var nameLength = navigator.plugins[i].name.length;
					var nameString = name.toString();
					if(nameLength == "25") {
						var teil = nameString.substr(24, 1);
					} else {
						var teil = nameString.substr(24, 2);
					}
					if(teil < 15) {
						alert("The module may not be able to open due to a configuration problem between your Firefox 3.6 version and a Java version older than Java 1.6 Update 15. To access the module please update your Java version here www.java.com.\n\nIf you do not wish to update your Java, you can access the module by using Internet Explorer.\n\nWe are sorry for any inconveniences.");
						return;
					}
				}
			}
		}
	    
	    //default Wert fuer Verbindung
	    var connection = 'DSL';
	    if (document.connnectionForm){
	        connection = document.connnectionForm.connectionValue.value;
	    }
	    var url = "/corelms/launch?";
	    url += "cid="+coursid;
	    url += "&sessionid="+sessionid;
	    url += "&userid="+userid;
	    url += "&connection="+language;
	    url += "&courseLanguage="+language;
	    javascript:MM_openBrWindow(url, 'module', 'width=1005, height=708, left=0, top=0');
	}
	
	function launchInLmsPopupWithAjax(coursid, sessionid, userid, language){
	    var agent = navigator.userAgent.toLowerCase(); 
		var name="Firefox/3.6";
		if (agent.indexOf(name.toLowerCase())>-1) {  
			for (var i = 0; i < navigator.plugins.length; i++) {
			if(navigator.plugins[i].name.search(/Platform SE/) != -1) {
					var name = navigator.plugins[i].name;
					var nameLength = navigator.plugins[i].name.length;
					var nameString = name.toString();
					if(nameLength == "25") {
						var teil = nameString.substr(24, 1);
					} else {
						var teil = nameString.substr(24, 2);
					}
					if(teil < 15) {
						alert("The module may not be able to open due to a configuration problem between your Firefox 3.6 version and a Java version older than Java 1.6 Update 15. To access the module please update your Java version here www.java.com.\n\nIf you do not wish to update your Java, you can access the module by using Internet Explorer.\n\nWe are sorry for any inconveniences.");
						return;
					}
				}
			}
		}
	    
	    var coursidVar = coursid;
	    var useridVar = userid;
	    var sessionidVar = 'test';
	    var url = "/courseregistration?courseid="+coursidVar+"&mandant=merckserono-cme&userid="+useridVar+"&register=true";
     	request.open("GET", url, true);
     	request.send(null);
     	request.onreadystatechange = function() { getSessionIdForRequest(coursidVar,useridVar, language); };
	}
	
	function getSessionIdForRequest(coursidVar,useridVar,language) {
		var coursidReq = coursidVar;
		var useridReq = useridVar;
		var url2 = "/corelms/servlet/usercourseinfo?mandant=merckserono-cme&userid="+useridReq+"&courseid="+coursidReq+"&showall=true";
     	
     	request2.open("GET", url2, true);
     	request2.send(null);
     	request2.onreadystatechange = function() { requestElements(coursidReq,useridReq,language); };
     	
	}
	
     function requestElements(courseid,userid,language) {
      var courseIdReqCl = courseid;
      var userIdReqCl = userid;
      if (request2.readyState == 4) {
     	if(request2.status!=200) {
          //alert('fehler');
        }else{
           xml = request2.responseXML;
           //alert(request2.responseText);
	       var max = xml.getElementsByTagName("courses")[0].getElementsByTagName("course")[0].getElementsByTagName("sessionid")[0];
	       var sessionId = max.firstChild.nodeValue;
	       launchInLmsPopup(courseIdReqCl, sessionId, userIdReqCl, language);
         }
       }
     }
     

	 
	
		 
		
		function changeDropDown(id, wert) {
		
		if (wert=="arzt") {
			enableDropDown(id);
		} else {
			disableDropDown(id);
		}
			 
		}
		
		function disableDropDown(id){		
			document.getElementById(id).disabled = true;
		}
		
		function enableDropDown(id) {
			document.getElementById(id).disabled = false;
		}
		
	
	
		
			
		var breite, hoehe;
		var tempX = 0;
		var tempY = 0;
		var IE = document.all?true:false
		
		
		if (!IE) document.captureEvents(Event.MOUSEMOVE)
		
		document.onmousemove = getMouseXY;
		
		
		function getMouseXY(e) {
		  if (IE) { // grab the x-y pos.s if browser is IE
		  	myDiv = document.getElementById("container_content");
		    tempX = event.clientX;
		    tempY = event.clientY;
		  } else {  // grab the x-y pos.s if browser is NS
		    tempX = e.pageX;
		    tempY = e.pageY;
		  }  
		  return true
		}
		
		
		function zeigen(idname,linker) {
			if(document.getElementById(idname)) {
			    if (!IE) {
					
				    document.getElementById(idname).style.left = (tempX + 40) + "px";
				    document.getElementById(idname).style.top = (tempY - 20)  + "px";
				  
			    } else { 
				
				   document.getElementById(idname).style.left = tempX + 40;
				   document.getElementById(idname).style.top = tempY - 20;
				    
				    //alert(document.getElementById(idname).style.top);
				     
				}
		    }
		    
		    document.getElementById(idname).style.visibility = "visible";
			document.getElementById(idname).style.display = "block";
		}
		
		function verstecken(idname) {
			if (IE) document.all[idname].style.visibility = "hidden"; 
			if (IE) document.getElementById(idname).style.display = "none"; 
			if (!IE) document.getElementById(idname).style.visibility = "hidden";
			if (!IE) document.all[idname].style.display = "none";
		}
					
		
	
	
		
		function professionChanged(prof) {
			
			if (prof=='arzt') {
				document.getElementById('sandoz_yob_div').style.display = "none";
				document.getElementById('sandoz_efn_div').style.display = "block";
			} else {
				document.getElementById('sandoz_efn_div').style.display = "none";
				document.getElementById('sandoz_yob_div').style.display = "block";
			}
		}
		
	
	
		
			function checkEmptyTextarea (textAreaValue) {
                var textAreaValue = textAreaValue.length;
                if(textAreaValue == 1) {
                    document.getElementById('anfragetext').value = '';
                }
            }
		
            function checkDisclaimer () {
                var success1 = false;
                var success2 = false;
                var passwort = document.getElementsByName('passwd')[0].value;
                var passwort_length = passwort.length;
                if (passwort.length >= '5') {
                    success1 = true;
                    document.getElementById('validation_checkbox_errormsg_pw').style.display = 'none';
                } else {
                    document.getElementById('validation_checkbox_errormsg_pw').style.display = 'block';
                }
                if (document.getElementsByName('validation_checkbox')[0].checked == true) {
                    success2 = true;
                    document.getElementById('validation_checkbox_errormsg').style.display = 'none';
                } else {
                    document.getElementById('validation_checkbox_errormsg').style.display = 'block';
                }
                if (success1 == true && success2 == true) {
                    document.forms[0].submit();
                }
            }
            
            function checkPPBtn(compareString) {            	
            	var professionIndex = document.forms[0].profession.selectedIndex;
            	if(professionIndex == '0') {
            		professionIndex = 'employee';
            	} else {
            		professionIndex = 'self-employed';
            	}
            	document.getElementsByName("custom")[0].value = compareString + '_profession-' + professionIndex;
            }
            
            function checkSKLink(userId) {
            	var skLink = 'http://testsystem.sparkassen-internetkasse.de/vbv/mpi_legacy?amount=';
            	if(document.test.os0.selectedIndex == '0') {
	            	var checkSha = calcHMAC('20,00sslformEURenjuwi_'+userId+'creditcardjuwimacsslauthorization', 'startssl', 'ASCII', 'ASCII', 'SHA-1');
	            	// LIVE-DATEN
	            	//var checkSha = calcHMAC('500,00sslformEURenjuwi_'+userId+'creditcardjuwimacsslauthorization', 'startssl', 'ASCII', 'ASCII', 'SHA-1');
	            	
	            	skLink += '20,00&command=sslform&currency=EUR&locale=en&orderid=juwi_'+userId+'&paymentmethod=creditcard&sslmerchant=juwimacssl&transactiontype=authorization&mac='+checkSha;
	            	// LIVE-DATEN
	            	//skLink += '500,00&command=sslform&currency=EUR&locale=en&orderid=juwi_'+userId+'&paymentmethod=creditcard&sslmerchant=juwimacssl&transactiontype=authorization&mac='+checkSha;
            	} else {
	            	var checkSha = calcHMAC('10,00sslformEURenjuwi_'+userId+'creditcardjuwimacsslauthorization', 'startssl', 'ASCII', 'ASCII', 'SHA-1');
	            	// LIVE-DATEN
	            	//var checkSha = calcHMAC('800,00sslformEURenjuwi_'+userId+'creditcardjuwimacsslauthorization', 'startssl', 'ASCII', 'ASCII', 'SHA-1');
	            	
            		skLink += '10,00&command=sslform&currency=EUR&locale=en&orderid=juwi_'+userId+'&paymentmethod=creditcard&sslmerchant=juwimacssl&transactiontype=authorization&mac='+checkSha;
					//LIVE-DATEN
            		//skLink += '800,00&command=sslform&currency=EUR&locale=en&orderid=juwi_'+userId+'&paymentmethod=creditcard&sslmerchant=juwimacssl&transactiontype=authorization&mac='+checkSha;
            	}
            	document.getElementById('sp_link').href = skLink;
            }
        
	
	
		
			function toggleExtraInputField(toggleValue, currentValue, extraInputFieldId) {
				var toggleValue 		= toggleValue;
				var currentValue	 	= currentValue;
				var extraInputFieldId 	= extraInputFieldId;
				
				if(toggleValue == currentValue) {
					document.getElementById(extraInputFieldId).style.display = 'block';
				} else {
					document.getElementById(extraInputFieldId).style.display = 'none';
				}
			}
			
			function toggleExtraInputFieldWithTwoItems(toggleValue, toggleValueTwo, currentValue, extraInputFieldId) {
				var toggleValue 		= toggleValue;
				var toggleValueTwo 		= toggleValueTwo;
				var currentValue	 	= currentValue;
				var extraInputFieldId 	= extraInputFieldId;
				
				if(toggleValue == currentValue || toggleValueTwo == currentValue) {
					document.getElementById(extraInputFieldId).style.display = 'block';
				} else {
					document.getElementById(extraInputFieldId).style.display = 'none';
				}
			}
			
			function checkFeedbackForm(q1_value, form) {
				var url = window.location.href;
				url = url.replace('#', '')
			
				if(q1_value == '') {
					document.getElementById('q1_error').style.display = 'block';
					window.location.href = url+'#';
				} else {
					document.getElementById('q1_error').style.display = 'none';
					form.submit();
				}
			}
			
			function validateFeedbackWidget(checkWidget, toggleValue, layerToOpen){
				for(var i=0; i<checkWidget.length; i++){
					if(checkWidget[i].checked){
						var checkWidgetValue = checkWidget[i].value;
					}
				}
				if(checkWidgetValue == toggleValue){
					document.getElementById(layerToOpen).style.display = 'block';
				} else {
					document.getElementById(layerToOpen).style.display = 'none';
				}
			}
		
	

