/* ---------------------------------------------- */
/*  Main Status */
/* ---------------------------------------------- */
window.defaultStatus = "Meyenburg Managementberatung";

/* ---------------------------------------------- */
/* print meyenburg-mb and foreign email address   */
/* (note: CRLF in content = %0A%0A, blank = %20   */
/* ---------------------------------------------- */

function liame(address,re,content,tip)
{ var str = "<a href=\"mailto:";
  if (re!="") { var re1 = "?subject=" + re; } else { var re1 = ""; }
  if (content!="") { var content1 = "&body=" + content; } else { var content1 = ""; }
  if (tip!="") { var tip1 = " title=\"" + tip + "\""; } else { var tip1 = ""; }
  document.write(str + address + '@Meyenburg-MB.de' + re1 + content1 + '"' + tip1 + '>' + address + '@Meyenburg-MB.de</a>');
}
function liameForeign(name,domain,country,regarding)
{ var str = "<a href=\"mailto:";
  if (regarding!="") { var re = "?subject=" + regarding; } else { var re = ""; }
  document.write(str + name + '@' + domain + '.' + country + re + '">' + name + '@' + domain + '.' + country + '</a>');
}

/* ---------------------------------------------- */
/*  Show tooltip                                  */
/* ---------------------------------------------- */

function showTooltip(file,size)
{ size1 = "width=300,height=" + size + ",resizable=yes,location=no,menubar=no,scrollbars=no,toolbar=no,top=20,left=20,screenX=20,screenY=20";
  newWindow = window.open(file,"tipp",size1);
  newWindow.focus();
}

/* ---------------------------------------------- */
/* Fade in picture                                */        
/* (parameter = name of picture and its width and */
/* height. See also selfhtml: Dynamische Filter   */
/* ---------------------------------------------- */

function fadeIn()
{ document.all.fadepicture.filters.revealTrans.Transition = 1;
  document.all.fadepicture.filters.revealTrans.Apply();
  document.all.fadepicture.style.visibility = "visible";
  document.all.fadepicture.filters.revealTrans.Play();
}
function pictureFadein(filename,width,height)
{ var BrowserName = navigator.appName;
  if   (BrowserName == "Netscape")
       { document.write('<img src="images/' + filename + '" width="' + width + '" height="' + height + '" alt="" border="0">'); }
  else { document.write('<img id="fadepicture" src="images/' + filename + '" style="visibility:hidden; filter:revealTrans(Duration=4, Transition=1)" width="' + width + '" height="' + height + '" alt="" border="0">');
         fadeIn();
       }
}

/* ---------------------------------------------- */
/*  Gets the <div>-section which belongs to strID */
/* ---------------------------------------------- */

function getElement(strID)
{ var elems = document.getElementsByTagName("div");
  for (i = 0; i < elems.length; i++)
      { var elem = elems.item(i); 
        if (elem.attributes.getNamedItem("id").nodeValue == strID) { return elem; }
      }
  return null;
}

/* -------------------------- */
/*  return to index.html      */
/* -------------------------- */
function returnIndex(dir)
{ var str1 = "locat";
  var str2 = "ion.repl";
  var str3 = "ace('";
  var str4 = "inde";
  var str5 = "x.html')";
  eval(str1+str2+str3+dir+str4+str5);
}

/* ---------------------------------------------- */
/*  Welcome according to time                     */
/* ---------------------------------------------- */

function writeWelcome_G()
{ var Day = new Date();
  var hr  = Day.getHours();
  if ((hr >= 6) && (hr < 8)){ document.write("Schon so fr&uuml;h am Morgen?!<br>Flei&szlig;ig, flei&szlig;ig!") }
  if ((hr >= 8) && (hr < 10)){ document.write("Guten Start in den Tag!") }
  if ((hr >= 10) && (hr < 12)){ document.write("Sch&ouml;nen Vormittag!") }
  if ((hr >= 12) && (hr < 14)){ document.write("Auf gut bayrisch:<br>Mahlzeit!") }
  if ((hr >= 14) && (hr < 17)){ document.write("Sch&ouml;nen Nachmittag!") }
  if ((hr >= 17) && (hr < 20)){ document.write("Endspurt &#150; <br>guten (Feier)Abend!") }
  if ((hr >= 20 ) && (hr < 24)){ document.write("Noch so sp&auml;t am Abend?<br>Flei&szlig;ig, flei&szlig;ig!") }
  if ((hr >= 0) && (hr < 6)){ document.write("Mitten in der Nacht?<br>Flei&szlig;ig, flei&szlig;ig!") }
}
function writeWelcome_E()
{ var Day = new Date();
  var hr  = Day.getHours();
  if ((hr >= 6) && (hr < 8)){ document.write("So early in the morning?!") }
  if ((hr >= 8) && (hr < 11)){ document.write("Good morning!") }
  if ((hr >= 11) && (hr < 14)){ document.write("Good lunchtime!") }
  if ((hr >= 14) && (hr < 17)){ document.write("Good afternoon!") }
  if ((hr >= 17) && (hr < 20)){ document.write("Good evening!") }
  if ((hr >= 20 ) && (hr < 24)){ document.write("So late in the evening?!") }
  if ((hr >= 0) && (hr < 6)){ document.write("Are you working all night long?!") }
}

