/////////////////////////////////////////////
// Dashboard /////
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 4/24/2015	ELL

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

var version_file;

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

function ShowUpdatePopup(version_from_file)
{
	version_file = version_from_file;
	popup_msg.top_offset = 0;
	popup_msg.left_offset = 300;
	popup_msg.popup_msg_type = 3;
	popup_msg.popup_btn_cnt = 2;
	popup_msg.msg_width = 680;
	popup_msg.popup_msg_cell = INSTALL_UPDATE_NEW_VERSION_AVAILABLE;
	popup_msg.popup_button_2_span = YES_WORD;
	popup_msg.popup_button_1_span = NO_WORD;
	popup_msg.popup_timeout = -1;
	popup_msg.ShowPopupMsg();
	document.getElementById("popup_button_2_span").onclick = function () { UpdateBreeze(); };
	document.getElementById("popup_button_1_span").onclick = function () { popup_msg.HidePopupMsg(); };
}

function UpdateBreeze()
{
	document.getElementById('uploading_gif_div').style.display = 'block';
	popup_msg.HidePopupMsg();
	var code = "window.location = 'install_update.php?mode=automatic&version_file=' + version_file;";
	mTimer = setTimeout(code, 1800);
}