<!-- //replace cast images on mouse click with the images in costumes

    var castMembers=26; //Anzahl der cast members
		var castUp = new Array(castMembers); //
		var castDown = new Array(castMembers); //
		
		//window.onload=rplcm;
		
		for (i=0;i<castMembers;i++) //Create an Image objects
		{
		 castUp[i] = new Image;
		 castDown[i] = new Image;
		}
		
		//preload default images (onmouseup)
		castUp[0].src = 'cast/KathrinE.jpg';
		castUp[1].src = 'cast/Madzia.jpg';
		castUp[2].src = 'cast/Johanna.jpg';
		castUp[3].src = 'cast/Charlotte.jpg';
		castUp[4].src = 'cast/Pia.jpg';
		castUp[5].src = 'cast/Abi.jpg';
		castUp[6].src = 'cast/Vanessa.jpg';
		castUp[7].src = 'cast/Martin.jpg';
		castUp[8].src = 'cast/Stefanie.jpg';
		castUp[9].src = 'cast/Selina.jpg';
		castUp[10].src = 'cast/Julian.jpg';
		castUp[11].src = 'cast/Fabian.jpg';
		castUp[12].src = 'cast/Melody.jpg';
		castUp[13].src = 'cast/Lea.jpg';
		castUp[14].src = 'cast/Janine.jpg';
		castUp[15].src = 'cast/Janina.jpg';
		castUp[16].src = 'cast/Lena.jpg';
		castUp[17].src = 'cast/Anna.jpg';
		castUp[18].src = 'cast/KatrinM.jpg';
		castUp[19].src = 'cast/Emilia.jpg';
		castUp[20].src = 'cast/Jasmin.jpg';
		castUp[21].src = 'cast/Moli.jpg';
		castUp[22].src = 'cast/Jana.jpg';
		castUp[23].src = 'cast/Helena.jpg';	
		castUp[24].src = 'cast/SandraE.jpg';
		castUp[25].src = 'cast/SandraZ.jpg';

		//preload costume images (onmousedown)
		//the down images should use same name as the up images + '_D': e.g.:david.jpg -> david_D.jpg
		for (i=0;i<castMembers;i++)
		{
		 castDown[i].src = castUp[i].src.replace(".jpg","_D.jpg");
		}

    			
/************************************************************************
Replace cast member on mousedown. 
The function is called before the closing </body> tag. (alternative to window.onload event handler)
*************************************************************************/
		
    function replaceCastMember() 
    {
    	var arrCastMembers = document.getElementsByName("castM"); //save all cast members having name="castM" in an array
    	//alert ("Anzahl der Cast-members="+arrCastMembers.length);
    	
    	//capture onmousedown/up event to replace the image with the one in costume    	
    	arrCastMembers[0].onmousedown=function () { this.childNodes[1].src=castDown[0].src; }
    	arrCastMembers[0].onmouseup=function () { this.childNodes[1].src=castUp[0].src; }
    	arrCastMembers[0].onclick=function () { return false;}
    	arrCastMembers[1].onmousedown=function () { this.childNodes[1].src=castDown[1].src; }
    	arrCastMembers[1].onmouseup=function () { this.childNodes[1].src=castUp[1].src; }
    	arrCastMembers[1].onclick=function () { return false;}
    	arrCastMembers[2].onmousedown=function () { this.childNodes[1].src=castDown[2].src; }
    	arrCastMembers[2].onmouseup=function () { this.childNodes[1].src=castUp[2].src; }
    	arrCastMembers[2].onclick=function () { return false;}
    	arrCastMembers[3].onmousedown=function () { this.childNodes[1].src=castDown[3].src; }
    	arrCastMembers[3].onmouseup=function () { this.childNodes[1].src=castUp[3].src; }
    	arrCastMembers[3].onclick=function () { return false;}
      arrCastMembers[4].onmousedown=function () { this.childNodes[1].src=castDown[4].src; }
    	arrCastMembers[4].onmouseup=function () { this.childNodes[1].src=castUp[4].src; }
    	arrCastMembers[4].onclick=function () { return false;}
    	arrCastMembers[5].onmousedown=function () { this.childNodes[1].src=castDown[5].src; }
    	arrCastMembers[5].onmouseup=function () { this.childNodes[1].src=castUp[5].src; }
    	arrCastMembers[5].onclick=function () { return false;}
    	arrCastMembers[6].onmousedown=function () { this.childNodes[1].src=castDown[6].src; }
    	arrCastMembers[6].onmouseup=function () { this.childNodes[1].src=castUp[6].src; }
    	arrCastMembers[6].onclick=function () { return false;}
    	arrCastMembers[7].onmousedown=function () { this.childNodes[1].src=castDown[7].src; }
    	arrCastMembers[7].onmouseup=function () { this.childNodes[1].src=castUp[7].src; }
    	arrCastMembers[7].onclick=function () { return false;}
    	arrCastMembers[8].onmousedown=function () { this.childNodes[1].src=castDown[8].src; }
    	arrCastMembers[8].onmouseup=function () { this.childNodes[1].src=castUp[8].src; }
    	arrCastMembers[8].onclick=function () { return false;}
    	arrCastMembers[9].onmousedown=function () { this.childNodes[1].src=castDown[9].src; }
    	arrCastMembers[9].onmouseup=function () { this.childNodes[1].src=castUp[9].src; }
    	arrCastMembers[9].onclick=function () { return false;}
    	arrCastMembers[10].onmousedown=function () { this.childNodes[1].src=castDown[10].src; }
    	arrCastMembers[10].onmouseup=function () { this.childNodes[1].src=castUp[10].src; }
    	arrCastMembers[10].onclick=function () { return false;}
    	arrCastMembers[11].onmousedown=function () { this.childNodes[1].src=castDown[11].src; }
    	arrCastMembers[11].onmouseup=function () { this.childNodes[1].src=castUp[11].src; }
    	arrCastMembers[11].onclick=function () { return false;}
    	arrCastMembers[12].onmousedown=function () { this.childNodes[1].src=castDown[12].src; }
    	arrCastMembers[12].onmouseup=function () { this.childNodes[1].src=castUp[12].src; }
    	arrCastMembers[12].onclick=function () { return false;}
    	arrCastMembers[13].onmousedown=function () { this.childNodes[1].src=castDown[13].src; }
    	arrCastMembers[13].onmouseup=function () { this.childNodes[1].src=castUp[13].src; }
    	arrCastMembers[13].onclick=function () { return false;}
    	arrCastMembers[14].onmousedown=function () { this.childNodes[1].src=castDown[14].src; }
    	arrCastMembers[14].onmouseup=function () { this.childNodes[1].src=castUp[14].src; }
    	arrCastMembers[14].onclick=function () { return false;}
    	arrCastMembers[15].onmousedown=function () { this.childNodes[1].src=castDown[15].src; }
    	arrCastMembers[15].onmouseup=function () { this.childNodes[1].src=castUp[15].src; }
    	arrCastMembers[15].onclick=function () { return false;}
    	arrCastMembers[16].onmousedown=function () { this.childNodes[1].src=castDown[16].src; }
    	arrCastMembers[16].onmouseup=function () { this.childNodes[1].src=castUp[16].src; }
    	arrCastMembers[16].onclick=function () { return false;}    	
    	arrCastMembers[17].onmousedown=function () { this.childNodes[1].src=castDown[17].src; }
    	arrCastMembers[17].onmouseup=function () { this.childNodes[1].src=castUp[17].src; }
    	arrCastMembers[17].onclick=function () { return false;} 
    	arrCastMembers[18].onmousedown=function () { this.childNodes[1].src=castDown[18].src; }
    	arrCastMembers[18].onmouseup=function () { this.childNodes[1].src=castUp[18].src; }
    	arrCastMembers[18].onclick=function () { return false;} 
    	arrCastMembers[19].onmousedown=function () { this.childNodes[1].src=castDown[19].src; }
    	arrCastMembers[19].onmouseup=function () { this.childNodes[1].src=castUp[19].src; }
    	arrCastMembers[19].onclick=function () { return false;} 
    	arrCastMembers[20].onmousedown=function () { this.childNodes[1].src=castDown[20].src; }
    	arrCastMembers[20].onmouseup=function () { this.childNodes[1].src=castUp[20].src; }
    	arrCastMembers[20].onclick=function () { return false;} 
    	arrCastMembers[21].onmousedown=function () { this.childNodes[1].src=castDown[21].src; }
    	arrCastMembers[21].onmouseup=function () { this.childNodes[1].src=castUp[21].src; }
    	arrCastMembers[21].onclick=function () { return false;} 
    	arrCastMembers[22].onmousedown=function () { this.childNodes[1].src=castDown[22].src; }
    	arrCastMembers[22].onmouseup=function () { this.childNodes[1].src=castUp[22].src; }
    	arrCastMembers[22].onclick=function () { return false;} 
    	arrCastMembers[23].onmousedown=function () { this.childNodes[1].src=castDown[23].src; }
    	arrCastMembers[23].onmouseup=function () { this.childNodes[1].src=castUp[23].src; }
    	arrCastMembers[23].onclick=function () { return false;} 
    	arrCastMembers[24].onmousedown=function () { this.childNodes[1].src=castDown[24].src; }
    	arrCastMembers[24].onmouseup=function () { this.childNodes[1].src=castUp[24].src; }
    	arrCastMembers[24].onclick=function () { return false;} 
    	arrCastMembers[25].onmousedown=function () { this.childNodes[1].src=castDown[25].src;}
    	arrCastMembers[25].onmouseup=function () { this.childNodes[1].src=castUp[25].src;}
    	arrCastMembers[25].onclick=function () { return false;} //prevent following the link & scrolling up display
      
     return false;	
    }
    