  // http://wanngehtdieweltunter.de/WOS/RalfMuellerJobLogDrei#2428298eb9aebb362c00afca622d5011
  // choose the sizes as a multiple of the step!
  var minSize = 24;
  var midSize = 36;
  var maxSize = 68;
  var step = 4;
  var numElements;
  var aSize;
  var aSizeCurrent;
  var bIn = 0;
  var nCount = 0;
  var nStarted = 0;
  function initNavi() {
    numElements = document.getElementsByName("icon").length-1;
    aSize = new Array(numElements);
    aSizeCurrent = new Array(numElements);
    for (i=0;i<=numElements;i++) {
      aSize[i]=minSize;
      aSizeCurrent[i]=minSize;
    }
  }
  var count = 0;
  var timer = null;
  function size(num, size) {
    if ((num>=0)&&(num<=numElements)) {
      aSize[num]=size;
    }
  }
  function over(num) {
    icons = document.getElementsByName("icon");
    //document.getElementById("imageTitle").innerHTML = icons[num].alt;
    size(num, maxSize);
    size(num-1, midSize);
    size(num+1, midSize);
    size(num-2, minSize);
    size(num+2, minSize);
    if (timer==null) {
      timer = window.setInterval("resize();", 10);
      nStarted++;
    }
    bIn = 1;
  }
  function out(num) {
//    for(i=0;i<=numElements;i++) {
//      size(i, minSize);
//    }
	bIn = 0;
    if (timer==null) {
      timer = window.setInterval("resize();", 10);
      nStarted++;
      bIn=-2;
    }
  }

  function resize() {

  	if (bIn==-2) {
	    for(i=0;i<=numElements;i++) {
	      size(i, minSize);
	    }
  	}
  	if (bIn<1) {
  		bIn--;
  	}	
    bChanged = 0;
    nElement = -1;
    for(i=0;i<=numElements;i++) {
      icons = document.getElementsByName("icon");
      width = aSizeCurrent[i];
      if (aSize[i]>width) {
        icons[i].width+=step;
        //icons[i].height+=(step * 1.18);
        icons[i].height+=step;
        width+=step;
        bChanged = 1;
        nElement = i;
      }
      if (aSize[i]<width) {
        icons[i].width-=step;
        //icons[i].height-=(step * 1.18);
        icons[i].height-=step;
        width-=step;
        bChanged = 1;
        nElement = i;
      }
      aSizeCurrent[i] = width;
    }
    if (bChanged==0) {
      nCount = 0;
      window.clearInterval(timer);
      timer = null;
    }
    // document.getElementById("debugCount").innerHTML = nCount++ + " - " + timer + " - " + bChanged + " - " + nElement + " - " + nStarted;
  }
