function openSitemap()
{
popup = window.open('/i-apps/hm/webhm.nsf/export/sitemap.html/$file/sitemap.html','sitemap','height=400,width=400,scrollbars,resizable');
popup.focus();
}

function OpenNewWin1(onwurl)
{     
  w1fenster = open(onwurl,"Fenster1","width="+(screen.width-100)+",height="+(screen.height-100)+",screenX=50,screenY=10,scrollbars=yes"); 
  w1fenster.focus();   
} 
 
function OpenNewWin2(onwurl,onww,onwh,onwx,onwy)
{     
  w2fenster = open(onwurl,"Fenster2","width="+onww+",height="+onwh+",screenX="+onwx+",screenY="+onwy+",scrollbars=yes"); 
  w2fenster.focus();   
} 
 
function OpenNewWinJumli(onwurl,onww,onwh)
{     
  jumlifenster = open(onwurl,"FensterJumli","width="+onww+",height="+onwh); 
  jumlifenster.focus();   
}   
 
function OpenNewWin3(onwurl,onww,onwh,onwx,onwy)
{     
  w3fenster = open(onwurl,"Fenster3","width="+onww+",height="+onwh+",screenX="+onwx+",screenY="+onwy+",scrollbars=yes"); 
  w3fenster.focus();   
} 

function jump(jziel)
{ 
  if (parent.window.opener.location.href.indexOf("nav_top.html") != -1)
  {
    parent.window.opener.parent.frames[3].location.href = jziel; 
    self.focus(); 
  }
  else
  {
    frameopener_sm(jziel,'nav_links_0_0_0');
    self.close(); 
  }
}

function frameopener_sm(ziel,kat_soll)
{
  parent.window.opener.document.open();
  parent.window.opener.document.writeln("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/html4/frameset.dtd'>");
  parent.window.opener.document.writeln("<html>");
  parent.window.opener.document.writeln("<head>");
  parent.window.opener.document.writeln("<title>Kreditwerk Hypotheken-Management GmbH</title>");
  parent.window.opener.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-15'>");
  parent.window.opener.document.writeln("</head>");
  parent.window.opener.document.writeln("<frameset cols='*,798,*' border='0' frameborder='0' framespacing='0'>");
  parent.window.opener.document.writeln("<frame src='/leer_links.html' name='leer_links' scrolling='no' marginwidth='0' marginheight='0' noresize>");
  parent.window.opener.document.writeln("  <frameset rows='197,*' border='0' frameborder='0' framespacing='0'>");
  parent.window.opener.document.writeln("    <frame src='/nav_top.html' name='nav_top' scrolling='no' marginwidth='0' marginheight='0' noresize>");  
  parent.window.opener.document.writeln("    <frameset cols='250,*' border='0' frameborder='0' framespacing='0' noresize>");
  parent.window.opener.document.writeln("      <frame src='/nav_links.html' name='"+kat_soll+"' scrolling='no' marginwidth='0' marginheight='0' noresize>");
  parent.window.opener.document.writeln("      <frame src='"+ziel+"' name='main' marginwidth='0' marginheight='0' noresize>");
  parent.window.opener.document.writeln("    </frameset>"); 
  parent.window.opener.document.writeln("  </frameset>");
  parent.window.opener.document.writeln("  <frame src='/leer_rechts.html' name='leer_rechts' scrolling='no' marginwidth='0' marginheight='0' noresize>");
  parent.window.opener.document.writeln("</frameset>");
  parent.window.opener.document.writeln("");
  parent.window.opener.document.writeln("<noframes>");
  parent.window.opener.document.writeln("<strong>Leider unterst&uuml;tzt Ihr Browser keine Frames, Sie k&ouml;nnen die gew&uuml;nschten Informationen aber auch per e-mail bei uns anfordern, unter <a href='mailto:info@hypotheken-management.com'>info@hypotheken-management.com</a></strong><br /><br />");
  parent.window.opener.document.writeln("<a href='http://www.hypotheken-management.com'>Zur Homepage der Kreditwerk Hypotheken-Management GmbH</a>");
  parent.window.opener.document.writeln("</noframes>");
  parent.window.opener.document.writeln("</html>");
  parent.window.opener.document.close();
}

function frameopener(ziel,kat_soll)
{
  document.open();
  document.writeln("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/html4/frameset.dtd'>");  
  document.writeln("<html>");
  document.writeln("<head>");
  document.writeln("<title>Kreditwerk Hypotheken-Management GmbH</title>");
  document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-15'>");
  document.writeln("</head>");
  document.writeln("<frameset cols='*,798,*' border='0' frameborder='0' framespacing='0'>");
  document.writeln("<frame src='/leer_links.html' name='leer_links' scrolling='no' marginwidth='0' marginheight='0' noresize>");
  document.writeln("  <frameset rows='197,*' border='0' frameborder='0' framespacing='0'>");
  document.writeln("    <frame src='/nav_top.html' name='nav_top' scrolling='no' marginwidth='0' marginheight='0' noresize>");  
  document.writeln("    <frameset cols='250,*' border='0' frameborder='0' framespacing='0' noresize>");
  document.writeln("      <frame src='/nav_links.html' name='"+kat_soll+"' scrolling='no' marginwidth='0' marginheight='0' noresize>");
  document.writeln("      <frame src='"+ziel+"' name='main' marginwidth='0' marginheight='0' noresize>");
  document.writeln("    </frameset>"); 
  document.writeln("  </frameset>");
  document.writeln("  <frame src='/leer_rechts.html' name='leer_rechts' scrolling='no' marginwidth='0' marginheight='0' noresize>");  
  document.writeln("</frameset>");
  document.writeln("");
  document.writeln("<noframes>");
  document.writeln("<strong>Leider unterst&uuml;tzt Ihr Browser keine Frames, Sie k&ouml;nnen die gew&uuml;nschten Informationen aber auch per e-mail bei uns anfordern, unter <a href='mailto:info@hypotheken-management.com'>info@hypotheken-management.com</a></strong><br /><br />");
  document.writeln("<a href='http://www.hypotheken-management.com/'>Zur Homepage der Kreditwerk Hypotheken-Management GmbH</a>");
  document.writeln("</noframes>");
  document.writeln("</html>");
  document.close(); 
}

function checkIfIE5plus()
{
  var IE4     = false; // IE 4
  var IE5     = false; // IE 5
  var IE6     = false; // IE 6
  var IE4plus = false; // IE ab Version 4
  var IE5plus = false; // IE ab Version 5
  // IE 5
  if ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!= -1))
  {
    IE5 = true;
  }
  // IE 6
  if ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!= -1))
  {
  IE6 = true;
  }
  // IE ab Version 4
  if (document.all)
  {  
    IE4plus = true;
  }
   // IE ab Version 5
  IE5plus = IE5 || IE6;
  IEMajor = 0;
  if(IE4plus)
  {
    var start = navigator.appVersion.indexOf("MSIE");
    var end = navigator.appVersion.indexOf(".",start);
    IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
    if (IEMajor>=5)
    {
      IE5plus = true;
    }
    else
    {
      IE5plus = false;
    }
  }
  return IE5plus;
}

function gotoOnlinebewerbung()
{
  if(checkIfIE5plus())
  { 
    bewerbung = window.open("https://www.internet-kw.de:4431/scripts/wgate/zbw3/!?~okcode=WEIT&gesellschaft=Kreditwerk", "ZBW3", "toolbar=no, status=no, resizable=no, scrollbars=yes, menubar=no, height=620, width=720, left=80, top=50" );
  }
  else
  {
    bewerbung = window.open("http://www.hypotheken-management.com/i-apps/hm/webhm.nsf/docs/keine_onlinebewerbung_moeglich","Onlinebewerbung","width=600,height=320,screenX=0,screenY=0");
  }
  bewerbung.focus();
}

function writeBrowser()
{ 
  appName = navigator.appName;
  appVersion = navigator.appVersion.substring(0,navigator.appVersion.indexOf(" "));
  switch(appName)
  {
    case "Netscape":
    if (appVersion < 5.0)
    {
      printVersion = appVersion;
    }
    else
    {
      var start = navigator.userAgent.indexOf("Netscape");
      start = navigator.userAgent.indexOf("/",start) + 1;
      var end = navigator.userAgent.length;
      printVersion = navigator.userAgent.substring(start,end);
    }
    break;
    case "Microsoft Internet Explorer":
    var start = navigator.userAgent.indexOf("MSIE") + 5;
    var end = navigator.userAgent.indexOf(";",start);
    printVersion = parseInt(navigator.userAgent.substring(start,end));
    break;
    default:
    printVersion = appVersion;
    break;
  }
  browser = appName + " " + printVersion;
  document.write(browser); 
}

//setzt erst alle divs (parameter 'anzahldivs') hidden und dann den per parameter 'id' angegebenen div vissible
function showdiv(id, anzahldivs)
{
  for(i=1;i<(anzahldivs + 1);i++)
  {
    var element1 = document.getElementById(i);
    element1.style.visibility ="hidden";
  }
  var element = document.getElementById(id);
  element.style.visibility ="visible";
  window.scrollTo(0,0);
}