// detect page and send to location if incorrect

// get page name from parent URL
function getUrlPageName(){
	var url = parent.location.href;
	var pgPos = url.lastIndexOf('/') + 1; // + 1 to miss off /
	return url.substr(pgPos);
}

function checkLocation(pgCheck, pgTarget){
	var currentPage = getUrlPageName();
	
	if(currentPage != pgCheck){
		parent.location.href = pgTarget;
	}
}

