//
// Checken ob aus dem Frame aufgerufen wurde
//

// Wenn nicht, index aufrufen

function aufrufen(loc)
{
	top.location.replace(loc);
}

//Checken

if(top.location.href == self.location.href)
  aufrufen('index.htm?' + self.location.pathname);

//
//Letztes Update der Seite
//

function modifyString()
{ 
  var Monatsname = ["Januar", "Februar", "März", "April", "Mai","Juni", "Juli", "August", "September", "Oktober","November", "Dezember"];
  var Tagname = ["Sonntag", "Montag", "Dienstag", "Mittwoch","Donnerstag", "Freitag", "Samstag"];
  
  var date = new Date();
  date.setTime(Date.parse(document.lastModified));
  var years = 1900 +  date.getYear();
  return Tagname[date.getDay()] + ", den " + date.getDate() + ". "+ Monatsname[date.getMonth()] + " " +       years;
}

// Ins Doku schreiben
function l_upd()
{
  document.writeln('<small><small>');
  document.writeln('Dieses Dokument wurde zuletzt geändert am : ' + modifyString() + '<BR>');
  document.writeln('Copyright &copy; 2007 by <a href="mailto:&#117&#100&#119&#64&#97&#111&#110&#46&#97&#116">UDW</a>')
  document.writeln('</small></small>');
}

//
// Begrüssung Main
//

function begruessung()
{
  today = new Date()
    if(today.getMinutes() < 10){ 
        pad = "0"}
    else  
    pad = "";
  document.write    ;if((today.getHours() >=6) && (today.getHours() <=11)){
document.write("Guten Morgen") //nach 6 Uhr bis 11 Uhr
}
   if((today.getHours() >=11) && (today.getHours() <=13)){
document.write("Mahlzeit! ") //nach 11 Uhr bis 13 Uhr
}
    if((today.getHours() >=12) && (today.getHours() <=16)){
document.write("Guten Tag !") // nach 12 Uhr bis 16 Uhr
}    
    if((today.getHours() >=17) && (today.getHours() <=23)){
document.write("Guten Abend !") //nach 17 Uhr bis 23 Uhr
}
    if((today.getHours() >=0) && (today.getHours() <=4)){
document.write("Sind sie Nachtschwärmer?")
}
    if((today.getHours() >=4) && (today.getHours() <=6)){
document.write("Sind Sie etwa schon oder gar noch auf?")
}
}

//
// MouseOver fur Links - Pic austauschen
//

function SwapPic(PicName,PicFile)
{
  NewPic = new Image();
  NewPic.src = PicFile;
  document[PicName].src = NewPic.src;
  return true;
}

//
// Seitenschutz
//
//var message="";
//function clickIE() {if (document.all) {(message);return false;}}
//function clickNS(e) {if 
//(document.layers||(document.getElementById&&!document.all)) {
//if (e.which==1||e.which==2||e.which==3) {(message);return false;}}}
//if (document.layers) 
//{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
//else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
//document.oncontextmenu=new Function("return false")

//function disableselect(e){
//return false
//}
//function reEnable(){
//return true
//}
//document.onselectstart=new Function ("return false")
//if (window.sidebar){
//document.onmousedown=disableselect
//document.onclick=reEnable
//}
