var hideMenu = getCookie('hideMenu');


function initializeMenu() {
	if (hideMenu == '1'){
	    showHideMenu('hide', false);
	}
	else {
	    showHideMenu('show', false);
	}
}

function showHideMenu(state, updateCookie) {
    if (updateCookie == null || updateCookie == 'undefined'){
        updateCookie = true;
    }
    if (state == 'show'){
        Element.show($('menu'));
        Element.hide($('show'));
        Element.addClassName($('ctl00_expandingContent'),'expandedContent');
        Element.removeClassName($('ctl00_expandingContent'),'collapsedContent');
        if (updateCookie){
            setCookie('hideMenu','0','/');
        }
    } else {
        Element.hide($('menu'));
        Element.setStyle($('show'), {display:'block'});
        Element.addClassName($('ctl00_expandingContent'),'collapsedContent');
        Element.removeClassName($('ctl00_expandingContent'),'expandedContent');
        if (updateCookie){
            setCookie('hideMenu','1','/');
        }
    }
}

function disableButton(b){
    Page_ClientValidate();
    if (Page_IsValid){
        Element.hide(b);
    }
}
