function redirectCompositionContent (path) {
    if ( (top != self) && ( (top.frames[0].name == 'ty_menu') && (parent.frames[0].name == 'left') ) ) { }
    else { // Below is needed to redirect pages from different levels:
        var localFolder  = 'public_html/lessons/college/composition'  // hard drive pathname to the folder
        var onlineFolder = 'lessons/college/composition'  // online pathname to the 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 + "/index.html?" + unescape(location.href) );
        if (document.images) top.location.replace(redirectURL);
        else top.location.href = redirectURL;
    }
}
// Invoke the function
redirectCompositionContent()
