var menuPage = "index.htm";   //<! The file of the menu entry page
var menuPath = "";          //<! The path where to find der menu entry page
var folder = "";          
var sub = "";
var lng = "";         
//////////////////////////////////////////////////////
// Checks how and where to find the menu entry page.

function checkforframes()
{
  if ("searchoutput" == frames.name) {} else {
  if ((top != self.parent) || (top == self)) 
  {
    var pathtmp = window.location.href;
    for (var i = 1; i < 20; i++) 
    {
      var filepath = pathtmp;
      var fldend = filepath.lastIndexOf("/");
      var fldtmp = filepath.substring(0,fldend);
      var fldstart = fldtmp.lastIndexOf("/")+1;
      sub = filepath.substring(fldstart,fldend+1);
         
      if (sub == "appendix1/" ||
	       	  sub == "bugmng/" || 
	       	  sub == "contact/" ||
	       	  sub == "glossary/" ||
	       	  sub == "lic/" ||
	       	  sub == "overview/" ||
	       	  sub == "support/" ||
	       	  sub == "toc/" ||
	       	  sub == "textbook/" ||
	       	  sub == "videothek/" ||
	       	  sub == "products/" ||
      	  sub == "AppsWH/" || sub == "AppsWh/" || 
	       	  sub == "ASC/" ||
	       	  sub == "cxoffice/" ||
	       	  sub == "icons/" ||
	       	  sub == "kd/" ||
	       	  sub == "Radowitz/" ||
	       	  sub == "Saacke/" ||
	       	  sub == "schierholz/" ||
	       	  sub == "Transnorm/" ||
      	  sub == "CyberEnterprise/" || 
      	  sub == "Error/" || 
      	  sub == "InstantView/" || 
      	  sub == "techdocu/" ||       	  
        	  sub == "admin/" || 
        	  sub == "Configuration/" ||       	  
        	  sub == "Installation/" || 
        	  sub == "training/" ||
        	  sub == "mpg/" ||
        	  sub == "ObjectStore/" ||
        	  sub == "iweb/" ||
      	  sub == "de/" ||      	  
      	  sub == "en/") 
      	  break;
      var pathtmp = filepath.substring(0,fldstart);
      var filepath = pathtmp;
      menuPath = menuPath + "../";
      folder = sub + folder;
    }
    var thispage = folder + location.href.substring(location.href.lastIndexOf("/")+1);

    if (location.href.indexOf("FrontPage") != -1)
    {	// FrontPage 2000 cannot preview this script
    } 
    else
    {
      if (thispage != menuPage) 
      {
	top.location.replace(menuPath+menuPage+'?'+thispage);
      } else { top.location.replace(menuPath+menuPage); }
    }
  }}
  self.focus(); 
}


function checkpath()
{
  if ("searchoutput" == frames.name) {} else {
  if ((top != self.parent) || (top == self)) 
  {
    var pathtmp = window.location.href;
    if (pathtmp.indexOf("?") != -1) 
       {var pathcut = (pathtmp.indexOf("?"));
        var pathtmp = pathtmp.substring(0,pathcut);
       }
    else {var pathtmp = window.location.href;}
    for (var i = 1; i < 20; i++) 
    {
      var filepath = pathtmp;
      var fldend = filepath.lastIndexOf("/");
      var fldtmp = filepath.substring(0,fldend);
      var fldstart = fldtmp.lastIndexOf("/")+1;
      sub = filepath.substring(fldstart,fldend+1);
         
      if (sub == "de/" || sub == "DE/" || sub == "en/" || sub == "EN/") 
      	  break;
      var pathtmp = filepath.substring(0,fldstart);
      var filepath = pathtmp;
      menuPath = menuPath + "../";
      folder = sub + folder;
    }
  }}
}

function loadframes(cxweb){
  var test = (document.URL >= 0) ? true : false;
  var parameter = new Array();
  var posquery  = (location.href.indexOf("?")+1);
  var mainpage  = 'body.htm';
  var topnav    = 'appendix/top.htm';
  var bottomnav = 'appendix/bottom.htm';
  var leftnav   = 'index.htm';
  if (cxweb == "www") topnav = 'appendix/web/top_www.htm';
  if (cxweb == "tec") mainpage = 'body-tec.htm';
  if (cxweb == "glos") mainpage = 'glossar.htm';
  if (cxweb == "icon") mainpage = 'iconscx.htm';
  checkpath();


  if (posquery){
      mainpage     = location.href.substring(posquery);
  }

  with (document) {
    write('<frameset rows="76,*,25" frameborder="0" framespacing="0" border="0" bordersize="0" bordercolor="black">');
    write('<frame src=' + menuPath + topnav + ' id="banner" name="banner" noresize="noresize" scrolling="no" marginwidth="0" marginheight="0" target="_top" />');
    write('<frameset id="Fenster1" cols="250,*" frameborder="1" framespacing="3" border="1" bordersize="1" bordercolor="#C0C0C0">');
    write('<frame src="wait.htm" id="idMenuFrm" name="idMenuFrm" scrolling="auto" marginwidth="0" marginheight="0" />');
    write('<frame src=' + mainpage +' id="main" name="main" scrolling="auto" marginwidth="10" marginheight="5" target="_self" />');
    write('</frameset>');
    write('<frame src=' + menuPath + bottomnav + ' id="down" name="down" noresize="noresize" scrolling="no" marginwidth="0" marginheight="0" target="_top" />');
    write('<noframes>');
    write('<body>');
    write('<p>Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht unterstützt.</p>');
    write('<p>Wir empfehlen den Microsoft Internet Explorer ab Version 4 oder einen vergleichbaren Browser zu benutzen.</p>');
    write('</body>');
    write('</noframes>');
    write('</frameset>');
  }
}



