function setMenu (itemID) {
	parent.frames["menu"].setMenuItem(itemID);
}

function goToAnchor(myInput) {
	myAnchor = myInput.value;
	currentLocation = this.location.toString();
	
	anchorPos = currentLocation.indexOf("#");
	if (anchorPos != -1) {
		currentLocation = currentLocation.substring (0, anchorPos);
	}
	this.location = currentLocation+"#"+myAnchor;
}

function checkFrameset() {
	//eerst vaststellen baseSite
	if (this.location == window.top.location) {
		this.location="index.html";
	}
}

function checkFramesetPhp() {
	//redirect naar index.php met opgave mainDoc
	//eerst vaststellen baseSite
	topPath = window.top.location.toString();//pad van top
	if (topPath.indexOf("http://wip.tripnet.int") != -1) {
		baseSite = "http://wip.tripnet.int/Talo/site/site0.5/";
	} else if (topPath.indexOf("http://www.tripany.com") != -1) {
		baseSite = "http://www.tripany.com/talo/";
	} else if (topPath.indexOf("http://www.talo.nl/2003") != -1) {
		baseSite = "http://www.talo.nl/2003/";
	} else {
		baseSite = "http://www.talo.nl/";
	}
	if (topPath.indexOf("?",0) != -1) {
		//get-args erafslopen
		topPath = topPath.substring (0, topPath.indexOf("?"));
	}
	correctTopPath = baseSite + "index.php3";
	if (topPath != correctTopPath) {
		//dan niet correct in frameset geplaatst
		docPath= this.location.toString();//pad van huidig doc
		relativeDocPath = docPath.substring (baseSite.length,docPath.length);//pad tov site-root
		newUrl = baseSite+"index.php3?mainDoc="+relativeDocPath;
		window.top.location = newUrl;
	}
}