El problema es que las variables globales no son accesibles directamente desde dentro de la funcion. Debes pasarlas como parametros:
Código PHP:
function code_html($body_bgcolor,$div_align_menu,$table_border,$table_width,$aling_td,$td_bgcolor,$titulo_menu,$td_bgcolor,$td_bgcolor){
echo <<< HTML
<body bgcolor="$body_bgcolor">
<div align="$div_align_menu">
<table border="$table_border" width="$table_width">
<tr>
<th width="100%" height="15" align="$aling_td" bgcolor="$td_bgcolor" background="images/barra_menu.gif"><b>$titulo_menu</font><b></th>
<tr>
<td width="100%" height="2" bgcolor="$td_bgcolor" background="images/barra_menu.gif"></td>
</tr>
HTML;
}
Y luego llamarla pasandole todos los valores.
Tambien podrias utilizar la expresion global para poder acceder a las variables globales. Mira
http://www.php.net/manual/en/languag...bles.scope.php
Suerte.