   function ShowAndHide (obj) {
   
   		if (obj.style.display=='block')
   			obj.style.display='none';
   		else	
   			obj.style.display='block';
   
   }
   
  function confirmation(question,url,form) {
  	var answer = confirm(question);
  	if (answer){
  		if(url!='')	window.location = url;
  		else forms[form].submit();	
   	}
  	else{
  		return false;
  	}
  }
  
  // usage: format_zahl( number [, number]  [, bool]  )
  function formatZahl(zahl, k, fix)
  {
    if(!k) k = 0;
    var neu = '';
    // Runden
    var f = Math.pow(10, k);
    zahl = '' + parseInt( zahl * f + (.5 * (zahl > 0 ? 1 : -1)) ) / f ;
    // Komma ermittlen
    var idx = zahl.indexOf('.');
    // fehlende Nullen einfügen
    if(fix)
   {
         zahl += (idx == -1 ? '.' : '' )
         + f.toString().substring(1);
    }
    // Nachkommastellen ermittlen
    idx = zahl.indexOf('.');
    if( idx == -1) idx = zahl.length;
    else neu = ',' + zahl.substr(idx + 1, k);

    // Tausendertrennzeichen
    while(idx > 0)
    {
        if(idx - 3 > 0)
        neu = '.' + zahl.substring( idx - 3, idx) + neu;
        else
        neu = zahl.substring(0, idx) + neu;
        idx -= 3;
    }
    return neu;
 }
 
 
	function popup(datei,title)
      {
		window.open(datei,title,'width=400,height=300,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
      }

	function centerWindow(windowbreite,windowhoehe) {
		resizeTo(windowbreite,windowhoehe);
		scdx = screen.availWidth;
		scdy = screen.availHeight;
		moveTo(scdx / 2 - windowbreite / 2, scdy / 2 - windowhoehe / 2);
	}
   