/*
 * Force the browser to load the index page to allow the menu structure 
 * to be seen. Navigates to the correct page.
 */
function loadFrames(path) {
	if (self.parent.frames.length == 0) {
		if (path == null) {
			path = "";
		}
		else if (path.substring(path.length) != "/") {
			path += "/";
		}
		var url = window.location.href;
		var start = url.lastIndexOf("/");
		var end = url.lastIndexOf(".html");
		var page = path + url.substring(start + 1, end + 5);
		if (page == "site_menu.html" || page == "site_header.html") {
			window.location = "http://www.bloomsburychamberorchestra.org.uk/index.html";
		}
		else {
			window.location = "http://www.bloomsburychamberorchestra.org.uk/index.html?request=" + page;
		}
	}
}

/*
 * Check the url to see if a different page is to be loaded into the 
 * content frame.
 */
function checkRequest() {
	var url = window.location.href;
	var start = url.lastIndexOf("request=");
	var end = url.lastIndexOf(".html");
	if (start > 0 && end > 0) {
		var page = url.substring(start + 8, end + 5);
		window.frames["content"].location = page;
	}
}
