inc_art='';
inc_noframe=window.location.search.indexOf("noframeset=ja");
inc_close=window.location.search.indexOf("closewindow=ja");
kein_menu="";
url_ganz=window.location.href.toLowerCase();
if (inc_noframe==-1 && inc_close==-1){
   inc_back = new Image();
   inc_back.src = "bilder/back_leer.gif";
   if (kein_menu != "ja")
      inc_weiter();
}  

if (inc_close>0){
    inc_back = new Image(); 
    if (window.location.search.indexOf("sprache=eng")==-1)
       inc_back.src = "bilder/close_deu.gif";
    else
       inc_back.src = "bilder/close_eng.gif";
    layer_hide();
    inc_art='closewindow';
    changeLinks(inc_art);
  } 

if (inc_noframe>0){
  inc_art='noframeset';
  changeLinks(inc_art);
}

if ((parent.control) && (parent.control.frame_gel==1)) {
  parent.control.check_all(0);
}

if ((parent.tabs) && (parent.tabs.frame_gel==1)) {
  parent.tabs.check_all(0);
}

function oben_alles(ereignis) {
  if (parent.oben) {
    if ((parent.frames.length>1) && (parent.oben.frame_gel==1) && (ereignis.pageY>20)) {
      parent.oben.alles();
    }
  }
  else
  if (parent.parent.oben) {
    if ((parent.parent.frames.length>1) && (parent.parent.oben.frame_gel==1) && (ereignis.pageY>20)) {
      parent.parent.oben.alles();
    }
  }
}  

function changeLinks(inc_art) {
  if (window.document.images["back_link"]){
     for(count=0;count<window.document.links.length;count++) {
        vers=navigator.appVersion.substring(0,1);
        endung_anf=window.document.links[count].pathname.lastIndexOf('.')+1;
        endung_ende=window.document.links[count].pathname.length;
        endung=window.document.links[count].pathname.substring(endung_anf,endung_ende);
        if(endung.indexOf('SSL') != -1){
          endung_ende=endung.lastIndexOf(':');
          endung=endung.substring(0,endung_ende);
        }    
        if (((endung=="htm") || (endung=="html") || (endung=="dml") || (endung=="php")) && (vers != "1") && (vers != "2") && (vers != "3") && (window.document.links[count].href.indexOf('javascript')==-1)) {
           if (window.document.links[count].href.indexOf("#") > 0){ 
              url=window.document.links[count].href.substring(0,window.document.links[count].href.indexOf("#"));
              anc=window.document.links[count].href.substring(window.document.links[count].href.indexOf("#"),window.document.links[count].href.length);
           }
           else{
              url=window.document.links[count].href;
              anc='';
           }
           if (window.document.links[count].href.indexOf('?')!=-1)
              window.document.links[count].href=url+"&"+inc_art+"=ja"+anc
           else
              window.document.links[count].href=url+"?"+inc_art+"=ja"+anc
        }
    }
    if (inc_art=="closewindow")
       window.document.links[window.document.links.length-1].href='javascript:self.close()';
  }
  else
    window.setTimeout("changeLinks('"+inc_art+"')",500);
}

function inc_weiter(){
   vers=navigator.appVersion.substring(0,1);
   url_os_prod=""
   if ((vers != "1") && (vers != "2") && (vers != "3")) {
      if (window.location.href.indexOf("optiscout.de") >= 0)
         site="optiscout.de";
      else
         site="optiscout.com";
      id=-1 ;
      if(window.location.pathname.lastIndexOf('m/s/') != -1){
        pfad_oben="/m/s/index.dml?unten=";
        if(window.location.pathname.lastIndexOf('cgi/m/s/') != -1)
          pfad_u=window.location.pathname.slice(0);
        else
          pfad_u=window.location.pathname.slice(5);
      }
      else{
        pfad_oben="/index.dml?unten=";
        pfad_u=window.location.pathname.slice(1);
        if ((pfad_u.indexOf("produkte/") != -1) && (pfad_u.indexOf("~") != -1)) {
           seite_pfad=pfad_u.split("/");
           if (seite_pfad[1].indexOf(".") >= 0)
              seite=seite_pfad[1];
           else
              seite=seite_pfad[2];
           product_params=seite.split("~");
           product=product_params[0];
           url_os_prod="&product="+product+"&show="+seite;
           pfad_oben="/produkte/index.dml?unten=";
        }
      }
      id='-1';
      if (pfad_u == "uebersicht.dml"){
          parameter=window.location.search;
          pos1=parameter.indexOf("menue_id=");
          pos1=pos1+9;
          parameter=parameter.slice(pos1);
          pos2=parameter.indexOf("&");
          id=parameter.slice(0,pos2);
      }
           parameter1='&';
      parameter2=window.location.search.slice(1);
      if (parameter2!='')
         allepara=parameter1.concat(parameter2); 
      else
         allepara='';
      if ((pfad_u.indexOf("produkte/") != -1) && ((pfad_u.indexOf("options.dml") != -1) || (pfad_u.indexOf("produktVergleich.php") != -1) || (pfad_u.indexOf("doku-systemAnzeige.php") != -1) || (pfad_u.indexOf("produktBeschreibung.php") != -1))) {
         seite_pfad=pfad_u.split("/");
         if (seite_pfad[1].indexOf(".") >= 0)
            seite=seite_pfad[1];
         else
            seite=seite_pfad[2];
         product_params=allepara.split("software=");
         product_param=product_params[1].split("&");
         product=product_param[0]
         url_os_prod="&product="+product+"&show="+seite;
         pfad_oben="/produkte/index.dml?unten=";
      }
      if (top.frames.length<=2){
         if (document.referrer == "")
            abs_url="http://www."+site;
         else
            abs_url="";
         window.location.href=abs_url+pfad_oben+pfad_u+url_os_prod+"&von=html"+allepara+window.location.hash;
      }
      else{
         window.setTimeout("frame_set()",500);
      }
   }
          
      
   vers=navigator.appVersion.substring(0,1);
   if ((vers != "1") && (vers != "2") && (vers != "3")) {
              if ((navigator.appName == 'Netscape') && (parent.frames.length>1)) {
                 document.captureEvents(Event.MOUSEMOVE);
                 document.onmousemove = oben_alles;
              }
     if ((navigator.userAgent.indexOf("Netscape6")==-1) && ((navigator.appVersion>"4.6") || (navigator.appName!="Netscape")) && (top.frames.length>2) && (top.oben.frame_gel==1)){ 
        // Fehler abfangen in Internet Explorer und kompatiblen
//       window.onerror=top.oben.ErrorFunction_unten;
       // Fehler abfangen in Netscape und kompatiblen
//       window.onError=top.oben.ErrorFunction_unten;
         }
       }
}  
function frame_set(){
     if ((top.frames.length>2) && (top.oben.frame_gel==1)){
     layer_hide();
          top.oben.pfad_unten(id);
     } 
     else{
        window.setTimeout("frame_set()",500);
     }
}
  
function layer_hide(){
   if (window.document.images["back_link"])
       window.document.images["back_link"].src = inc_back.src;
   else
       window.setTimeout("layer_hide()",500);
}

