function ff_makeFormUrl($name, $params='')
{
    global $ff_processor, $ff_otherparams;
    $url = '';
    switch ($ff_processor->runmode) {
        case 2: // preview
        case 1: // backend
            $url .= 'administrator/index2.php?option=com_breezingforms&act=run'.
                    '&ff_name='.urlencode($name);
            if ($ff_processor->inframe) $url .= '&ff_frame=1';
            if ($ff_processor->border) $url .= '&ff_border=1';
            break;
        default: // frontend
            $url .= 'index.php?ff_name='.urlencode($name);
            if ($ff_otherparams['option'] == 'com_breezingforms') {
                reset($ff_otherparams);
                while (list($prop, $val) = each($ff_otherparams))
                    $url .= '&'.urlencode($prop).'='.urlencode($val);
            } else
                $url .= '&option=com_breezingforms';
            if ($ff_processor->target > 1) $url .= '&ff_target='.$ff_processor->target;
            if ($ff_processor->inframe) $url .= '&ff_frame=1';
            if ($ff_processor->border) $url .= '&ff_border=1';
            if ($ff_processor->align !=1) $url .= '&ff_align='.$ff_processor->align;
            if ($ff_processor->top>0) $url .= '&ff_top='.$ff_processor->top;
    } // switch
    return ff_makePageUrl($url. $params);
} // ff_makeFormUrl