<script type="text/javascript">
var swf_width=<?php echo $swf_width?>;
var swf_height=<?php echo $swf_height?>;
<?php

$filesa = array();
$linksa = array();
$textsa = array();
$filesflash = '';
$linksflash = '';
$textsflash = '';
foreach($data as $key => $value){
$filesa[] = $value['thumb'];
$linksa[] = urlencode($value['linkurl']);
$textsa[] = $value['title'];
}
$filesflash = implode('|', $filesa);
$linksflash = implode('|', $linksa);
$textsflash = implode('|', $textsa);
?>
var files='<?php echo $filesflash?>'
var links='<?php echo $linksflash?>'
var texts='<?php echo $textsflash?>'

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="images/show.swf"><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&AutoPlayTime=3&IsShowBtn=0">');
document.write('<embed src="images/show.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&AutoPlayTime=5&IsShowBtn=0" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
</script>