window.defaultStatus = "KAPUZINERGARTEN Hotel Restaurant"

var MountainShowOn = true;
var t
var j = 0;

var mountains = new Array;
mountains[0]  = new Array( 1,  0,34);    // Burkheimer Schlossgarten        
mountains[1]  = new Array( 2, 10,34);    // Burkheimer Schlossberg          
mountains[2]  = new Array( 3, 26,35);    // Burkheimer Feuerberg            
mountains[3]  = new Array( 4, 43,34);    // Jechtinger Hochberg             
mountains[4]  = new Array( 5, 61,34);    // Bischoffinger Steinbuck         
mountains[5]  = new Array( 6, 65,34);    // Oberrotweiler Henkenberg        
mountains[6]  = new Array( 7, 68,35);    // Bischoffinger Enselberg         
mountains[7]  = new Array( 8, 70,34);    // Bischoffinger Rosenkranz        
mountains[8]  = new Array( 9, 72,34);    // Oberrotweiler Kirchberg         
mountains[9]  = new Array(10, 76,34);    // Oberrotweiler K&auml;sleberg    
mountains[10] = new Array(11,103,31);    // Oberbergener Bassgeige          
mountains[11] = new Array(12,116,31);    // Schelinger Kirchberg            
mountains[12] = new Array(13,122,30);    // Achkarrer Schlossberg           
mountains[13] = new Array(14,190,28);    // Ihringer Winklerberg            
mountains[14] = new Array(15,206,27);    // Blankenhornsberger Doktorgarten 
mountains[15] = new Array(16,248,31);    // Ihringer Fohrenberg             
mountains[16] = new Array(17,271,34);    // Ihringer Winklerberg            
mountains[17] = new Array(18,290,36);    // Wasenweiler Kreuzhalde          
mountains[18] = new Array(19,328,31);    // Glottert&auml;ler Eichberg      
mountains[19] = new Array(20,341,33);    // Gottenheimer Kirchberg          
mountains[20] = new Array(21,391,34);    // Freiburger Schlossberg          
mountains[21] = new Array(22,414,33);    // Freiburger Lorettoberg          
mountains[22] = new Array(23,440,32);    // Merdinger B&uuml;hl             

function hidemountains() {
	for (i = 0; i < mountains.length; i++ ) {
		// alert("I="+i+" von "+mountains.length+" - "+mountains[i][0]+","+mountains[i][1]+",0,'hidden'");
		place_mountainnamenow( mountains[i][0], mountains[i][1], 0, "hidden");
	}
}

function BildCheck() { 
	var BildStatus = true;
	for(i = 0; i < document.images.length; ++i)
	{
		if(document.images[i].complete == true)
			BildStatus = true;
		else
			BildStatus = false;
	}
	return BildStatus;
}

function runMountainShow(verzoegerungszeit,zeitjeelement){
	if(BildCheck()) {
		t = setTimeout('MountainShow('+zeitjeelement+')', verzoegerungszeit);
	}
	else {
		t = setTimeout('runMountainShow('+verzoegerungszeit+','+zeitjeelement+')', 100);
	}
}

function MountainShow(zeitjeelement){
  if( ( j <= mountains.length ) && MountainShowOn ) {
		// alert("J="+j+" von "+mountains.length+" - "+mountains[j][0]+","+mountains[j][1]+","+mountains[j][2]+",'visible'");
		hidemountains();
		if( j < mountains.length ) {
			place_mountainnamenow( mountains[j][0], mountains[j][1], mountains[j][2], 'visible');
			j++;
			t = setTimeout('MountainShow('+zeitjeelement+')', zeitjeelement);
		}
	}
}

function place_mountainname(mountainnr,xpos,lineheight,visibilitytext) {
	MountainShowOn = false;
	hidemountains();
	place_mountainnamenow(mountainnr,xpos,lineheight,visibilitytext);
}

function place_mountainnamenow(mountainnr,xpos,lineheight,visibilitytext) {
	widthofcenteredpic = 688;
	widthoftextbox = 250;
	xoffset = (-widthofcenteredpic/2)-(widthoftextbox/2)+106;
	toppos = 253;

	if (document.getElementById) {
		thiselement = document.getElementById("mountain"+mountainnr).style;
		lineelement = document.getElementById("hotel").style;
		scriptelement = document.getElementById("scripte").style;
	}
	else if (document.layers) {
		thiselement = document.layers["mountain"+mountainnr];
		lineelement = document.layers["hotel"];
		scriptelement = document.layers["scripte"];
	}
	else if (document.all) {
		thiselement = document.all["mountain"+mountainnr].style;
		lineelement = document.all["hotel"].style;
		scriptelement = document.all["scripte"].style;
	}
	
	thiselement.visibility = visibilitytext;
	thiselement.display = ((visibilitytext == "visible")? "block" : "none" ); 
	thiselement.position = "absolute";
	thiselement.top = ""+(toppos)+"px";
	thiselement.left = "50%";
	thiselement.height = "25px";
	thiselement.marginLeft = ""+(xoffset+xpos)+"px";
	thiselement.color = "white";

	linexoffset = xoffset+125;
	linetoppos = toppos+16;

	lineelement.visibility = visibilitytext;
	lineelement.display = ((visibilitytext == "visible")? "block" : "none" ); 
	lineelement.position = "absolute";
	lineelement.top = ""+(linetoppos)+"px";
	lineelement.left = "50%";
	lineelement.marginLeft = ""+(linexoffset+xpos)+"px";
	lineelement.width = "0px";
	lineelement.height = ""+(lineheight)+"px";
	lineelement.borderLeft = "1px solid #660033";
	
	scriptelement.visibility = "hidden";
}
