
var myDomain = "shn-international.com";
/*
var myURL = "http://exlartsch." + myDomain;
var myTitle = "Guggen Musig Exlartsch - Zug";
var menuBuffer = new Array;
var currImgRef = "";
var tCount = 0;
var mDelay = 500;                      
var currMenuDisable = true;
var imgName = new Array;
var imgBuffer = new Array;
var imgEmpty = 0;
var imgFrame = imgEmpty + 1;
var imgLolight = imgFrame + 1;
var imgHilight = imgLolight + 1;
var defaultroot = "index.htm";
imgPath = "images/";
imgName [imgEmpty] = "nav00";
imgName [imgFrame] = "nav01";
imgName [imgLolight] = "nav02";
imgName [imgHilight] = "nav03";

for (imgCount = imgEmpty; imgCount <= imgName.length; imgCount++) {
  imgBuffer [imgCount] = new Image ();
  imgBuffer [imgCount].src = imgPath + imgName [imgCount] + ".gif";
}

                          
function EvTimeout () {
  if ((0 == tCount) || (tCount > 1)) {
    alert ("Invalid menu event");
  }
  window.clearInterval (mTimeout);
  tCount--;
  document.images[currImgRef].src = eval("imgBuffer[" + imgHilight + "]" + ".src");
  window.status = "";
}

                   
function StartTimeout () {
  if (tCount > 0) {
    window.clearInterval (mTimeout);
    tCount--;
  }
  tCount++;
  mTimeout = window.setInterval ("EvTimeout ()", mDelay);
}

                   
function ResetTimeout () {
  if (tCount > 0) {
    window.clearInterval (mTimeout);
    tCount--;
  }
}
                   
                       
function EvMouseOver (aImgRef) {
  ResetTimeout ();
  if ("" == currImgRef) {
    currImgRef = aImgRef;
  }
  if (aImgRef != currImgRef) {
    document.images[currImgRef].src = eval("imgBuffer[" + imgLolight + "]" + ".src");
    document.images[aImgRef].src = eval("imgBuffer[" + imgFrame + "]" + ".src");
  } 
  else {
    document.images[currImgRef].src = eval("imgBuffer[" + imgHilight + "]" + ".src");
  } 
}

                   
function EvMouseDown (aImgRef) {
  if (aImgRef != currImgRef) {
    document.images[currImgRef].src = eval("imgBuffer[" + imgEmpty + "]" + ".src");
    document.images[aImgRef].src = eval("imgBuffer[" + imgHilight + "]" + ".src");
  }  
}

                   
function EvMouseUp (aImgRef) {
  document.images[aImgRef].src = eval("imgBuffer[" + imgHilight + "]" + ".src");
}

                   
function EvMouseOut (aImgRef) {
  ResetTimeout ();
  if (aImgRef != currImgRef) {
    document.images[aImgRef].src = eval("imgBuffer[" + imgEmpty + "]" + ".src");
    StartTimeout ();
  }  
}


function ExtractDocName (aName) {
  var aResult = "";

  aName = aName.toLowerCase ();
  vIndex = aName.lastIndexOf ('\\');
  if (vIndex < 0) {
    vIndex = aName.lastIndexOf ('/');
  }
  if (vIndex < 0) {
    return aName;    
  }
  else {
    aResult = aName.substring ((vIndex + 1), aName.length);
    if (aResult.length == 0) {
      return defaultroot;
    }
    else {
      return aResult;
    }
  }  
}

                   
function CreateMenuEntry (aText, aLink, aImgRef) {

  if ("back" == aLink.toLowerCase()) {
    vSelected = false;  
    vBackLink = true;
  }
  else {
    vBackLink = false;    
    vSelected = (ExtractDocName (document.URL) == ExtractDocName (aLink));
    if (vSelected && ("" == currImgRef)) {
      currImgRef = aImgRef;
    }
    else {
      vSelected = false;
    }  
  }
                                  
  if (vSelected) {
    document.images[aImgRef].src = eval("imgBuffer[" + imgHilight + "]" + ".src");
    if (currMenuDisable) {
      document.write ('<div id=navigationsel');
      document.write (' OnMouseOver = "EvMouseOver (\'', aImgRef, '\')";>', aText, '</div> ');
    }
    else {
      document.write ('<a href="', aLink, '" ');      
    }  
  }
  else {
    document.images[aImgRef].src = eval("imgBuffer[" + imgEmpty + "]" + ".src");
    if (vBackLink) {
      document.write ('<a href="javascript:history.back ()" ');  
    }
    else {
      document.write ('<a href="', aLink, '" ');
    }
    
  }
  if (!(vSelected && currMenuDisable)) {
    document.write ('OnMouseOver = "EvMouseOver (\'', aImgRef, '\')"; ');
    document.write ('OnMouseDown = "EvMouseDown (\'', aImgRef, '\')"; ');
    document.write ('OnMouseUp = "EvMouseUp (\'', aImgRef, '\')"; ');
    document.write ('OnMouseOut = "EvMouseOut (\'', aImgRef, '\')";>');
    document.write (aText, '</a>');
  }
}
*/
                                                       
function WriteEmail (aName, aSubject, aLinkText, aImg) {
  document.write ('<a href="mailto:',aName ,'@', myDomain);		// Standard Version

  if ("" != aSubject) {											// prepare "subject" string
    document.write ('?subject=', aSubject, '">');
  }
  else {
    document.write ('">');  
  }
  
  if ("" == aImg) {												// Prepare Image (if so...)
    if ("" == aLinkText) {										// Prepare Linktext
      document.write (aName + '@', myDomain, '</a>');  
    }
    else {
      document.write (aLinkText, '</a>');
    }  
  }
  else {
    document.write ('<img border="0" src="', aImg, '" ', aLinkText,'></a>');
  }    
}


function FillArray () {
  this.length = FillArray.arguments.length;
  for (var vIndex = 0; vIndex < this.length; vIndex++) {  
    this[vIndex] = FillArray.arguments[vIndex];
  }
}


var Weekday = new FillArray ("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
var Month = new FillArray ("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");


function WriteDate (aDate, aShowDay) {
  var vModdate = new Date (aDate); 
  
  if (aShowDay) {
    document.write (Weekday[vModdate.getDay()], ", ");
    document.write (vModdate.getDate(), ". ");
    document.write (Month[vModdate.getMonth()]," ");
    document.write (vModdate.getYear());  
  }
  else {
    document.write (vModdate.getDate(), ". ");
    document.write (vModdate.getMonth() + 1,". ");
    document.write (vModdate.getYear());      
      
  }  
}


function WriteDocDate () {
  document.write ('Aktualisiert am&nbsp;');
  WriteDate (document.lastModified, true);
  document.write ('.');
}

/*
function WriteAddtoFavorites () {  
  var aInfoText = "Zu Favoriten hinzufügen";
  
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
    document.write ('<a href="javascript:window.external.AddFavorite (myURL, myTitle);"');
    document.write ('onMouseOver = "window.status = \'', aInfoText, '\'"; return true; ');
    document.write ('onMouseOut = "window.status = \' \'"; return true;>');
    document.write (aInfoText, '</a>&nbsp;|&nbsp;');
  }
  else {
    if (navigator.appName == "Netscape") {
      document.write (aInfoText + ": <CTRL-D>&nbsp;|&nbsp;");
    }
  }    
}


function PrintPage () {
  document.write ('<a href="javascript:window.self.print()">Seite drucken</a>&nbsp;|&nbsp;');
}
*/




