function redirectHomePage() { // This opens the file in the left frame of the home page.
var myTarget="home_page.html" // Edit this & both frame ids below
if ( (top == self) || (parent.frames[0].name != 'ty_page') ) {
    var localFolder  = 'public_html'  // this is the name of the hard drive folder
    var onlineFolder = 'secretstage.com'  // this is the online pathname to the uppermost folder
    var homePath = unescape(document.location);
    if ( document.location.protocol == 'http:' ) {
        homePath = homePath.substring (0,homePath.indexOf(onlineFolder)+(onlineFolder.length));
    }
    else {
        homePath = homePath.substring (0,homePath.indexOf(localFolder)+(localFolder.length));
    }
    var redirectURL = unescape( homePath + "/" + myTarget + "?" + unescape(location.href) );
    if (top.frames.length == 2) {
        if (top.frames[0].name == 'ty_menu') {
            if (document.images) top.frames[1].location.replace(redirectURL);
            else top.frames[1].location.href = redirectURL;
        }
    }
    else {   
        if (document.images) top.location.replace(redirectURL);
        else top.location.href = redirectURL;
    }
}
}
// Invoke the function
redirectHomePage()

