/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "isIE()"
 */
function isIE() {
   return !!(window.attachEvent && !window.opera);
}  // Ende: "isIE()"


/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "showLargePicture([string])"
 */
function showLargePicture(nameImage, formatImage) {
   var newWindow;
   
   if (formatImage == 1) {
      newWindow = window.open(nameImage, "imgPortrait",  "width=900,height=610,left=50,top=50,depend=yes,location=no,menubar=no,scrollbars=no,toolbar=no,resizeable=yes");
   } else {
      newWindow = window.open(nameImage, "imgLandscape", "width=475,height=681,left=50,top=50,depend=yes,location=no,menubar=no,scrollbars=no,toolbar=no,resizeable=yes");
   }
   
   newWindow.focus();
}  // Ende: "showLargePicture(nameImage)"


/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "chngFontSize([eleSrc])"
 */
function chngFontSize(idSrc) {
   if (!(idSrc)) { return; }

   var eleSrc = document.getElementById(idSrc);
   var eleDst = document.getElementById("idInhalt");

   if ((!(eleSrc)) || (!(eleDst))) { return; }
   if ( (eleDst.className == eleSrc.className)
     || ((eleDst.className == "") && (eleSrc.className == "clsNrm"))
   ) {
      return;
   }

   eleDst.className = eleSrc.className;

   if (isIE()) {
      var eleCells = eleDst.getElementsByTagName("td");

      for (var i = 0; i < eleCells.length; i++) {
         eleCells[i].className = eleSrc.className
      }
   }

   mySetCookie("idSrc", idSrc);
}  // Ende: "changeFontSize(eleSrc)"


/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "adjustFontSize()"
 */
function adjustFontSize() {
   var sCookieVal = myGetCookie("idSrc");

   if (sCookieVal) {
      chngFontSize(sCookieVal);
   }
   
   if (1 == 2) {
      var eleP = document.createElement("p");
      eleP.className = "clsSml";
      eleP.appendChild(document.createTextNode(document.compatMode));
      document.getElementById("idNavigation").appendChild(eleP);
   }
}  // Ende: "adjustFontSize()"


/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "mySetCookie([string], [string])"
 */
function mySetCookie(pNam, pVal) {
   if (window.navigator.cookieEnabled) {
      var datNow = new Date();
      datNow.setDate(datNow.getDate() + 14);  // Cookie bleibt 14 Tage gueltig

      document.cookie = pNam + "=" + escape(pVal) + "; expires=" + datNow.toGMTString() + "; path=/";
   }
}  // Ende: "mySetCookie(pNam, pVal)"


/* # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 * Funktion "myGetCookie([string])"
 */
function myGetCookie(pNam) {
   if (!window.navigator.cookieEnabled) {
      return null;
   }

   var objCookie = document.cookie;
   var strPrefix = pNam + "=";

   var intBegin = objCookie.indexOf("; " + strPrefix);
   if (intBegin == -1) {
      intBegin = objCookie.indexOf(strPrefix);

      if (intBegin != 0) {
         return null;
      }
   } else {
      intBegin += 2;
   }

   var intEnd = document.cookie.indexOf(";", intBegin);
   if (intEnd == -1) {
      intEnd = objCookie.length;
   }

   return unescape(objCookie.substring(intBegin + strPrefix.length, intEnd));
}  // Ende: "myGetCookie(pNam)"


