/*******************************************************************************

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 setOnMouseClick2() {
	var elements = document.getElementsByTagName("a");
	for (var i = 0; i < elements.length; i++) {
		switch(elements[i].className) {
			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;
			case "s4":
				elements[i].onclick = function() {
					 imgs.showImg(4);
					 return false;
				}
				break;
			case "s5":
				elements[i].onclick = function() {
					 imgs.showImg(5);
					 return false;
				}
				break;
			case "s6":
				elements[i].onclick = function() {
					 imgs.showImg(6);
					 return false;
				}
				break;
			case "s7":
				elements[i].onclick = function() {
					 imgs.showImg(7);
					 return false;
				}
				break;
			case "s8":
				elements[i].onclick = function() {
					 imgs.showImg(8);
					 return false;
				}
			break;case "s9":
				elements[i].onclick = function() {
					 imgs.showImg(9);
					 return false;
				}
				break;
			case "s10":
				elements[i].onclick = function() {
					 imgs.showImg(10);
					 return false;
				}
				break;
			case "s11":
				elements[i].onclick = function() {
					 imgs.showImg(11);
					 return false;
				}
				break;
			case "s12":
				elements[i].onclick = function() {
					 imgs.showImg(12);
					 return false;
				}
				break;
			case "s13":
				elements[i].onclick = function() {
					 imgs.showImg(13);
					 return false;
				}
				break;
				case "s14":
				elements[i].onclick = function() {
					 imgs.showImg(14);
					 return false;
				}
				break;
				case "s15":
				elements[i].onclick = function() {
					 imgs.showImg(15);
					 return false;
				}
				break;
				case "s16":
				elements[i].onclick = function() {
					 imgs.showImg(16);
					 return false;
				}
				break;
		}
	}
}

////////////////////////////////////////////////////////////////////////////////
// INIT

function init() {
	setOnMouseClick2();
	// 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/projekte/bangkok/bangkok_1.jpg";
	imgsGallery[0].title = "Die Halle klassischer thailändischer Bronzeabgüsse in der Silpakorn University Bangkok <small></small>";
	imgsGallery[0].caption = "";
	imgsGallery[0].link = "";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = "images/projekte/bangkok/bangkok_2.jpg";
	imgsGallery[1].title = "Der Phra Pathom Chedi in Nakon Pathom <small></small>";
	imgsGallery[1].caption = "";
	imgsGallery[1].link = "";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = "images/projekte/bangkok/bangkok_3.jpg";
	imgsGallery[2].title = "Wat Phra Kaeo, Bangkok <small></small>";
	imgsGallery[2].caption = "";
	imgsGallery[2].link = "";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = "images/projekte/bangkok/bangkok_4.jpg";
	imgsGallery[3].title = "Spiegelmosaik im Wat Phra Kaeo, Bangkok <small></small>";
	imgsGallery[3].caption = "";
	imgsGallery[3].link = "";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = "images/projekte/bangkok/bangkok_5.jpg";
	imgsGallery[4].title = "Perlmuttintarsie in den Füßen des Ruhenden Buddha im Wat Pho, Bangkok <small></small>";
	imgsGallery[4].caption = "";
	imgsGallery[4].link = "";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = "images/projekte/bangkok/bangkok_6.jpg";
	imgsGallery[5].title = "Siam 9, Marmor und Stahl, 55 x 55 x 5 cm, 2008 <small></small>";
	imgsGallery[5].caption = "";
	imgsGallery[5].link = "";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = "images/projekte/bangkok/bangkok_7.jpg";
	imgsGallery[6].title = "Siam 9, Ausschnitt <small></small>";
	imgsGallery[6].caption = "";
	imgsGallery[6].link = "";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = "images/projekte/bangkok/bangkok_8.jpg";
	imgsGallery[7].title = "Siam 4, Marmor und Stahl, 70 x 70 x 3 cm, 2008 <small></small>";
	imgsGallery[7].caption = "";
	imgsGallery[7].link = "";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = "images/projekte/bangkok/bangkok_9.jpg";
	imgsGallery[8].title = "Siam 7, Marmor und Stahl, 15 x 15 x 5 cm, 2008 <small></small>";
	imgsGallery[8].caption = "";
	imgsGallery[8].link = "";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = "images/projekte/bangkok/bangkok_10.jpg";
	imgsGallery[9].title = "Siam 6, Marmor und Stahl, 20 x 20 x 4 cm, 2008 <small></small>";
	imgsGallery[9].caption = "";
	imgsGallery[9].link = "";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = "images/projekte/bangkok/bangkok_11.jpg";
	imgsGallery[10].title = "Siam 8, Marmor und Stahl, 25 x 25 x 4 cm, 2008, Privatsammlung Korea <small></small>";
	imgsGallery[10].caption = "";
	imgsGallery[10].link = "";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = "images/projekte/bangkok/bangkok_12.jpg";
	imgsGallery[11].title = "Siam 10, Marmor und Stahl, 20 x 20 x 5 cm, 2008 <small></small>";
	imgsGallery[11].caption = "";
	imgsGallery[11].link = "";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = "images/projekte/bangkok/bangkok_13.jpg";
	imgsGallery[12].title = "Siam 11, Marmor und Stahl, 20 x 20 x 5 cm, 2008 <small></small>";
	imgsGallery[12].caption = "";
	imgsGallery[12].link = "";

	imgsGallery[13] = new Object();
	imgsGallery[13].image = "images/projekte/bangkok/bangkok_14.jpg";
	imgsGallery[13].title = "Ausstellungsansicht in der Boroma Rajakumari Art Gallery, Silpakorn University, Nakon Pathom, 2008 <small></small>";
	imgsGallery[13].caption = "";
	imgsGallery[13].link = "";
	
	imgsGallery[14] = new Object();
	imgsGallery[14].image = "images/projekte/bangkok/bangkok_15.jpg";
	imgsGallery[14].title = "Studenten der Fakultät für Bildhauerei der Silpakorn University, Bangkok <small></small>";
	imgsGallery[14].caption = "";
	imgsGallery[14].link = "";
	
	imgsGallery[15] = new Object();
	imgsGallery[15].image = "images/projekte/bangkok/bangkok_16.jpg";
	imgsGallery[15].title = "Ausstellungsansicht in der Boroma Rajakumari Art Gallery, Silpakorn University, Nakon Pathom, 2008 <small></small>";
	imgsGallery[15].caption = "";
	imgsGallery[15].link = "";
	

	
	var start = 0;
	imgs = new MudFadeGallery('imgs', 'imgDisplay', imgsGallery, {startNum: start, preload: true, autoplay: 0});
	
	// set the initial captions
	var title = (imgsGallery[0].title) ? imgsGallery[0].title : "";
	var caption = (imgsGallery[0].caption) ? imgsGallery[0].caption : "";
	$("imgDisplay_title").innerHTML = title;
	$("imgDisplay_caption").innerHTML = caption;
	$("imgDisplay_number").innerHTML = "1 / " + imgsGallery.length;
	$("imgDisplay").src = imgsGallery[start].image;
	$("imgDisplay_link").href = imgsGallery[start].link;
	$("imgDisplay_link").title = imgsGallery[start].title;
}

////////////////////////////////////////////////////////////////////////////////
// EVENTS

Event.observe(window, 'load', init, false);
