<?
function splitcolor($color)
{
    if ( 
substr($color01) == "#" ) {
        
$color substr($color1);
    }

    
$r hexdec(substr($color02));
    
$g hexdec(substr($color22));
    
$b hexdec(substr($color42));

    return(array(
"r" => $r"g" => $g"b" => $b));
}

function 
box($im$x1$y1$x2$y2$thick$color)
{
    
$tpx $thick 1;
    
imagefilledrectangle($im$x1$y1$x2$y1 $tpx$color);
    
imagefilledrectangle($im$x2 $tpx$y1$x2$y2$color);
    
imagefilledrectangle($im$x1$y2 $tpx$x2$y2$color);
    
imagefilledrectangle($im$x1$y1$x1 $tpx$y2$color);
}
?>