inc_art='';
inc_noframe=window.location.search.indexOf("noframeset=ja");
inc_close=window.location.search.indexOf("closewindow=ja");
if (window.location.href.indexOf("/auftrag/anzeigen.dml") > 0) {
   inc_noframe=-1;
   inc_close=-1;
}   

kein_menu="";
url_ganz=window.location.href.toLowerCase();
if ((url_ganz.indexOf("/gutschein.") >= 0) || (url_ganz.indexOf("/voucher.") >= 0) || (url_ganz.indexOf(".gutschein.") >= 0) || (url_ganz.indexOf(".voucher.") >= 0))
   kein_menu="ja";
if ((url_ganz.indexOf("/partner.") >= 0) || (url_ganz.indexOf(".partner.") >= 0))
   kein_menu="ja";
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);
}

function oben_alles(ereignis) {
  if (parent.oben) {
    if ((parent.frames.length>1) && (parent.oben.frame_gel==1) && (ereignis.pageY>50)) {
      parent.oben.alles();
    }
  }
  else
  if (parent.parent.oben) {
    if ((parent.parent.frames.length>1) && (parent.parent.oben.frame_gel==1) && (ereignis.pageY>50)) {
      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);
	if ((vers != "1") && (vers != "2") && (vers != "3")) {
	   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(window.location.pathname.lastIndexOf('dienst') != -1 || window.location.pathname.lastIndexOf('produkte') != -1){
	      if(window.location.pathname.lastIndexOf('dienst') != -1)
	         pfad_u="dienst/index.dml";
	      else
	         pfad_u="produkte/index.dml";
	   }
	   */
	   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 (top.frames.length<=2){
	      window.location.href=pfad_oben+pfad_u+"&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") || (navigator.appName == "Opera")) && (top.frames.length>1) && (top.oben.frame_gel==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);
   if (window.location.search.indexOf("focus=ja") > 0)
      self.focus();
}


