

var c = new Image(1,1);
c.src = "http://xcounter.de/php/counter_mrch.php3?id=3136&art=unsichtbar&breite=" + screen.width + "&seite=schwartau_extra&hoehe=" + screen.height + "&ref=" + document.referrer;









c = 0;

function finished() {

	window.setTimeout('ffinished()', 1000);

}


function ffinished() {

	$('loading-progress').innerHTML = parseInt($('loading-progress').innerHTML) + 6;

	c++;

	if(c == 15) {

		$('loading-progress').innerHTML = '100';
		window.setTimeout('initialize()', 1000);

	}

}




function initialize() {

	new Effect.Fade('loading');

	Element.setStyle('sl_promo', { display:'block' });

	new Effect.Appear('credits');


	goTo = 0;

	if(locID = getLocationIdentifier()) {

		if(!isNaN(locID) && locID > 0 && locID < 15) {
			goTo = (locID-1);
		}

	}


	showImg(goTo);

}





function showImg(which) {

	var oldImg = which;
	var newImg = which+1;


	if(oldImg == 15) { newImg = 1; }



	if($('img'+oldImg)) {
		$('img'+oldImg).blur();
		new Effect.Fade('img'+oldImg, {afterFinish:function() { $('img'+oldImg).style.zIndex = '1'; }});
	}

	if($('img'+newImg)) {
		$('img'+newImg).style.zIndex = '100'+newImg;
		window.setTimeout('new Effect.Appear(\'img'+newImg+'\');',500);
		window.location.href = getLocation() + '#' + newImg;
		thisLocation = getLocation() + '#' + newImg;
	}



	return false;

}










function getLocation() {

	return window.location.href.replace(/\#.+/,"");

}



function getLocationIdentifier() {

	var locID;

	loc = window.location.href;
	hashPos = loc.indexOf('#');

	if(hashPos != -1) {

		tmpLocID = loc.substring((hashPos+1));
		if(!isNaN(tmpLocID)) { locID = tmpLocID; }

	}


	if(locID == '') { return false; }
	else { return locID; }

}

