function cds_build_menu_url($id, $name, $type, $url, $append = 0, $target = '')
{
    if ($type == 'c') {
        if ($url == '') {
            $cds_url = tep_href_link(FILENAME_PAGES, 'CDpath=' . cre_get_cds_category_path($id), 'NONSSL');
        } else {
            $cds_url = $url . ($append == 1 ? (strpos($url, '?') ? '&' : '?') . 'CDpath=' . cre_get_cds_page_path($id) : '');
        }
    } else {
        if ($type == 'p') {
            $cds_url = tep_href_link(FILENAME_PAGES, 'pID=' . $id . '&CDpath=' . cre_get_cds_page_path($id), 'NONSSL');
        }
    }
    return '<a href="' . $cds_url . '"' . ($target != '' ? ' target="' . $target . '"' : '') . '>' . $name . '</a>';
}
        if (defined('CDS_HOMEPAGE_SHOW_BODY') && CDS_HOMEPAGE_SHOW_BODY == 'true') {
            $txt_only = trim(cre_clean_html(cre_get_page_body($cds_homepage_id)));
            if (strlen($txt_only) <= CDS_HOMEPAGE_BODY_COUNT) {
                $txt_to_use = $txt_only;
            } else {
                if (substr($txt_only, CDS_HOMEPAGE_BODY_COUNT, 1) == ' ' || substr($txt_only, CDS_HOMEPAGE_BODY_COUNT, 1) == '.') {
                    // if the next character is a space, no agjustments needed
                    $txt_to_use = substr($txt_only, 0, CDS_HOMEPAGE_BODY_COUNT);
                } else {
                    $txt_short = substr($txt_only, 0, CDS_HOMEPAGE_BODY_COUNT);
                    // now back up to the last space
                    $pos = strrpos($txt_short, " ");
                    $txt_to_use = substr($txt_short, 0, $pos);
                }
            }
            $cds_homepage_body = '<span class="cds_home_body">' . $txt_to_use . ' <a href="' . tep_href_link(FILENAME_PAGES, 'pID=' . $cds_homepage_id . '&amp;CDpath=' . cre_get_cds_page_path($cds_homepage_id)) . '"><span class="cds_home_readmore">...Read More</span></a></span>';
        }
        $info_box_contents[$row][0] = array('align' => 'left', 'params' => 'class="main" valign="top"', 'text' => '<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="cds_home_image">' . $cds_homepage_image . '</td>
    <td valign="top">' . $cds_homepage_title . $cds_homepage_blurb . $cds_homepage_body . '</td>
  </tr>
  <tr>
    <td colspan="2" valign="top" class="cds_home_spacer"></td>
  </tr>
</table>');
        $row++;
    }
    new contentBox($info_box_contents, true, true);
    if (TEMPLATE_INCLUDE_CONTENT_FOOTER == 'true') {
        $info_box_contents = array();