// sml.js

var basedir = "/";

firstps = 0;

var preview_offset = 0;

// Browserkompatibilitaet

var isNav, isIE;
var coll = "";
var styleObj = "";

if (parseInt(navigator.appVersion) >= 4) {
	if (navigator.appName == "Netscape") {
		isNav = true;
	} else {
		isIE = true;
		//coll = "all.";
		//styleObj = ".style";
	}
}

function shuffle() {

	var ps = new Array;
	ps[0] = new Object;
	ps[1] = new Object;
	ps[2] = new Object;
	ps[3] = new Object;
	ps[4] = new Object;
	ps[5] = new Object;
	ps[6] = new Object;
	ps[7] = new Object;
	ps[8] = new Object;
	ps[9] = new Object;
	ps[10] = new Object;
	ps[11] = new Object;
	ps[12] = new Object;
	ps[13] = new Object;
	ps[14] = new Object;
	ps[15] = new Object;
	ps[16] = new Object;
	ps[17] = new Object;
	ps[18] = new Object;
	ps[19] = new Object;
	ps[20] = new Object;
	ps[21] = new Object;
	ps[22] = new Object;
	ps[23] = new Object;
	ps[24] = new Object;
	ps[25] = new Object;
	ps[26] = new Object;
	ps[27] = new Object;
	ps[28] = new Object;
	
	ps[0].src = basedir + "i/head_maku.jpg";
	ps[0].alt = "Ruud";
	ps[0].href = basedir + "spieler/ruud.shtml";

	ps[1].src = basedir + "i/head_noth.jpg";
	ps[1].alt = "das gute T";
	ps[1].href = basedir + "spieler/das_gute_t.shtml";

	ps[2].src = basedir + "i/head_rasc.jpg";
	ps[2].alt = "Haubitzn";
	ps[2].href = basedir + "spieler/haubitzn.shtml";

	ps[3].src = basedir + "i/head_rofr.jpg";
	ps[3].alt = "Al Bano";
	ps[3].href = basedir + "spieler/al_bano.shtml";

	ps[4].src = basedir + "i/head_mabr.jpg";
	ps[4].alt = "Birgit";
	ps[4].href = basedir + "spieler/birgit.shtml";

	ps[5].src = basedir + "i/head_stdu.jpg";
	ps[5].alt = "Ken";
	ps[5].href = basedir + "spieler/ken.shtml";

	ps[6].src = basedir + "i/head_thre.jpg";
	ps[6].alt = "Ulf";
	ps[6].href = basedir + "spieler/ulf.shtml";

	ps[7].src = basedir + "i/head_anho.jpg";
	ps[7].alt = "Cheffe";
	ps[7].href = basedir + "spieler/cheffe.shtml";

	ps[8].src = basedir + "i/head_chsp.jpg";
	ps[8].alt = "Spißl";
	ps[8].href = basedir + "spieler/spissl.shtml";

	ps[9].src = basedir + "i/head_hily.jpg";
	ps[9].alt = "Huey Lewis";
	ps[9].href = basedir + "spieler/huey_lewis.shtml";

	ps[10].src = basedir + "i/head_mlko.jpg";
	ps[10].alt = "Bin Laden";
	ps[10].href = basedir + "spieler/bin_laden.shtml";

	ps[11].src = basedir + "i/head_hofr.jpg";
	ps[11].alt = "Porno";
	ps[11].href = basedir + "spieler/porno.shtml";

	ps[12].src = basedir + "i/head_mabo.jpg";
	ps[12].alt = "Spätzlebomber";
	ps[12].href = basedir + "spieler/spaetzlebomber.shtml";

	ps[13].src = basedir + "i/head_jumi.jpg";
	ps[13].alt = "Präse";
	ps[13].href = basedir + "spieler/praese.shtml";

	ps[14].src = basedir + "i/head_sami.jpg";
	ps[14].alt = "Serbischer Patient";
	ps[14].href = basedir + "spieler/serbischer_patient.shtml";

	ps[15].src = basedir + "i/head_alma.jpg";
	ps[15].alt = "Söldner";
	ps[15].href = basedir + "spieler/soeldner.shtml";

	ps[16].src = basedir + "i/head_rahe.jpg";
	ps[16].alt = "Can";
	ps[16].href = basedir + "spieler/can.shtml";

	ps[17].src = basedir + "i/head_ayga.jpg";
	ps[17].alt = "Ayndn";
	ps[17].href = basedir + "spieler/ayndn.shtml";

	ps[18].src = basedir + "i/head_jdsc.jpg";
	ps[18].alt = "Seehool";
	ps[18].href = basedir + "spieler/seehool.shtml";

	ps[19].src = basedir + "i/head_pesc.jpg";
	ps[19].alt = "Buli";
	ps[19].href = basedir + "spieler/buli.shtml";

	ps[20].src = basedir + "i/head_stkl.jpg";
	ps[20].alt = "Kaktus";
	ps[20].href = basedir + "spieler/kaktus.shtml";

	ps[21].src = basedir + "i/head_fene.jpg";
	ps[21].alt = "Owen";
	ps[21].href = basedir + "spieler/owen.shtml";
	
	ps[22].src = basedir + "i/head_oksu.jpg";
	ps[22].alt = "Oki";
	ps[22].href = basedir + "spieler/oki.shtml";

	ps[23].src = basedir + "i/head_peho.jpg";
	ps[23].alt = "Treterpeter";
	ps[23].href = basedir + "spieler/treterpeter.shtml";

	ps[24].src = basedir + "i/head_rakr.jpg";
	ps[24].alt = "Ralph";
	ps[24].href = basedir + "spieler/ralph.shtml";

	ps[25].src = basedir + "i/head_chme.jpg";
	ps[25].alt = "Chris";
	ps[25].href = basedir + "spieler/chris.shtml";

	ps[26].src = basedir + "i/head_mabod.jpg";
	ps[26].alt = "Martin";
	ps[26].href = basedir + "spieler/martin.shtml";

	ps[27].src = basedir + "i/head_pekr.jpg";
	ps[27].alt = "Sternderl";
	ps[27].href = basedir + "spieler/sternderl.shtml";

	ps[28].src = basedir + "i/head_chge.jpg";
	ps[28].alt = "Gigi";
	ps[28].href = basedir + "spieler/gigi.shtml";

	var images = 10; // Anzahl der dargestellten Bilder 

	if (firstps == ps.length) {
		firstps = 0;
	}

	for (i = 1; i <= images; ++i) {
		var index = firstps + i - 1;
		if (index >= ps.length) {
			index = index - ps.length;
		}
		document.images["ps" + i].src = ps[index].src;
		document.images["ps" + i].alt = ps[index].alt;
		if (isIE) {
			a = eval("document.all.a" + i);
		} else {
			a= document.links["a" + i];		
		}
		if (a) {
			a.href = ps[index].href;
		}
		
	}

	++firstps;
}

function initShuffle(offset) {
	if (offset >= 0 && offset <= 20) {
		firstps = offset;
	}

	shuffleTimer = setInterval("shuffle()", 2000);
}
	
/** 
 * @fileoverview imale.js: hides E-Mail-Addresses
 *
 * @author Andreas Schosser {@link http://www.galayxn.de/ www.galayxn.de}
 */

/**
 * @version 0.1
 * @author Andreas Schosser
 * @constructor
 */
function Imale() {

	var objPrefix = "im_";
	var delim = " AT ";
	
	/**
	 * @type array of objects
	 */
	this.items = new Array;
	var i = 0;
	while (document.getElementById(objPrefix + i)) {
		var item = new Object();
		var s = document.getElementById(objPrefix + i).innerHTML;
		if (s.indexOf("<") > 0) {
			var delFrom = s.indexOf("<");
			var delTo = s.indexOf(">") + 1;
		} else {
			var delFrom = s.indexOf(delim) + 1;
			var delTo = s.indexOf(delim) + delim.length - 1;
		}
		item.localName = s.substring(0, delFrom - 1);
		item.host = s.substring(delTo + 1, s.length);
		item.address = item.localName + "@" + item.host;
		this.items[i] = item;
		++i;
	}	


	/**
 	 * @returns false
 	 * @author Andreas Schosser
 	 */
	this.display = function() {
		for (i = 0; i < this.items.length; ++i) {
			if (document.getElementById(objPrefix + i)) {
				document.getElementById(objPrefix + i).innerHTML = "<a href='mailto:" + this.items[i].address + "'>" + this.items[i].address + "</a>";
			}
		}
		return false;
	}
	return this;
}



function initPage(id) {
	initShuffle(id);
	im = new Imale();
	im.display();
}


