//var baseURL = "http://127.0.0.1/romanum/data/top_docs/";
//var menuURL = "http://127.0.0.1/romanum/data/menu/";
//var helpURL = "http://127.0.0.1/romanum/data/help/";
//var commURL = "http://127.0.0.1/romanum/data/kommentar/";
var baseURL = "http://library.thinkquest.org/C006401/data/top_docs/";
var menuURL = "http://library.thinkquest.org/C006401/data/menu/";
var helpURL = "http://library.thinkquest.org/C006401/data/help/";
var commURL = "http://library.thinkquest.org/C006401/data/kommentar/";

var GESCHICHTE = 0;
var KULTUR = 1;
var UEBERSETZUNGEN = 2;
var FEEDBACK = 3;
var SUCHEN = 4;

function updateEnvironment(menu, entry, lang)
{
	if (lang != "_en") lang = "";

	loadTopMenus(menu, entry, lang);

	//open menu and highlight entry
	if (parent.left)
	{
		parent.left.openMenu(menu, false);
		parent.left.selectEntry(menu, entry);
	}
}


function loadTopMenus(menu, entry, lang)
{
	var oben = baseURL + menu + '_' + entry + '_oben' + lang + '.html';
	var unten = baseURL + menu + '_' + entry + '_unten' + lang + '.html';

	//load the correct top frames
	if ((parent.oben) && (parent.unten))
	{
		if (parent.oben.location.href != oben) parent.oben.location.href = oben;
		if (parent.unten.location.href != unten) parent.unten.location.href = unten;
	}

}

//opens new window of the specified size and with the given html-document in it
function openNewWindow(width, height, what)
{
	var dingsda = window.open(what, 'newOne', 'resizable=yes,scrollbars=yes,status=yes,width='+width+',height='+height);
}

function showHelp(doc)
{
	var dingsbums = window.open(helpURL + doc, 'helpFrame', 'resizable=yes,scrollbars=yes,status=yes,width=300,height=400');
}

function showComment(site_id, lang)
{
	open(commURL + "comment.php3?lang=" + lang + "&whattodo=showAll&site_id=" + site_id,"commWin","width=310,height=400,screenX=0,screenY=0,scrollbars=yes,status=yes");
}