////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 1/15/2016	ELL

var param_array = {'popup_msg_type' : 1, 'status_msg' : '', 'popup_timeout' : -1};
var popup_msg = new PopupMsg(param_array);

window.parent.document.title = document.title;

function SelectMenu(menu)
{
	var url = "edit_js_menu_params.php?menu=" + menu;
	window.location.href = url;
}

function OpenHelpWindow()
{
	window.open("http://breezewebsitebuilder.com/docs/cms/help.html#edit_menu_params", "Help", "scrollbars=1,resizable=1,status=0,toolbar=0,menubar=0,location=0,height=700,width=800");
}

function SaveMenuParams()
{	
	$.ajax({type:'POST', url: 'save_js_menu_params.php', data:$('#frm_menu_params').serialize(), success: function(response) {
		CompleteSaveMenuParams(response);
	}});
}
function CompleteSaveMenuParams(response)
{
	if (response == 1)
		popup_msg.status_msg = EDIT_JS_MENU_PARAMETERS_SAVE_SUCCESS_MSG;
	else
		popup_msg.status_msg = EDIT_JS_MENU_PARAMETERS_SAVE_FAIL_ERR;
	popup_msg.popup_msg_type = 1;
	popup_msg.top_offset = 0;
	popup_msg.left_offset = 250;
	popup_msg.popup_timeout = 2000;
	popup_msg.ShowPopupMsg();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
function ResizeWorkspace(mainWidth, mainHeight, menuWidth, headerHeight) {

}

function DisplayNotSavedMessage(btn)	{
	// Needed to complete call when deleting unsaved page.
	window.parent.SetWorkSavedNotSaved(true);
	window.parent.next_btn = btn;
	window.parent.DoNextClick();
}