	var imgCt = 20;
	var currSelect = 1;
	var lastSelect = 1;
	var myImagePath = "images/photo/image_";
	var myIconPath_on = "images/photo/icons/on/image_"
	var myIconPath_off = "images/photo/icons/off/image_"
	var mySuffix = ".jpg";
	
	/* Erweiterung */
	var bilder = new Array(); // Cache für Rollover reservieren
	for(i = 0; i < imgCt; i++) {
				bilder[i] = new Image();
				bilder[i].src = myIconPath_on + (i + 1) + mySuffix;
	}
	
	if (imgCt == 0) {alert ("imgCt not defined")};
	if (currSelect == 0) {alert ("currSelect not defined")};
	
	
	/* ------------------------------------------------------------------------------*/
	/* function to change the main image: onMousedown */
	function chgSlide(myObject, myNum) {
		if (document.images) {
			lastSelect = currSelect;
			currSelect = myNum;
			var myAdress = myImagePath + myNum + mySuffix; 
		
			document.myImage.src = myAdress;
			chgIcon(myObject, lastSelect, 'off');
	/* ------------------------------------------------------------------------------*/
		}
	}
	

	/* --------------------------------------------------------------------------------*/
	/* function to change the icon on demand: onMouseenter  or onMouseout */
function chgIcon( myObject, myNum, action) {
//myPath = bilder[myNum - 1].src;
							
							
	if (document.images) {
			if (myNum != currSelect){
			 // Änderung für Cache-Objekte
				if (action == "on") { 
			// Als assoziatives Array allgemein einsetzbar nur vom Bildname abhaengig
					// alert("on");	
					 document.images["myIcon_" + myNum].src = bilder[myNum - 1].src;
				} else {
					// alert("off"); 
					document.images["myIcon_" + myNum].src = myIconPath_off + myNum + mySuffix;
				} 
			}
	}
}

