function openImageWindow(breite, hoehe, bildtext, bild) {
  myWindow = window.open('','IMAGEWINDOW','width=' + breite + ' ,height=' + hoehe);
  myWindow.close();
  myWindow = window.open('','IMAGEWINDOW','width=' + breite + ' ,height=' + hoehe);
  myWindow.document.write ('<html><head><title></title><body bgcolor="#ffffff">');
  myWindow.document.write ('<table><tr><td><img src="' + bild + '"></td></tr><tr></td></tr></table>');
  myWindow.document.write ('</body></html>');
}



function makeArray(n) {
  this.length = n;
  for (var i=1; i <=n; i++) 
      this[i] = 0;
  return this;
}

function imageUNHIGHLIGHT(index) {
  imageUnselected = eval(index + "_unselected.src");
  document [index].src=imageUnselected;
}

function imageHIGHLIGHT(index) {
   imageSelected = eval(index + "_selected.src");
   document [index].src=imageSelected;
}

function imageON(index, btnCount) { 
  for (var i=0; i < btnCount; i++) {
    buttonIndex = 'B' + i;
    if (buttonIndex == index) imageHIGHLIGHT(buttonIndex);
    else imageUNHIGHLIGHT(buttonIndex);
   }
}


function imageOFF(index, btnCount) {
  for (var i=0; i < btnCount; i++) {     
    buttonIndex = 'B' + i;
    if (buttonArray[i]==1) imageHIGHLIGHT(buttonIndex);
    else imageUNHIGHLIGHT(buttonIndex);     
   }
}


function imageSELECT(index , btnCount) {
   for (var i=0; i < btnCount; i++) {
     buttonIndex = 'B' + i;
     if (buttonIndex == index) buttonArray[i] = 1;
     else buttonArray[i] = 0;
   }

}

function openAWindow ( location, index, features ) {
	myWindow = window.open('',index,features); 
	myWindow.close();
	myWindow = window.open('',index,features); 
	myWindow.document.location.href=location;
	myWindow.focus();
}