/*******************************************************************************FILE: mud_Scripts.jsREQUIRES: mud_API.jsAUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/VERSION: 1.0 - initial public releaseDATE: 07/22/2005--------------------------------------------------------------------------------This file is part of MudFadeGallery.	MudFadeGallery is free software; you can redistribute it and/or modify	it under the terms of the GNU General Public License as published by	the Free Software Foundation; either version 2 of the License, or	(at your option) any later version.		MudFadeGallery is distributed in the hope that it will be useful,	but WITHOUT ANY WARRANTY; without even the implied warranty of	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the	GNU General Public License for more details.		You should have received a copy of the GNU General Public License	along with Foobar; if not, write to the Free Software	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*******************************************************************************/////////////////////////////////////////////////////////////////////////////////// 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 mudInit() {	initDHTMLAPI();	setOnMouseClick();	// images gallery	// load images note: imgsGallery isn't a array of images, just strings to hold location	imgsGallery[0] = "/content/photo/loveinshower.jpg";	imgsGallery[1] = "/content/photo/lovebaby.jpg";	imgsGallery[2] = "/content/photo/gameboy.jpg";	imgsGallery[3] = "/content/photo/orange.jpg";		imgs = new MudFadeGallery('imgs', 'imgDisplay', imgsGallery);}////////////////////////////////////////////////////////////////////////////////// EVENTS// gecko, safari, konqueror and genericif (typeof window.addEventListener != 'undefined') {	window.addEventListener('load', mudInit, false);}// opera 7else if (typeof document.addEventListener != 'undefined') {	document.addEventListener('load', mudInit, false);}// win/ieelse if (typeof window.attachEvent != 'undefined') {	window.attachEvent("onload", mudInit);}// restelse {	window.onload = mudInit;}