function openEditorWindow(PageName, Parent, ContentName, type) {
    var url;
    
    if(type)
        url = 'EditTextBlock.aspx?pageName=' + PageName + '&parent=' + Parent + '&contentName=' + ContentName;
    else
        url = 'adminzone/EditTextBlock.aspx?pageName=' + PageName + '&parent=' + Parent + '&contentName=' + ContentName;
    
    window.open(url, 'contentEditor', 'width=742,height=730');
    return false;
}

function toggleMenu() 
{
    //$("#adminMenu").slideToggle("fast");
    $('#adminMenu ul').slideToggle(250);
    $('#adminMenu ul').css("display", "");
    return false;
}

function deleteMessage(thing) {
    var message = "You are about to delete a " + thing + " permanently. Click Ok to continue." 
    return confirm(message);
    
   
    
}

$(document).ready(function() {
    if (window.opera) {
        if ($("a.bookmark").attr("rel") != "") {
            $("a.bookmark").attr("rel", "sidebar");
        }
    }
    $("a.bookmark").click(function(event) {
        
        event.preventDefault();
        if (window.sidebar) {
            window.sidebar.addPanel(this.title, this.href, "");
        }
        else if (window.external) {
            window.external.AddFavorite(this.href, this.title);
        }
        else if (window.opera) {
            return false;
        }
        else {
            alert('Please bookmark this page manually.');
        }
    });
});
