function frame_reload(parent,file_loc) {
// This function keeps each page paired with its proper side menu
var url = location.href;
var path = url.substring(0,url.lastIndexOf('/')) 
var file_name = url.substring(url.lastIndexOf('/') + 1, url.length);
var parent = path.substring(0,path.lastIndexOf('/') + 1) + parent;
var child = file_loc + file_name;

// This part reloads orphaned pages into the proper frameset
if (top.location == self.location) {
location.replace(parent + ".html?" + child + "&main");
}
//The following document.writes are for testing purposes only:
//document.write('path: ' + path.fontcolor('red') + '<br/>');
//document.write('parent: ' + parent.fontcolor('red') + '<br/>');
//document.write('file_name: ' + file_name.fontcolor('red') + '<br/>');
//document.write('file_loc: ' + file_loc.fontcolor('red') + '<br/>');
//document.write('child: ' + child.fontcolor('red') + '<br/>');

// This part detects unauthorized framesets and reloads the proper frameset
if (top.location.href.indexOf(parent + ".html") == -1) {
location.replace(parent + ".html?" + child + "&main");
}
}


function display_url() {
// This script displays the url of this page (helps users when copying or emailing links or bookmarking a specific page)
var url = document.location;
document.write('<br/><hr/><p>');
document.write('<p align="center" class="stunted">The URL of this web page is:<br/>');
document.write('<b>' + url + '<\/b>');
document.write('<\/p><br/>');
}
