
// check whether the current page has the right title
// OpMode will be "admin" or "normal"
function CheckContentandTitle(ContentPage, BasePage, OpMode){
	var href = "http://www.sotonia.co.uk/";
	var TitlePage = href+ "" + BasePage+ ".php";
	var AdminTitlePage = href+ "adminform.html";
	var AdminBlankTitlePage = href+ "adminform.html";
	if (parent.location.href == self.location.href){
		//alert("changing page");
		window.location.href = href+"index.php?page="+ContentPage;
	} else {
		var vCurTitle = parent.frames[1].location.toString();
		var vTitleArray = vCurTitle.split("?");
		//alert(vTitleArray[0]);
		//alert("opmode = " + OpMode);
		if (OpMode != "admin") {
			
				if (vTitleArray[0] != TitlePage) {
					parent.frames[1].location = TitlePage;
					//alert("changing title");
				}
			
		} else {
		
			if ((vTitleArray[0] != AdminTitlePage) || (vTitleArray[0] != AdminBlankTitlePage)) {
				parent.frames[1].location = AdminBlankTitlePage;
				//alert("changing admin title");
			}
			
		}
	}
}

