var absoluteX1Position;
var absoluteY1Position;


function determineBrowser() {
   if(navigator.appName == "Microsoft Internet Explorer") { return true; }
   else if(navigator.appName == "Netscape") { return false; }
}

function getImagePosition() {
   try { if(document.getElementsByName("POSITIONIMAGE").length == 1) {
            if(!(determineBrowser())) {
               absoluteX1Position = document.POSITIONIMAGE.x;
               absoluteY1Position = document.POSITIONIMAGE.y;
            } else {
               imageObject = document.getElementById("POSITIONIMAGE");
               for (var x=0,y=0; imageObject!=null;x+=imageObject.offsetLeft,y+=imageObject.offsetTop,imageObject=imageObject.offsetParent);
               absoluteX1Position=x;
               absoluteY1Position=y;
            }
         }
   } catch(Exception) {}
}


function positionObjects() {
   getImagePosition();
   fixLeftBorder();
   fixShowPosition();

}

function fixLeftBorder() {
   borderObject = document.getElementsByName("LEFTBORDER")[0];
   if(borderObject) {
      borderObject.style.left=absoluteX1Position+100;
   
   }
}

function fixShowPosition() {
   imageShowObject = document.getElementsByName("IMAGESHOW")[0];
   if(imageShowObject) {
      imageShowObject.style.left=absoluteX1Position+0;
   
   }
}

function getDate() {
   var now = new Date();
   var Wochentag = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
   var Tag = now.getDay();
   var Datum = now.getDate();
   var Monat = new Array("Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
   var Monatszahl = now.getMonth();
   var Jahreszahl = now.getFullYear();
   var date = (Wochentag[Tag] + ", " + Datum + ". " + Monat[Monatszahl] + " " + Jahreszahl);
   return date;
}

function imageShow() {
   var showLength = 10;
   for(i=1; i< showLength; i++) {
       showObject = document.getElementsByName("EXCHANGE-IMAGE")[0];
       if(showObject) {
          command = "showObject.setAttribute('src','images/e-"+i+".jpg')";
          starttime = i*2000;
          setTimeout(command, starttime);
       }	
   }
   setTimeout("imageShow()",18000);
}