/*
Function to check whether a subpage is loaded in a new window or tab
*/
function checkTopWindow() {
if (parent == self) {
pageId = window.location;
location.replace('../index.php?source=' + pageId);
}
}