<!-- Scripting by m:com cologne -->

function openbeispiel(beispiel_id)
{  
	seite = 'openbeispiel.php?beispiel_id=' + beispiel_id;
	wshelp = window.open (seite, '','height=130,width=350,menubar=0,scrollbars=0');
}



var anzahlObj = 0;
function laden(name, erstes, zweites) {  
  if (browserOK) {     
    Bilder[anzahlObj] = new Array(3);
    Bilder[anzahlObj][0] = new Image();
    Bilder[anzahlObj][0].src = erstes;
    Bilder[anzahlObj][1] = new Image();
    Bilder[anzahlObj][1].src = zweites;
    Bilder[anzahlObj][2] = name;
    anzahlObj++;
  }
}

function an(name){
  if (browserOK) {
     appname = navigator.appName;
     if ((name.indexOf("snav") >= 0) && (appname.indexOf("Netscape") >= 0)) {
	   doc = document.snav.document; 
	   }
	 else {
	   doc = document; }  
     for (i = 0; i < anzahlObj; i++) {
      if (doc.images[Bilder[i][2]] != null)
        if (name != Bilder[i][2]) { 
          doc.images[Bilder[i][2]].src = Bilder[i][0].src;
        } else {
          doc.images[Bilder[i][2]].src = Bilder[i][1].src;
        }
    }
  }
}
function aus(name){
     appname = navigator.appName;
     if ((name.indexOf("snav") >= 0) && (appname.indexOf("Netscape") >= 0)) {
	   doc = document.snav.document; }
	 else {
	   doc = document; }  
  if (browserOK) {
     for (i = 0; i < anzahlObj; i++) {
      if (doc.images[Bilder[i][2]] != null) 
        doc.images[Bilder[i][2]].src = Bilder[i][0].src;
    }
  }
}

   function openexternal(page)
   {
		wshelp = window.open (page, 'Extlink','width=700,height=420,location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,screenY=80,screenX=80');
		wshelp.focus();
   }

   function selectpage(page){
  if (page != "") {
  parent.location.href="index.php?page_id=" + page;}
}


  function sendprodukt(prod,anw,lang)
{
seite = 'prodnotfound.php?prod=' + escape(prod) + '&lang=' + lang + '&anw_id=' + anw; 
wsopen=window.open(seite,'Fenster4','width=500,height=460')
wsopen.focus();
}


    function OpenPrint_static()
 {  
	seite = location.pathname;
	linkanf = seite.indexOf("page");
	if (linkanf == -1) {
	  linkanf = seite.indexOf("termin");
	}
	if (linkanf == -1) {
	  linkanf = seite.indexOf("news");
	}
	charnum = seite.length - linkanf + 1;
	seite = 'print_' + seite.substr(linkanf,charnum);
	wshelp = window.open (seite, 'Printfassung','height=620,width=500,menubar,scrollbars');
	wshelp.focus();
  }
  
  function open_prodpopup(organr,lang,operate)
  {
  seite= 'prodpopup.php?organr=' + organr +'&lang=' + lang + '&operate=' + operate;
  wshelp = window.open (seite, operate,'height=620,width=630,menubar,scrollbars');
  wshelp.focus();
  }

  function openenglish_static()
{
wsopen=window.open('englisch.htm','Fenster1','width=300,height=200')
wsopen.focus();
}

  function not_available(seite) 
  	{
		window.open(seite, 'Fenster2', 'width=300,height=220,scrollbars,screenY=80,screenX=80');  
	}
	
 function forgot_password(lang) 
  	{
	    seite = 'forgot_password.cfm?lang=' + lang;
		window.open(seite, 'Fenster3', 'width=300,height=200,scrollbars,screenY=80,screenX=80');  
	}

function selectanw()
   {
     if (document.anwselect.anw_id.options[document.anwselect.anw_id.selectedIndex]. value != "")
       document.anwselect.submit();
   }
  
function openpopup(page_id)
 {  
	seite = 'print.php?print=0&page_id=' + page_id;
	wshelp = window.open (seite, 'Printfassung','height=620,width=655,menubar,scrollbars');
	wshelp.focus();
  }
  
   
 function openpdf(organr,lang)
 {  
	seite = 'pdf/pdf_out/'+organr+'_'+lang+'.pdf';
	wshelp = window.open (seite, 'Printfassung','height=620,width=655,menubar,scrollbars');
	wshelp.focus();
	wshelp.print();
  }

function submitpage(page_id) {
    document.mainform.page_id.value = page_id;
	document.mainform.submit();
}

function do_operate(page_id,code,param,backlink) {
    document.mainform.page_id.value = page_id;
    document.mainform.operate.value = code;
    document.mainform.param.value = param;
	if(backlink.length > 0) {
		if(document.mainform.history.value.length > 0){
		   document.mainform.history.value = document.mainform.history.value + ":";
		 } 
	     document.mainform.history.value += backlink;
	 }
	document.mainform.submit();
}   

function go_back() {
  var backpages = document.mainform.history.value.split(":");
  if(backpages.length > 0) {
    document.mainform.history.value = "";
    for(i=0; i<backpages.length-1; i++) {
	  if(i>0) {
	    document.mainform.history.value += ":";
	  }	
	  document.mainform.history.value += backpages[i];
	}  
	backpage = backpages[backpages.length-1].split(";");
	//alert(backpage);
	//alert(document.mainform.history.value);
    document.mainform.page_id.value = backpage[0];
    document.mainform.operate.value = backpage[1];
    document.mainform.param.value = backpage[2];
	document.mainform.submit();
  } else {
    document.mainform.history.value = "";
    document.mainform.operate.value = "";
    document.mainform.param.value = "";
	document.mainform.submit();
  }
}

