<!--
function WFormat(tmp) {

   while(tmp.indexOf(".")>=0) {
      tmp = tmp.replace(".","");
   };

   if(tmp.indexOf(",")<0) {
      len = tmp.length;
      if(len>9) {tmp = tmp.substring(0,len-9)+"."+tmp.substring(len-9,len);len++;}
      if(len>6) {tmp = tmp.substring(0,len-6)+"."+tmp.substring(len-6,len);len++;}
      if(len>3) {tmp = tmp.substring(0,len-3)+"."+tmp.substring(len-3,len);len++;}
   }

        return tmp;
}

function formatinput(obj) {

   obj.value = WFormat(obj.value);

   return true;
}
function checkinput(obj) {
   var chkZ=1;

   if(obj.value.length==0) obj.value = '0';

   for(i=0;i<obj.value.length;++i)
     if((obj.value.charAt(i) < "0" || obj.value.charAt(i) > "9")
         && obj.value.charAt(i) != ","
         && obj.value.charAt(i) != ".") chkZ = -1;

   if(chkZ == -1) {
      document.forms[0].elements[obj.name].focus();
      document.forms[0].elements[obj.name].select();
      alert("Nur Zahlen erlaubt!");
      return false;
   }

   formatinput(obj);

   return true;
}

function popup (seitenname, breite, hoehe) {
   window.open(seitenname,"Popupfenster","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,height="+hoehe+",width="+breite+"");
}

function lolite(txt, cn) {
   var div = document.getElementById(txt);

   div.className=cn;
   div.style.backgroundColor="#eeeeee";

//   document.all[txt].style.backgroundColor="#eeeeee";
//   document.all[txt].className=cn;
}
function hilite(txt, cn) {

   var div = document.getElementById(txt);

   div.className=cn;
   div.style.backgroundColor="#72a0cf";

//   document.all[txt].style.backgroundColor="#72a0cf";
//   document.all[txt].className=cn;
}
function goURL(txt) {
   window.location.href = txt;
}
function winopen(txt) {
   window.open (txt,"Diagramm","menubar=no,scrollbars=no,width=440,height=320","")
}
function Download(txt) {

        if(txt.indexOf(".exe")>=0 | txt.indexOf(".zip")>=0 | txt.indexOf(".tar.gz")>=0 | txt.indexOf(".tar")>=0 | txt.lastIndexOf("/")==txt.length-1)
                window.location.href = txt;
        else
        window.open (txt,"Download","menubar=no,scrollbars=auto,resizable=yes,width=440,height=320","")
}

function openPicture(url) {	
   window.open(url,'samplewindow','width=1100,height=780,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,directories=no');
}

function getCurrentBrowser() {
	if(document.ids)x='nc4';
	else if( document.all && !document.getElementById )x='ie4';
	else if( window.opera && !document.createElement )x='op5';
	else if( window.opera && window.getComputedStyle )  {
          if(document.createRange)x='op8';
            else if(window.navigate)x='op7.5';
            else x='op7.2';                   
	}
	else if( window.opera && document.compatMode )x='op7';
	else if( window.opera && document.releaseEvents )x='op6';
	else if( document.contains && !window.opera )x='kq3';
	else if(window.pkcs11&&window.XML)x='f15';
	else if( window.getSelection && window.atob )x='nn7';
	else if( window.getSelection && !document.compatMode )x='nn6';
	else if( window.clipboardData && document.compatMode )
	  x=window.XMLHttpRequest? 'IE7' : 'IE6';
	else if( window.clipboardData ) {
	     x='ie5';
	     if( !document.createDocumentFragment ) x+='.5';
	     if( document.doctype && !window.print ) x+='m';
	}
	else if( document.getElementById && !document.all ) x='op4';
	else if( document.images && !document.all ) x='nn3';
	else if(document.clientWidth&&!window.RegExp)x='kq2';
	else x='???';

  return x;
}

var aktiv = window.setInterval("timer()",1000);
var cnt = 0;
   
function show() {
   
	window.clearInterval(aktiv);
   
   	isNS4 = (document.layers) ? true : false;
   	isIE4 = (document.all && !document.getElementById) ? true : false;
   	isIE5 = (document.all && document.getElementById) ? true : false;
   	isNS6 = (!document.all && document.getElementById) ? true : false;
   
   	if(isNS4) {
   		document.modul.visibility="visible";
   		document.loading.visibility="hidden";
   	} else if(isIE4) {
   		document.all.modul.style.visibility="visible";
   		document.all.loading.style.visibility="hidden";
   		window.clearInterval(aktiv);
   	} else if(isIE5) {
   		document.all.modul.style.visibility="visible";
   		document.all.loading.style.visibility="hidden";
   		window.clearInterval(aktiv);
   	} else if(isNS6) {
   		document.getElementById("modul").style.visibility="visible";
   		document.getElementById("loading").style.visibility="hidden";
   	}
   }
   
   function showApplet() {
   	window.clearInterval(aktiv);
   	show();
   }
   
   function timer() {
      if(cnt<30) {
         document.progress.width = cnt*14;
         cnt++;
      } else {
         showApplet();
      }
      
   }

   function showModul(nr) {
      switch(nr) {
        case 1:
   		document.getElementById("mod_nr1").style.visibility="visible";
           break;
        case 2:
   		document.getElementById("mod_nr2").style.visibility="visible";
           break;
        case 3:
   		document.getElementById("mod_nr3").style.visibility="visible";
           break;
      }
   }

//-->

