<?php

function DisplayBlock($title,$content,$tabcolor='333366',$textcolor='FFFFFF',$return = false)
{	global $_SYSTEM;
	$block_table = "<center><TABLE border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"0\"><TR><TD>";
//	$block_table = "<center><TABLE border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"0\"><TR><TD>";
//	$block_table .= DrawTab($title);

//	if($tabcolor && $tabcolor!='333366')
//		$color_extra = ' style="background-color:'.$tabcolor.'"';
 	 	$color_extra = ' style="background-image:url(themes/'.Preferences('HIGHLIGHT_MENU').'/BoxHeading.png);"';
//	else
// 	 	$color_extra = ' style="background-image:url(themes/'.Preferences('HIGHLIGHT_MENU').'/BoxHeading.gif)"';
  


/*	if(Preferences('HIGHLIGHT_MENU') == 'white')
                $color_ra = 'background-color:none;';
        else
            	$color_ra = 'background-color:#'.Preferences('HIGHLIGHT_WINDOW_BACKGROUND').';';*/


	$block_table .= "<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\" >";
	$block_table .= '<TR><TD class=BoxHeading '.$color_extra.'><font face=Verdana,Arial,sans-serif size=-2><b>'.$title.'</b></font></TD></TR>';
	$block_table .= "<tr>";
//	$block_table .= "<td><table border=\"0\" width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"BoxContents\">";
	$block_table .= "<td><table class=\"color_ra\" border=\"0\" width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" style=\"border:1px solid #".Preferences('HIGHLIGHT').";border-radius: 0px 0px 5px 5px\">";
//	$block_table .= "<td><table border=\"0\" width=\"100%\" cellspacing=\"2\" cellpadding=\"5\"  bgcolor=#b4e6e6>";
	$block_table .= "<tr>";
	$block_table .= "<td><img src=\"images/pixel_trans.gif\" border=\"0\" width=\"100%\" height=\"1\"></td>";
	$block_table .= "</tr>";
	$block_table .= "<tr>";
	$block_table .= "<td align=".ALIGN_LEFT." >";

	$block_table .= $content;
		
	$block_table .= "</td>";
	$block_table .= "</tr>";
	$block_table .= "<tr>";
	$block_table .= "<td><img src=\"images/pixel_trans.gif\" border=\"0\" alt=\"\" width=\"100%\" height=\"1\"></td>";
	$block_table .= "</tr>";
	$block_table .= "</table>";
	$block_table .= "</td>";
	$block_table .= "</tr>";
	$block_table .= "</table>";
	$block_table .= "</TD></TR></TABLE></center>";	
	if($return)
        return $block_table;
    else
        echo $block_table;
}

?>