<?

while($row = $this->banners->Assoc()){

	echo '<div style="margin:5px; margin-top:0px; margin-bottom:0px; width: 200px; max-height: 200px;">';

	if(preg_match('/.swf|.flv/i', $row['image'])){

		echo '<object width="200" height="200" data="/files/banners/'.$row['image'].($row['url'] ? '?clickTAG='._RootUrl.'/scripts/banner_click.php?banner_id='.$row['id'] : '').'">
			<param name="movie" value="/files/banners/'.$row['image'].($row['url'] ? '?clickTAG='._RootUrl.'/scripts/banner_click.php?banner_id='.$row['id'] : '').'"/>
			<param name="allowFullScreen" value="false"/>
			<param name="allowscriptaccess" value="never"/>
			<param value="transparent" name="wmode"/>
			<embed src="/files/banners/'.$row['image'].($row['url'] ? '?clickTAG='._RootUrl.'/scripts/banner_click.php?banner_id='.$row['id'] : '').'" type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="false" width="200" height="200"/>
		</object>';
	}
	else{

		echo (
			$row['url'] ?
				'<a href="'._RootUrl.'/scripts/banner_click.php?banner_id='.$row['id'].'" class="_blank"><img src="/files/banners/'.$row['image'].'" alt="'.($row['company'] ? $row['company'].'-' : '').'banner" class="click_banner"/></a>' :
				'<img src="/files/banners/'.$row['image'].'" alt="'.($row['company'] ? $row['company'].'-' : '').'banner" class="click_banner"/>'
			);
	}
	echo '</div>';
	$this->set_view_banner_data($row['id']);
}

?>