var afooter= '';

function writeFooter()
{
document.write(afooter);
}


function languageSwitch(langNum)
{
if ( langNum == 3 ) { thisText = "L'interface du jeu est disponible en français. Mais pas ce site. Désolé."; }
else if ( langNum == 4 ) { thisText = "Die interface des Spiels gibt es auch auf Deutsch. Aber leider nicht diese Seite."; }
else if ( langNum == 5 ) { thisText = "The Game interface is available in Hungarian. But not this website."; }
else if ( langNum == 6 ) { thisText = "The Game interface is available in Polish. But not this website."; }
alert(thisText);
}

navtext_english = new Array("Home","About...","Credits","- Download The Game","- Name Your Deer","The Forest","The Ruin","The Pond","The Old Oak", "The Playground","De Drinkplaats","The Fawn", "ABIOGENESIS", "Forest Actions","Forest Magic","------Endless Halloween","------Endless Carnival","- Gallery","- Community","Frequently Asked Questions","Products, Donations & Subscriptions","(language)","Wallpapers","Join Open Beta");

navtext_dutch = new Array("Thuis","Over...","Colofon","- Download Het Spel","- Geef je Hert een Naam","Het Woud","De Ruine","Het Meer", "De Oude Eik", "Het Spieltuin","De Drinkplaats","Het Hertje", "ABIOGENESIS", "Woudactiviteiten","Woudmagie","------Endless Halloween","------Endless Carnival","- Galerie","- Discussies (Engels)","Vragen &amp; Antwoorden","Donaties & Abonnementen","(taal)","Behangselpapiertjes","Open Beta");

navtext_ger = new Array("Heim","Ueber...","Credits","- Download das Spiel","- Gib deinem Hirsch einen Namen","Der Wald","Die Ruine","Der Teich","Die alte Eiche", "The Playground","De Drinkplaats","Das Rehkitz", "ABIOGENESIS", "Wald Aktivit&auml;ten","Wald Magie","------Endless Halloween","------Endless Carnival","- Gallerie","- Diskussionsforum","Fragen &amp; Antworten","Unterstützung & Abonnements","(Sprache)","Wallpapers","Open Beta");


language = location.search.substring(1,location.search.length);

//if ( forcedlanguage ) { language = forcedlanguage; }

//if ( !language )
//	{
//DISABLED BECAUSE FIREFOX DOESN'T ALLOW ACCESS TO LOCATION.SEARCH IN PARENT FRAMES
//	language = parent.location.search.substring(1,parent.location.search.length);//required for registration page (frameset)
	if ( !language )
		{
		language = "english";
		}
//	}

navtext = eval("navtext_" + language );

thisPath = "http://tale-of-tales.com/TheEndlessForest/";
//DEV
thisPath = location.href.substring(0,location.href.lastIndexOf("/")) + "/";

curSearch = location.search;

var	mytext = '<ul>';
	mytext += '<li><a href="' + thisPath + 'home.html' + curSearch + '">' + navtext[0] +'</a></li>';
	//mytext += '<li><a href="' + thisPath + 'statement.html' + curSearch + '">' + navtext[1] +'</a></li>';
	mytext += '<li><a href="' + thisPath + 'credits.html' + curSearch + '">' + navtext[2] +'</a></li>';
//	mytext += '<li><BR></li>';
//	mytext += '<li><a href="' + thisPath + 'download.html' + curSearch + '"><b>' + navtext[19] +'</b></a></li>';
	mytext += '<li><BR></li>';
	mytext += '<li><a href="' + thisPath + 'download.html' + curSearch + '"><b>' + navtext[3] +'</b></a></li>';
	mytext += '<li><a href="' + thisPath + 'register.html' + curSearch + '"><b>' + navtext[4] +'</b></a></li>';
	mytext += '<li><BR></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/firstforest_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'firstforest.html' + curSearch + '">' + navtext[5] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/ruin_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'ename.html' + curSearch + '">' + navtext[6] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/pond_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'thepond.html' + curSearch + '">' + navtext[7] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/oldoak_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'oldoak.html' + curSearch + '">' + navtext[8] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/playground_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'playground.html' + curSearch + '">' + navtext[9] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/drinkplaats_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'drinkplaats.html' + curSearch + '">' + navtext[10] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/fawn_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'fawn.html' + curSearch + '">' + navtext[11] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/twingod_symbol_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'abiogenesis.html' + curSearch + '">' + navtext[12] +'</a></li>';
	mytext += '<li><BR></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/forest_activities_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'actions.html' + curSearch + '">' + navtext[13] +'</a></li>';
	mytext += '<li><img class="symbol" src="' + thisPath + 'images/symbols/forest_magic_16.gif" WIDTH=16 HEIGHT=16 ALIGN=absmiddle> <a href="' + thisPath + 'magic.html' + curSearch + '">' + navtext[14] +'</a></li>';
	mytext += '<li><a href="' + thisPath + 'halloween.html' + curSearch + '">' + navtext[15] +'</a></li>';
	mytext += '<li><a href="' + thisPath + 'carnival.html' + curSearch + '">' + navtext[16] +'</a></li>';
	mytext += '<li><BR></li>';
	mytext += '<li><a href="javascript:openWindow(\'gallery.html\',840,600)"><b>' + navtext[17] +'</b></a></li>';
	mytext += '<li><b><a href="community.html">' + navtext[18] +'</a></b></li>';
	mytext += '<li><BR></li>';
	mytext += '<li><a href="' + thisPath + 'faq.html' + curSearch + '">' + navtext[19] +'</a></li>';
	mytext += '<li><b><a href="donate.html" style="color:#E34E26">' + navtext[20] +'</a></b></li>';
	mytext += '<li><BR></li>';

	thisLocation = location.href.substring(0,location.href.indexOf("?"));
	//if ( navtext[17] == "English" ){ thisSearch = "?english" }
	//else if ( navtext[17] == "Nederlands" ){ thisSearch = "?dutch" }

	mytext += '<li><I><a href="' + thisLocation + '?english">English</a></I></li>';
	mytext += '<li><I><a href="' + thisLocation + '?dutch">Nederlands</a></I></li>';
	//mytext += '<li><I><a href="javascript:languageSwitch(4)">Deutsch</a></I></li>';
	mytext += '<li><I><a href="' + thisLocation + '?ger">Deutsch</a></I></li>';
	mytext += '<li><I><a href="javascript:languageSwitch(3)">Fran&ccedil;ais</a></I></li>';
	mytext += '<li><I><a href="javascript:languageSwitch(5)">Magyar</a></I></li>';
	mytext += '<li><I><a href="javascript:languageSwitch(6)">Polski</a></I></li>';
	mytext += '<li><I><a href="http://www.hmx-12.net/~virgil7/games/theendlessforest/index.html" target="_blank">&#26085;&#26412;&#35486;</a></I></li>';
	mytext += '</ul>';

function writeNavigation(color)
{
document.write("<IMG SRC='" + thisPath + "images/tab-top" + color + ".gif'>");
document.write(mytext);
document.write("<IMG SRC='" + thisPath + "images/tab-bottom" + color + ".gif'>");
}



			function mailUs(address)
				{
					location.href = "mailto:" + address + "@tale-of-tales.com";
				}
		
			function loccy()
				{
					if ( location.href == parent.location.href )
				{
			location.href = "told.html" + location.hash;
				}
					else if ( parent.location.hash != location.hash )
				{
			location.href = location.href + parent.location.hash;
				}
			}
			
var curPic;

function showGallery(picNum)
{
language = location.search.substring(1,location.search.length);
if ( !language ) { language = "english"; };
curPic= picNum;
var theParameters = "WIDTH=650,HEIGHT=490,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no"
baseURL = "http://tale-of-tales.com/TheEndlessForest/";
//baseURL = "file:///Y:/PROJECTS/tale-of-tales.com/TheEndlessForest/";
window.open(baseURL + "images/screenshots/gallery.html?" + language,"_blank",theParameters);
}

function openWindow(theURL,theWidth,theHeight)
{
var theParameters = "WIDTH=" + theWidth + ",HEIGHT=" + theHeight + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes"
window.open(theURL,"_blank",theParameters);
}

function showWallpapers()
{
language = location.search.substring(1,location.search.length);
if ( !language ) { language = "english"; };
var theParameters = "WIDTH=650,HEIGHT=490,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no"
window.open("http://tale-of-tales.com/TheEndlessForest/images/wallpapers/index.html?" + language,"_blank",theParameters);
}