////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 12/16/2013	ELL

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

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

function  LoadOrientationDefaults(orientation)
{
	if (orientation == "vertical")
	{
		document.getElementById("menu_width").value = -1;
		document.getElementById("sub_level_offset_top").value = -5;
		document.getElementById("sub_level_offset_left").value = 80;	
	}
	else if (orientation == "horizontal_fixed_width")
	{
		document.getElementById("menu_width").value = -1;
		document.getElementById("sub_level_offset_top").value = 0;
		document.getElementById("sub_level_offset_left").value = 20;
	}
	else if (orientation == "horizontal_variable_width")
	{
		document.getElementById("menu_width").value = 100;
		document.getElementById("menu_width_units").value = 1;
		document.getElementById("sub_level_offset_top").value = 0;
		document.getElementById("sub_level_offset_left").value = 20;
	}
}

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

function PreloadLocationDefaults(location)
{
	if (location == "header")
	{
		document.getElementById("vertical").style.border = "none";
		document.getElementById("horizontal_fixed").style.border = "solid";
		document.getElementById("horizontal_fixed").style.borderWidth = "3px";
		document.getElementById("horizontal_fixed").style.borderColor = "#FFFF00";
		document.getElementById("horizontal_variable").style.border = "none";
		document.getElementById("offset_top").style.border = "solid";
		document.getElementById("offset_top").style.borderWidth = "3px";
		document.getElementById("offset_top").style.borderColor = "#FFFF00";
		document.getElementById("offset_left").style.border = "solid";
		document.getElementById("offset_left").style.borderWidth = "3px";
		document.getElementById("offset_left").style.borderColor = "#FFFF00";
		document.getElementById("offset_bottom").style.border = "none";
		document.getElementById("offset_right").style.border = "none";
		document.getElementById("absolute").style.border = "solid";
		document.getElementById("absolute").style.borderWidth = "3px";
		document.getElementById("absolute").style.borderColor = "#FFFF00";
		document.getElementById("relative").style.border = "none";
	}
	else if (location == "top")
	{
		document.getElementById("vertical").style.border = "none";
		document.getElementById("horizontal_fixed").style.border = "solid";
		document.getElementById("horizontal_fixed").style.borderWidth = "3px";
		document.getElementById("horizontal_fixed").style.borderColor = "#FFFF00";
		document.getElementById("horizontal_variable").style.border = "none";
		document.getElementById("offset_top").style.border = "solid";
		document.getElementById("offset_top").style.borderWidth = "3px";
		document.getElementById("offset_top").style.borderColor = "#FFFF00";
		document.getElementById("offset_left").style.border = "solid";
		document.getElementById("offset_left").style.borderWidth = "3px";
		document.getElementById("offset_left").style.borderColor = "#FFFF00";
		document.getElementById("offset_bottom").style.border = "none";
		document.getElementById("offset_right").style.border = "none";
		document.getElementById("absolute").style.border = "none";
		document.getElementById("relative").style.border = "solid";
		document.getElementById("relative").style.borderWidth = "3px";
		document.getElementById("relative").style.borderColor = "#FFFF00";
	}
	else if (location == "left")
	{
		document.getElementById("vertical").style.border = "solid";
		document.getElementById("vertical").style.borderWidth = "3px";
		document.getElementById("vertical").style.borderColor = "#FFFF00";
		document.getElementById("horizontal_fixed").style.border = "none";
		document.getElementById("horizontal_variable").style.border = "none";
		document.getElementById("offset_top").style.border = "solid";
		document.getElementById("offset_top").style.borderWidth = "3px";
		document.getElementById("offset_top").style.borderColor = "#FFFF00";
		document.getElementById("offset_left").style.border = "solid";
		document.getElementById("offset_left").style.borderWidth = "3px";
		document.getElementById("offset_left").style.borderColor = "#FFFF00";
		document.getElementById("offset_bottom").style.border = "none";
		document.getElementById("offset_right").style.border = "none";
		document.getElementById("absolute").style.border = "none";
		document.getElementById("relative").style.border = "solid";
		document.getElementById("relative").style.borderWidth = "3px";
		document.getElementById("relative").style.borderColor = "#FFFF00";
	}
	else if (location == "right")
	{
		document.getElementById("vertical").style.border = "solid";
		document.getElementById("vertical").style.borderWidth = "3px";
		document.getElementById("vertical").style.borderColor = "#FFFF00";
		document.getElementById("horizontal_fixed").style.border = "none";
		document.getElementById("horizontal_variable").style.border = "none";
		document.getElementById("offset_top").style.border = "solid";
		document.getElementById("offset_top").style.borderWidth = "3px";
		document.getElementById("offset_top").style.borderColor = "#FFFF00";
		document.getElementById("offset_left").style.border = "none";
		document.getElementById("offset_bottom").style.border = "none";
		document.getElementById("offset_right").style.border = "solid";
		document.getElementById("offset_right").style.borderWidth = "3px";
		document.getElementById("offset_right").style.borderColor = "#FFFF00";
		document.getElementById("absolute").style.border = "none";
		document.getElementById("relative").style.border = "solid";
		document.getElementById("relative").style.borderWidth = "3px";
		document.getElementById("relative").style.borderColor = "#FFFF00";
	}
	else if (location == "bottom")
	{
		document.getElementById("vertical").style.border = "none";
		document.getElementById("horizontal_fixed").style.border = "none";
		document.getElementById("horizontal_variable").style.border = "solid";
		document.getElementById("horizontal_variable").style.borderWidth = "3px";
		document.getElementById("horizontal_variable").style.borderColor = "#FFFF00";
		document.getElementById("offset_top").style.border = "none";
		document.getElementById("offset_left").style.border = "solid";
		document.getElementById("offset_left").style.borderWidth = "3px";
		document.getElementById("offset_left").style.borderColor = "#FFFF00";
		document.getElementById("offset_bottom").style.border = "solid";
		document.getElementById("offset_bottom").style.borderWidth = "3px";
		document.getElementById("offset_bottom").style.borderColor = "#FFFF00";
		document.getElementById("offset_right").style.border = "none";
		document.getElementById("absolute").style.border = "none";
		document.getElementById("relative").style.border = "solid";
		document.getElementById("relative").style.borderWidth = "3px";
		document.getElementById("relative").style.borderColor = "#FFFF00";
	}
	else if (location == "footer")
	{
		document.getElementById("vertical").style.border = "none";
		document.getElementById("horizontal_fixed").style.border = "none";
		document.getElementById("horizontal_variable").style.border = "solid";
		document.getElementById("horizontal_variable").style.borderWidth = "3px";
		document.getElementById("horizontal_variable").style.borderColor = "#FFFF00";
		document.getElementById("offset_top").style.border = "none";
		document.getElementById("offset_left").style.border = "solid";
		document.getElementById("offset_left").style.borderWidth = "3px";
		document.getElementById("offset_left").style.borderColor = "#FFFF00";
		document.getElementById("offset_bottom").style.border = "solid";
		document.getElementById("offset_bottom").style.borderWidth = "3px";
		document.getElementById("offset_bottom").style.borderColor = "#FFFF00";
		document.getElementById("offset_right").style.border = "none";
		document.getElementById("absolute").style.border = "solid";
		document.getElementById("absolute").style.borderWidth = "3px";
		document.getElementById("absolute").style.borderColor = "#FFFF00";
		document.getElementById("relative").style.border = "none";
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
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();
}