// ----------------------------------------------------------------------------
// Switch all frames to a different language.
// ----------------------------------------------------------------------------
// KH: Konrad Holl
// ----------------------------------------------------------------------------
// 1999/10/18: Initial release (KH)
// ----------------------------------------------------------------------------
function switchLanguage(fromLang, toLang) {
	//
	// If we're located in kit section, there's a second frameset to
	// take care of.
	//
	if (parent.content.buildmenu) {
		//
		// Replace the menu and content in the second frameset.
		//
		parent.content.buildmenu.location.replace("../" + toLang + "/stadien.htm");
		var location = new String(parent.content.buildlog.location);
		var locationParts = location.split("/" + fromLang + "/");
		parent.content.buildlog.location.replace(locationParts[0] + "/" + toLang + "/" + locationParts[1]);
	}
	else {
		//
		// Replace the content frame.
		//
		var location = new String(parent.content.location);
		var locationParts = location.split("/" + fromLang + "/");
		parent.content.location.replace(locationParts[0] + "/" + toLang + "/" + locationParts[1]);
	}
	//
	// Replace the menu at the bottom.
	//
	parent.control.location.replace("../" + toLang + "/ctrlbar.htm");
}

