function ff_redirect($url, $target='self', $method='post')
{
    global $ff_processor, $ff_request;
    if ($ff_processor->dying) return;

    ob_end_clean();
    switch (strtolower($method)) {
        case 'get': {
            switch (strtolower($target)) {
                case 'top'   :
                case 'parent': break;
                default      : $target = 'document';
            } // switch
            echo '<script type="text/javascript">'.nl().
                 '<!--'.nl().
                 "onload=function() { ".$target.".location.href='".$url."'; }".nl().
                 '-->'.nl().
                 '</script>'.nl().
                 '</body>'.nl();
            break;
        } // url
        default: { // post
            $pos = strpos($url,'?');
            $ff_request = array();
            if ($pos === false)
                $action = $url;
            else {
                $action = substr($url,0,$pos);
                addRequestParams(substr($url, $pos+1));
            } // if
            switch (strtolower($target)) {
                case 'blank' : $target = ' target="_blank"';  break;
                case 'top'   : $target = ' target="_top"';    break;
                case 'parent': $target = ' target="_parent"'; break;
                default      : $target = ' target="_self"';
            } // switch
            echo '<script language="javascript" type="text/javascript">'.nl().
                 '<!--'.nl().
                 'onload = function() { document.ff_redirect.submit(); }'.nl().
                 '-->'.nl().
                 '</script>'.nl().
                 '<form action="'.$action.'" '.
                  'method="post" '.
                  'name="ff_redirect" id="ff_redirect" '.
                  'enctype="multipart/form-data"'.
                  $target.
                 '>'.nl();
            while (list($prop, $val) = each($ff_request))
                echo '<input type="hidden" name="'.$prop.'" '.
                            'value="'.htmlentities(urldecode($val)).'"/>'.nl();
            echo '</form>'.nl().
                 '</body>'.nl();
        } // post
    } // switch
    exit;
} // ff_redirect