<?php
	/////////////////////////////////////////////
	// Build string for menu.css file /////
	////////////////////////////////////////////////////////////////////////
	// EB Content Management System
	// Copyright EB Dynamics, Inc., Edward Lemmers, P.E.
	// Revised: 9/22/2008	ELL
	// Added text shadow effects.
	// Revised: 11/13/08	ELL
	// Added traps to remove '-none-' for colors that are no selected.
	
	////////////////////////////////////////////////////////////////
	// top level text //////////////////////////////////////////////
	// mouse out
	$menu_styles_string = ".m0l0iout {\n";
	$menu_styles_string .= "   font-family: " . $top_level_font_out . ";\n";
	$menu_styles_string .= "   font-size: " . $top_level_font_size_out . "px;\n";
	if ($top_level_bold_out == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($top_level_italic_out == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($top_level_underline_out == 0) && ($top_level_overline_out == 0) && ($top_level_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($top_level_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($top_level_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($top_level_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($top_level_shadow_out == 1) {
		if ($top_level_shadow_color_out != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $top_level_shadow_color_out . " " . $top_level_shadow_x_offset_out . "px " . $top_level_shadow_y_offset_out . "px " . $top_level_shadow_blur_out . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $top_level_shadow_x_offset_out . "px " . $top_level_shadow_y_offset_out . "px " . $top_level_shadow_blur_out . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $top_level_padding_out . "px;\n";
	if ($top_level_text_color_out != _NOT_SET_)
		$menu_styles_string .= "   color: " . $top_level_text_color_out . ";\n";
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l0iover {\n";
	$menu_styles_string .= "   font-family: " . $top_level_font_over . ";\n";
	$menu_styles_string .= "   font-size: " . $top_level_font_size_over . "px;\n";
	if ($top_level_bold_over == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($top_level_italic_over == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($top_level_underline_over == 0) && ($top_level_overline_over == 0) && ($top_level_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($top_level_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($top_level_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($top_level_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($top_level_shadow_over == 1) {
		if ($top_level_shadow_color_over != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $top_level_shadow_color_over . " " . $top_level_shadow_x_offset_over . "px " . $top_level_shadow_y_offset_over . "px " . $top_level_shadow_blur_over . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $top_level_shadow_x_offset_over . "px " . $top_level_shadow_y_offset_over . "px " . $top_level_shadow_blur_over . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $top_level_padding_over . "px;\n";
	if ($top_level_text_color_over != _NOT_SET_)
		$menu_styles_string .= "   color: " . $top_level_text_color_over . ";\n";
	$menu_styles_string .= "}\n";
	
	// top level background //////////////////////////////////////////////
	// mouse out
	$menu_styles_string .= ".m0l0oout {\n";
	if ($top_level_border_color_out != _NOT_SET_)
		$menu_styles_string .= "   border: " . $top_level_border_out . "px solid " . $top_level_border_color_out . ";\n";
	else
		$menu_styles_string .= "   border: " . $top_level_border_out . "px solid;\n";
	if ($top_level_bkgd_color_out != _NOT_SET_)
		$menu_styles_string .= "   background: " . $top_level_bkgd_color_out . ";\n";
	if (($top_level_underline_out == 0) && ($top_level_overline_out == 0) && ($top_level_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($top_level_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($top_level_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($top_level_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($top_level_bkgd_opacity_out < 100)
	{
		$menu_styles_string .= "   filter: alpha(opacity=" . $top_level_bkgd_opacity_out . ");\n";
		$menu_styles_string .= "   -moz-opacity: " . $top_level_bkgd_opacity_out . "%;\n";
	}
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l0oover {\n";
	if ($top_level_border_color_over != _NOT_SET_)
		$menu_styles_string .= "   border: " . $top_level_border_over . "px solid " . $top_level_border_color_over . ";\n";
	else
		$menu_styles_string .= "   border: " . $top_level_border_over . "px solid;\n";
	if ($top_level_bkgd_color_over != _NOT_SET_)
		$menu_styles_string .= "   background: " . $top_level_bkgd_color_over . ";\n";
	if (($top_level_underline_over == 0) && ($top_level_overline_over == 0) && ($top_level_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($top_level_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($top_level_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($top_level_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	$menu_styles_string .= "}\n\n";
	
	////////////////////////////////////////////////////////////////
	// sub level 1 text //////////////////////////////////////////////
	// mouse out
	$menu_styles_string .= ".m0l1iout {\n";
	$menu_styles_string .= "   font-family: " . $sub_level_1_font_out . ";\n";
	$menu_styles_string .= "   font-size: " . $sub_level_1_font_size_out . "px;\n";
	if ($sub_level_1_bold_out == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($sub_level_1_italic_out == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($sub_level_1_underline_out == 0) && ($sub_level_1_overline_out == 0) && ($sub_level_1_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_1_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_1_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_1_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_1_shadow_out == 1) {
		if ($sub_level_1_shadow_color_out != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $sub_level_1_shadow_color_out . " " . $sub_level_1_shadow_x_offset_out . "px " . $sub_level_1_shadow_y_offset_out . "px " . $sub_level_1_shadow_blur_out . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $sub_level_1_shadow_x_offset_out . "px " . $sub_level_1_shadow_y_offset_out . "px " . $sub_level_1_shadow_blur_out . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $sub_level_1_padding_out . "px;\n";
	if ($sub_level_1_text_color_out != _NOT_SET_)
		$menu_styles_string .= "   color: " . $sub_level_1_text_color_out . ";\n";
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l1iover {\n";
	$menu_styles_string .= "   font-family: " . $sub_level_1_font_over . ";\n";
	$menu_styles_string .= "   font-size: " . $sub_level_1_font_size_over . "px;\n";
	if ($sub_level_1_bold_over == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($sub_level_1_italic_over == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($sub_level_1_underline_over == 0) && ($sub_level_1_overline_over == 0) && ($sub_level_1_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_1_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_1_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_1_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_1_shadow_over == 1) {
		if ($sub_level_1_shadow_color_over != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $sub_level_1_shadow_color_over . " " . $sub_level_1_shadow_x_offset_over . "px " . $sub_level_1_shadow_y_offset_over . "px " . $sub_level_1_shadow_blur_over . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $sub_level_1_shadow_x_offset_over . "px " . $sub_level_1_shadow_y_offset_over . "px " . $sub_level_1_shadow_blur_over . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $sub_level_1_padding_over . "px;\n";
	if ($sub_level_1_text_color_over != _NOT_SET_)
		$menu_styles_string .= "   color: " . $sub_level_1_text_color_over . ";\n";
	$menu_styles_string .= "}\n";
	
	// sub level 1 background //////////////////////////////////////////////
	// mouse out
	$menu_styles_string .= ".m0l1oout {\n";
	if ($sub_level_1_text_color_over != _NOT_SET_)
		$menu_styles_string .= "   border: " . $sub_level_1_border_out . "px solid " . $sub_level_1_border_color_out . ";\n";
	else
		$menu_styles_string .= "   border: " . $sub_level_1_border_out . "px solid;\n";
	if ($sub_level_1_bkgd_color_out != _NOT_SET_)
		$menu_styles_string .= "   background: " . $sub_level_1_bkgd_color_out . ";\n";
	if (($sub_level_1_underline_out == 0) && ($sub_level_1_overline_out == 0) && ($sub_level_1_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_1_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_1_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_1_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_1_bkgd_opacity_out < 100)
	{
		$menu_styles_string .= "   filter: alpha(opacity=" . $sub_level_1_bkgd_opacity_out . ");\n";
		$menu_styles_string .= "   -moz-opacity: " . $sub_level_1_bkgd_opacity_out . "%;\n";
	}
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l1oover {\n";
	if ($sub_level_1_border_color_over != _NOT_SET_)
		$menu_styles_string .= "   border: " . $sub_level_1_border_over . "px solid " . $sub_level_1_border_color_over . ";\n";
	else
		$menu_styles_string .= "   border: " . $sub_level_1_border_over . "px solid;\n";
	if ($sub_level_1_bkgd_color_over != _NOT_SET_)
		$menu_styles_string .= "   background: " . $sub_level_1_bkgd_color_over . ";\n";
	if (($sub_level_1_underline_over == 0) && ($sub_level_1_overline_over == 0) && ($sub_level_1_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_1_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_1_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_1_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	$menu_styles_string .= "}\n\n";
	
	////////////////////////////////////////////////////////////////
	// sub level 2 text //////////////////////////////////////////////
	// mouse out
	$menu_styles_string .= ".m0l2iout {\n";
	$menu_styles_string .= "   font-family: " . $sub_level_2_font_out . ";\n";
	$menu_styles_string .= "   font-size: " . $sub_level_2_font_size_out . "px;\n";
	if ($sub_level_2_bold_out == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($sub_level_2_italic_out == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($sub_level_2_underline_out == 0) && ($sub_level_2_overline_out == 0) && ($sub_level_2_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_2_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_2_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_2_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_2_shadow_out == 1) {
		if ($sub_level_2_shadow_color_out != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $sub_level_2_shadow_color_out . " " . $sub_level_2_shadow_x_offset_out . "px " . $sub_level_2_shadow_y_offset_out . "px " . $sub_level_2_shadow_blur_out . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $sub_level_2_shadow_x_offset_out . "px " . $sub_level_2_shadow_y_offset_out . "px " . $sub_level_2_shadow_blur_out . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $sub_level_2_padding_out . "px;\n";
	if ($sub_level_2_text_color_out != _NOT_SET_)
		$menu_styles_string .= "   color: " . $sub_level_2_text_color_out . ";\n";
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l2iover {\n";
	$menu_styles_string .= "   font-family: " . $sub_level_2_font_over . ";\n";
	$menu_styles_string .= "   font-size: " . $sub_level_2_font_size_over . "px;\n";
	if ($sub_level_2_bold_over == 1)
		$menu_styles_string .= "   font-weight: bold;\n";
	if ($sub_level_2_italic_over == 1)
		$menu_styles_string .= "   font-style: italic;\n";
	if (($sub_level_2_underline_over == 0) && ($sub_level_2_overline_over == 0) && ($sub_level_2_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_2_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_2_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_2_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_2_shadow_over == 1) {
		if ($sub_level_2_shadow_color_over != _NOT_SET_)
			$menu_styles_string .= "   text-shadow: " . $sub_level_2_shadow_color_over . " " . $sub_level_2_shadow_x_offset_over . "px " . $sub_level_2_shadow_y_offset_over . "px " . $sub_level_2_shadow_blur_over . "px;\n";
		else
			$menu_styles_string .= "   text-shadow: " . $sub_level_2_shadow_x_offset_over . "px " . $sub_level_2_shadow_y_offset_over . "px " . $sub_level_2_shadow_blur_over . "px;\n";
	}
	$menu_styles_string .= "   padding: " . $sub_level_2_padding_over . "px;\n";
	if ($sub_level_2_text_color_over != _NOT_SET_)
		$menu_styles_string .= "   color: " . $sub_level_2_text_color_over . ";\n";
	$menu_styles_string .= "}\n";
	
	// sub level 2 background //////////////////////////////////////////////
	// mouse out
	$menu_styles_string .= ".m0l2oout {\n";
	if ($sub_level_2_border_color_out != _NOT_SET_)
		$menu_styles_string .= "   border: " . $sub_level_2_border_out . "px solid " . $sub_level_2_border_color_out . ";\n";
	else
		$menu_styles_string .= "   border: " . $sub_level_2_border_out . "px solid;\n";
	if ($sub_level_2_bkgd_color_out != _NOT_SET_)
		$menu_styles_string .= "   background: " . $sub_level_2_bkgd_color_out . ";\n";
	if (($sub_level_2_underline_out == 0) && ($sub_level_2_overline_out == 0) && ($sub_level_2_blink_out == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_2_underline_out == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_2_overline_out == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_2_blink_out == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}
	if ($sub_level_2_bkgd_opacity_out < 100)
	{
		$menu_styles_string .= "   filter: alpha(opacity=" . $sub_level_2_bkgd_opacity_out . ");\n";
		$menu_styles_string .= "   -moz-opacity: " . $sub_level_2_bkgd_opacity_out . "%;\n";
	}
	$menu_styles_string .= "}\n";
	
	// mouse over
	$menu_styles_string .= ".m0l2oover {\n";
	if ($sub_level_2_border_color_over != _NOT_SET_)
		$menu_styles_string .= "   border: " . $sub_level_2_border_over . "px solid " . $sub_level_2_border_color_over . ";\n";
	else
		$menu_styles_string .= "   border: " . $sub_level_2_border_over . "px solid;\n";
	if ($sub_level_2_bkgd_color_over != _NOT_SET_)
		$menu_styles_string .= "   background: " . $sub_level_2_bkgd_color_over . ";\n";
	if (($sub_level_2_underline_over == 0) && ($sub_level_2_overline_over == 0) && ($sub_level_2_blink_over == 0))
		$menu_styles_string .= "   text-decoration: none;\n";
	else
	{
		$menu_styles_string .= "   text-decoration:";
		if ($sub_level_2_underline_over == 1)
			$menu_styles_string .= " underline";
		if ($sub_level_2_overline_over == 1)
			$menu_styles_string .= " overline";
		if ($sub_level_2_blink_over == 1)
			$menu_styles_string .= " blink";
		$menu_styles_string .= ";\n";
	}

	$menu_styles_string .= "}\n";
?>