<div align="center">
  <?php foreach ($adv_banners as $adv_banner) {
    if (@$adv_banner['visible']===0) continue;
    if ($name=='banner') {
      $pos = split(',', $adv_banner['pos']);
      echo '<div style="text-align:left;padding-left:'.$pos[0].'px; padding-top:'.$pos[1].'px;">';
      $start_div = true;
    }
    if (@$adv_banner['embed']) {
      echo $adv_banner['embed'];
    } else {
      $title = @$adv_banner['title'];
      $link = @$adv_banner['link'];
      $img = @$adv_banner['imgUrl'];
      $wid = @$adv_banner['width'];
      $hei = @$adv_banner['height'];
      $gap = @$adv_banner['gap'];
      if ($link == '') echo '<div'.
        ($title? ' title="'.$title.'"': '').
        ($gap? ' style="margin:'.$gap.'px"': '').'>'.
        ($img? myUtility::global_image_tag($img, $wid, $hei): $title).'</div>';
      else
      echo link_to(($img? myUtility::global_image_tag($img, $wid, $hei): $title), $link,
        ('target="_blank"').
        ($title? ' title="'.$title.'"': '').
        ($gap? ' style="margin:'.$gap.'px"': ''));
    }
    if (isset($start_div)) {echo '</div>';$start_div=null;}
  } ?>
</div>
