/////////////////////////////////////////////
// Edit File Select /////
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 11/17/2014	ELL

var browser = BrowserDetect.browser;
var browser_version = BrowserDetect.version;

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 OpenHelpWindow()
{
	window.open("http://breezewebsitebuilder.com/docs/cms/help.html#edit_file", "Help", "scrollbars=1,resizable=1,status=0,toolbar=0,menubar=0,location=0,height=700,width=800");
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
function ShowFiles(folder)
{
	$.post( "get_files.php", { folder: folder } ).done(CompleteShowFiles) ;
	document.getElementById("btn_pages").className = "button_sub_level_1";
	document.getElementById("btn_scripts").className = "button_sub_level_1";
	document.getElementById("btn_php").className = "button_sub_level_1";
	var btn = "btn_" + folder;
	document.getElementById(btn).className = "button_sub_level_1 down_sub";
}
function CompleteShowFiles(data)
{
	document.getElementById("sub_level_2_buttons").style.display = "block";
	document.getElementById("file_list_div").innerHTML = data;
}


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

}

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