/*
This file contains the functions to enable DHTML
author: Sven Burst
date: 20.06.2008

changes:

18.02.08
created this file

20.06.08
stripped the functions navi(), expand_navi() and active_link() away, because they are not needed anymore

*/

/*--------------------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------------------*/

/*
*
*	function to get the current date
*
*/
function Datum() {
        Jetzt = new Date();
                
        //aktuelles Datum
        Tag= Jetzt.getDate();
        Tag_nr = Jetzt.getDay();
        Monat_nr= Jetzt.getMonth();
        Jahr= Jetzt.getYear();
        
        var Wochentag = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch",
                          "Donnerstag", "Freitag", "Samstag");
       	var Monat = new Array("Januar", "Februar", "M&auml;rz", "April", "Mai", "Juni",
                      "Juli", "August", "September", "Oktober", "November", "Dezember");
        
        if ((Jahr > 99) && (Jahr <1900)) Jahr += 1900;        
        
				DatumsString= "" +Wochentag[Tag_nr];
        DatumsString+= " " + Tag+".";
        DatumsString+= " "+Monat[Monat_nr];
        DatumsString+= " " + Jahr;
        document.getElementById("date").innerHTML = DatumsString;
        Timer = setTimeout("Datum()",1000);
}

/*--------------------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------------------*/

function showSubLayer(element)
{

  el = document.getElementById(element);
  
  if(el.style.display == "none")
  {
    el.style.display = "block";
//    document.getElementById('list_topics').className = 'active_first_layer_sub';
  } 
  else if(el.style.display == "block") 
  {
    el.style.display = "none";
//    document.getElementById('list_topics').className = '';
  }
}

/*--------------------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------------------*/

function applet_link(hlink, type) {
         if (hlink == "#") {
            return;
         }
         MyStr   = new String(hlink);
         oshres  = MyStr.indexOf("http://www.asb.de");
         hres    = MyStr.indexOf("://");
         mres    = MyStr.indexOf("mailto:");
         download= MyStr.indexOf("download.php");
         if (((oshres == -1) && (hres != -1) && (mres != -1)) || (download == 0)) hlink="http://www.asb.de/"+hlink;
         if (type) {
            if (type == 2) {
               window.open(hlink, "", "Menubar=0,Toolbar=0,Directories=0,Location=0,Resizable=1,Scrollbars=0,Status=0,width=400,height=400");
            }
            else {
               if (parent) {
                  parent.location.href=hlink;
               }
               else {
                  document.location.href=hlink;
               }
            }
         }
         else {
            window.open(hlink, "", "Menubar=1,Toolbar=1,Directories=1,Location=1,Resizable=1,Scrollbars=1,Status=1");
         }
      }
