function onLoadSetBaseURLParameters(pagePath)
{
	  var siemensNixdorfBasePath = "http://www.wincor-nixdorf.com/static/finanzberichte/2005-2006";

    // *** set the sendthispage base URL to the proper URL of this page
    var sendthispageElem = document.getElementById("sendthispage");
    if (sendthispageElem && !window.location.protocol.match(/^File/i)) {
    	  var siemensNixdorfBasePathRegEx  = siemensNixdorfBasePath.replace(/\//g, "\\/");
        eval("sendthispageElem.href = sendthispageElem.href.replace(/" + siemensNixdorfBasePathRegEx + "[^&]*/, window.location.href);" );
    }


    // *** calculate base URL path of the page    
    var basePath = String(window.location.href);
    basePath = basePath.replace(/\.html?/, "");
    
    if (pagePath && (typeof(pagePath) == "string") && pagePath != "/") {
    	  pagePath = pagePath.replace(/^\s+/, "");
    	  pagePath = pagePath.replace(/\s+$/, "");
    	  pagePath = pagePath.replace(/\//g, "\\/")
        eval("basePath = basePath.replace(/" + pagePath + "/gi, \"\");");
    }
    
    // *** set the search parameter
    var searchPathParam = document.getElementById("searchBaseDir");
    if (searchPathParam && basePath && basePath.length > 0) {
    	  searchPathParam.value = basePath;
    }   
}


function onSubmitSearch(searchForm)
{

  if (window.location.href.match(/iedit.geber.at/))
    return;
    
  var w = 700;
  var h = 430;
  
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+10;

  // redirect target of the search form to it
  if (searchForm)
  {
      try {
          var targetWindowName = "searchresultpopup" + String(Math.round(Math.random()*99999));

          try { searchForm.target = targetWindowName; }
          catch (ex) {}

          if (searchForm.target.charAt(0) != "_")
          {
              var popUpWindow = window.open('', searchForm.target, 'resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
              popUpWindow.resizeTo(w, h);
              popUpWindow.focus();
          }
      } catch (e) {}
  }

}
