//
// Title: JavaScript helper functions
//
// Site: www.discoverymountain.de
//
// Copyright (c) 2001-2004 by FeLIX
//


function pop(img,name,x,y)
{
	x+=20;
	y+=20;
	var fen=window.open(img,name,"width="+x+",height="+y+",scrollbars=no,toolbar=no,menubar=no,location=no,resizable=yes,status=yes,marginwidth=0");
	fen.focus();
}


function MM_openBrWindow(theURL,winName,features)
{
	window.open(theURL,winName,features);
}

function ContactFeLIX()
{
	MM_openBrWindow('http://virtual-entertainment-academy.de/hof/contact.html','','scrollbars=yes,width=300,height=400')
}

function EnterRides()
{
	MM_openBrWindow('http://virtual-entertainment-academy.de/hof/submit.html','','scrollbars=yes,width=300,height=450')
}


var loc = false;

/*
 * Display Path Links
 */
 
var pagenames = new Array(
"space2.fms.de","discoverymountain.de",
"sm.dlpfan.org","discoverymountain.de",
"bbc","BBC Documentary",
"site","Site Info",
"edv","EDV",
"mom","MOM",
"eltonjohn","Elton John Concert",
"festival","Space Festival",
"rockshock","Rock Shock Show",
"lightspeed","Lightspeed Photography",
"parkmaps","Park Maps",
"insidedlp","Inside Disneyland Paris",
"hiddenmickeys","Hidden Mickeys",
"desktop","Desktop Wallpapers",
"halloffame","Hall of Fame",
"improve","Improvement Ideas",
"video","Safety Video",
"cannon","Columbiad Cannon",
"mainentrance","Main Entrance",
"trains","Rocket Trains",
"julesverne","Jules Verne",
"discovery","Discovery Mountain",
"loading","Loading Area",
"",""
);

function ShowPath()
{
	var url = window.location.href.replace(/\/$/,"").replace(/\.html/,"").replace(/\/index/,"");
	var parts = url.split("/");
	var link = window.location.protocol;
	
	if (link.indexOf("file") >= 0) {
		loc = true;
	} else {
		link = link + "/";
	}

	with(document) {
	
//	write("You are here: ");

	for (i=2; i<parts.length; i++) {
		// Link
		link = link + "/" + parts[i];

		if (i<parts.length-1) {
			var link2 = link;
			if (loc) {
				link2 = link2 + "/index.html";
			}
			write("<a href=\"" + link2 + "\">");
		}

		// Rewrite directory parts
		var j = 0;
		var s = "";
		while(1) {
			if (pagenames[j] == "") break;
			if (pagenames[j] == parts[i]) {
				s = pagenames[j+1];
				break;
			}
			j=j+2;
		}
		
		if (s!="") {
			write(s);
		} else {
			// Capitalize 1st letter except for hostname
			if (i > 2) write(parts[i].substr(0,1).toUpperCase() + parts[i].substr(1));
			else write(parts[i]);
		}

		// Separator
		if (i < parts.length-1) {
			write("</a>");
			
//			if (loc) {
				write(" &gt; ");
//			} else {
//				write("<img src=\"/pfeil.gif\" hspace='2'>");
//			}
		}
	}
	}
}
