//function for detecting the suffix for the downloading document///
function getSuffix(docName) {
     LengthName = docName .indexOf(".");
   //alert("gefunden bei Position: " + Suche);
     Suffix = docName.slice(LengthName +1,LengthName + 5);
     document.write (Suffix);
   //alert(Suffix);
}
//////////////////////////////////////////////////////////////////
//function for opening Popup for Image Zoom in Photo-Gallery//////
function openImageZoom(url,xwidth,yheight){
      
 var window_x    = parseInt(xwidth)+25;
 var window_y    = parseInt(yheight)+25;  
   
   var window_properties ="width=" + window_x + ", height=" + window_y + ",menubar=yes,resizable=yes,scrollbars=yes";
   var win = window.open(url,"Image",window_properties);
}
/////////////////////////////////////////////////////////////////
//function for opening Popup Infopage ///////////////////////////
function openImageZoom(url){
   var window_properties ="width=670, height=430,menubar=yes,resizable=yes,scrollbars=yes";
   var win = window.open(url,"Info",window_properties);
}
//////////////////////////////////////////////////////////////////

//function for replacing link to Document in restricted directories if Document is linked over text-editor
function getHref(href,x){
  //document.getElementById(x).href =window.location.href;
  document.getElementById(x).href ="#";
  var window_properties ="width=400, height=300,menubar=yes,resizable=yes,scrollbars=no";
  window.open(href,"Info",window_properties);
}

//function for open the acoustic calculator
function OpenAcousticsCalculator(sLanguage) {
    if(sLanguage=="de") {
        content = '<applet archive="RaumakustikApplet.jar" codebase="http://www.hunecke.de/java/raumakustik/" code="RaumakustikApplet.class" width="832" height="1109"><param name="user" value="eurofoam"><param name="sprache" value="de"><param name="land" value=""><param name="image" value="loading.png"><param name="boxborder" value="false">Der Rechner kann leider nicht angezeigt werden, da Ihnen entweder das Java Plug-in fehlt oder Java in Ihrem Browser deaktiviert wurde.<br /><br />Hilfe und weitere Informationen finden Sie auf <a href="http://www.hunecke.de/de/hilfe">www.hunecke.de</a>.</applet>';
    } else {
        content = '<applet archive="RaumakustikApplet.jar" codebase="http://www.hunecke.de/java/raumakustik/ " code="RaumakustikApplet.class" width="832" height="1109"><param name="user" value="eurofoam"><param name="sprache" value="en"><param name="land" value=""><param name="image" value="loading.png"><param name="boxborder" value="false">The calculator is not displayed, because there is no Java plug-in or Java is disabled.<br /><br />You will find help and further information at <a href="http://www.hunecke.de/en/help">www.hunecke.de<a>.</applet>';
    }
    oCalculatorWindow=window.open('','acousticCalculator',
        'width=860,height=609'
        +',menubar=0'
           +',toolbar=1'
           +',status=0'
           +',scrollbars=1'
           +',resizable=1')
    oCalculatorWindow.document.writeln(
          '<html><head><!-- PageID 221 - published by RedDot 7.5 - 7.5.1.75 - 23866 --><title>Akkustik Rechner</title></head>'
           +'<body bgcolor=white onLoad="self.focus()">'
           +content
           +'</body></html>'
     )
    
    oCalculatorWindow.document.close()
}