﻿function flipEditor() {
    if ((document.getElementById("TB_HideSelect").style.display == "") || (document.getElementById("TB_HideSelect").style.display == "none")) {
        document.getElementById("TB_HideSelect").style.display = 'inline';
        document.getElementById("tinyMCE-surround").style.display = 'inline';
    }
    else {
        document.getElementById("TB_HideSelect").style.display = 'none';
        document.getElementById("tinyMCE-surround").style.display = 'none';
    }
}

function reloadPage(url) {
    if(url.length == 0)
        window.location.href = url;
    else
        window.location.href = window.location.href;
}

function myFileBrowser(field_name, url, type, win) {

    //alert(win.location);

    //alert("Field_Name: " + field_name + "\nURL: " + url + "\nType: " + type + "\nWin: " + win); // debug/testing

    /* If you work with sessions in PHP and your client doesn't accept cookies you might need to carry
    the session name and session ID in the request string (can look like this: "?PHPSESSID=88p0n70s9dsknra96qhuk6etm5").
    These lines of code extract the necessary parameters and add them back to the filebrowser URL again. */

    var cmsURL = "/filemanager_net/frameset.aspx?a=b&js=mcFileManager.insertFileToTinyMCE&initial_path=mce_clear&initial_rootpath=mce_clear&remember=true";    // script URL - use an absolute path!

    openPopup(cmsURL, 'FileManagerPopup');
    
    //return false;
}