/*******************************************************************************FILE: mud_Scripts.jsREQUIRES: prototype.js, mud_FadeGallery.jsAUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/VERSION: 2.0 - converted to use prototype.jsDATE: 01/05/2006--------------------------------------------------------------------------------This file is part of MudFadeGallery.	MudFadeGallery is free for anyone to use, but this header MUST be	included, and may not be modified.*******************************************************************************/////////////////////////////////////////////////////////////////////////////////// GLOBAL VARSvar imgsGallery = new Array();var imgs;///////////////////////////////////////////////////////////////////////////////// MOUSE EVENTSfunction setOnMouseClick() {	var elements = document.getElementsByTagName("a");	for (var i = 0; i < elements.length; i++) {		switch(elements[i].className) {			case "next":				elements[i].onclick = function() {					 imgs.nextImg();					 return false;				}				break;			case "prev":				elements[i].onclick = function() {					 imgs.prevImg();					 return false;				}				break;			case "s0":				elements[i].onclick = function() {					 imgs.showImg(0);					 return false;				}				break;			case "s1":				elements[i].onclick = function() {					 imgs.showImg(1);					 return false;				}				break;			case "s2":				elements[i].onclick = function() {					 imgs.showImg(2);					 return false;				}				break;			case "s3":				elements[i].onclick = function() {					 imgs.showImg(3);					 return false;				}				break;		}	}}////////////////////////////////////////////////////////////////////////////////// INITfunction init() {	setOnMouseClick();	// images gallery	// load images note: imgsGallery[].image isn't an array of images, just strings to hold location		imgsGallery[0] = new Object();	imgsGallery[0].image = "images/painting_01.jpg";	imgsGallery[0].title = "Homage to Kung Hsien, 1987";	imgsGallery[0].caption = "works";		imgsGallery[1] = new Object();	imgsGallery[1].image = "images/painting_02.jpg";	imgsGallery[1].title = "Untitled, 1988";	imgsGallery[1].caption = "works";    imgsGallery[2] = new Object();	imgsGallery[2].image = "images/painting_03.jpg";	imgsGallery[2].title = "To Julie, 1988";	imgsGallery[2].caption = "works";		imgsGallery[3] = new Object();	imgsGallery[3].image = "images/painting_04.jpg";	imgsGallery[3].title = "Tani, 1988";	imgsGallery[3].caption = "works";		imgsGallery[4] = new Object();	imgsGallery[4].image = "images/painting_05.jpg";	imgsGallery[4].title = "Untitled, 1989";	imgsGallery[4].caption = "works";    imgsGallery[5] = new Object();	imgsGallery[5].image = "images/painting_06.jpg";	imgsGallery[5].title = "Kai, 1988";	imgsGallery[5].caption = "works";    imgsGallery[6] = new Object();	imgsGallery[6].image = "images/painting_07.jpg";	imgsGallery[6].title = "Red Flowers, 2008";	imgsGallery[6].caption = "works";		imgsGallery[7] = new Object();	imgsGallery[7].image = "images/painting_08.jpg";	imgsGallery[7].title = "Trees on a Hill, 2008";	imgsGallery[7].caption = "works";		imgsGallery[8] = new Object();	imgsGallery[8].image = "images/painting_09.jpg";	imgsGallery[8].title = "Pink Flowersin a Field, 2008";	imgsGallery[8].caption = "works";	    imgsGallery[9] = new Object();	imgsGallery[9].image = "images/painting_010.jpg";	imgsGallery[9].title = "Maui Mountains, 2008";	imgsGallery[9].caption = "works";		imgsGallery[10] = new Object();	imgsGallery[10].image = "images/painting_011.jpg";	imgsGallery[10].title = "Seascape, 1989";	imgsGallery[10].caption = "works";		imgsGallery[11] = new Object();	imgsGallery[11].image = "images/painting_012.jpg";	imgsGallery[11].title = "Spiral, 1989";	imgsGallery[11].caption = "works";		imgsGallery[12] = new Object();	imgsGallery[12].image = "images/painting_013.jpg";	imgsGallery[12].title = "Untitled, 1990";	imgsGallery[12].caption = "works";			    var start = 0;	var page = document.location.toString().split("?")[1];	if (page != null) {		start = page;}	imgs = new MudFadeGallery('imgs', 'imgDisplay', imgsGallery, {startNum: start, preload: true, autoplay: 0});		// set the initial captions	var title = (imgs.imgsArray[imgs.imgCurrent].title) ? imgs.imgsArray[imgs.imgCurrent].title : "No Title";	var caption = (imgs.imgsArray[imgs.imgCurrent].caption) ? imgs.imgsArray[imgs.imgCurrent].caption : "No caption";	$("imgDisplay_title").innerHTML = title;	$("imgDisplay_caption").innerHTML = caption;	$(imgs.id+"_number").innerHTML = (parseInt(imgs.imgCurrent)+1) + " of " + imgs.imgTotal;	$("imgDisplay").src = imgsGallery[start].image;}////////////////////////////////////////////////////////////////////////////////// EVENTSEvent.observe(window, 'load', init, false);