/*
    Holledau in Hompeage Lightshow JavaScript
    (c) 2001-2008 by Holledau in, Eugen Obermeier
*/

window.onload = externalLinks;

function externalLinks() {
  	 if(!document.getElementsByTagName) return;
  	 var links,a,i;
  	 links = document.getElementsByTagName("a");
  	 for(i=0;i<links.length;i++) {
  	   	 a = links[i];
  	   	 if(a.getAttribute("rel") && a.getAttribute("rel").indexOf("external") > -1) {
  	   	   	 a.onclick = function() {
  	   	   	   	 window.open(this.href);
  	   	   	   	 return false;
  	   	   	 }
  	   	 }
  	 }
}

if (document.images) {
    var lightshow = new Array();
    lightshow[0] = new Image;
    lightshow[0].src = "images/hi_logo_80x80_hi1.jpg";
    lightshow[1] = new Image;
    lightshow[1].src = "images/hi_logo_80x80_hi2.jpg";
    lightshow[2] = new Image;
    lightshow[2].src = "images/hi_logo_80x80_hi3.jpg";
    lightshow[3] = new Image;
    lightshow[3].src = "images/hi_logo_80x80_hi4.jpg";
    lightshow[4] = new Image;
    lightshow[4].src = "images/hi_logo_80x80_hi5.jpg";
    lightshow[5] = new Image;
    lightshow[5].src = "images/hi_logo_80x80_hi6.jpg";
    lightshow[6] = new Image;
    lightshow[6].src = "images/hi_logo_80x80_hi7.jpg";
    lightshow[7] = new Image;
    lightshow[7].src = "images/hi_logo_80x80_hi8.jpg";
    lightshow[8] = new Image;
    lightshow[8].src = "images/hi_logo_80x80.jpg";
}

var picked=-1;         // PICKED GRAPHIC - SET INITIAL VALUE
var highlighted=-1;    // HIGHLIGHTED GRAPHIC - SET INITIAL VALUE
var lightIndex = 0;

function doMouseOver(num) {
    highlighted = num;

    if (num == 0) {
        document.images["button0"].src = lightshow[lightIndex].src;
        if (lightIndex < 8) {
          lightIndex++;
        } else {
          lightIndex = 0;
        }
    }
}

function doMouseOut (num) {
    if (num == 0) {
        document.images["button0"].src = lightshow[lightIndex].src;
        if (lightIndex < 8) {
          lightIndex++;
        } else {
          lightIndex = 0;
        }
    }
}

