<?php // no direct access

defined('_JEXEC') or die('Restricted access'); ?>

<?php
	
$i = 0;
$numr=count($images);

$texto='cantidad='.$numr.'&amp;carpeta='.$params->get('folder').'&amp;row='.$params->get('row').'&amp;colorbordes='.$params->get('colorbordes').'&amp;colortextos='.$params->get('colortextos').'&amp;vertical='.$params->get('vertical').'&amp;zoom1='.$params->get('zoom1').'&amp;zoom2='.$params->get('zoom2').'&amp;target='.$params->get('target').'&amp;onlink='.$params->get('onlink').'&amp;speed='.$params->get('speed').'&amp;mouseover='.$params->get('mouseover').'&amp;alpha='.$params->get('alpha').'&amp;menu1='.$params->get('menu1').'&amp;menu2='.$params->get('menu2').'&amp;menu3='.$params->get('menu3').'&amp;menu4='.$params->get('menu4').'&amp;menu5='.$params->get('menu5').'&amp;menu6='.$params->get('menu6').'&amp;menu7='.$params->get('menu7');
$links=split("\n", $params->get('menulinks'));

$link1=str_replace("&", "a1s2t3eriso", $params->get('imagesc'));
$imagesc=split("\n", $link1);
$conta=0;

sort($images);
			foreach ($images as $img)
			{

					$auxilink="";
					$auxititle="";
					if(isset($links[$conta])) $auxititle=$links[$conta];
					if(isset($imagesc[$conta])) $auxilink=$imagesc[$conta];
					
					
					if ($params->get('onlink')=="1") {
						$texto.='&amp;imagen'.$conta.'='.JURI::base().$params->get('folder').''.$img->name.'&amp;title'.$conta.'='.$auxititle.'&amp;link'.$conta.'='.$auxilink;
					}
					else{
					$texto.='&amp;imagen'.$conta.'='.JURI::base().$params->get('folder').''.$img->name.'&amp;title'.$conta.'='.$auxititle.'&amp;link'.$conta.'='.$params->get('folder').$img->name;
					
					//echo '<a id="paper'.$conta.'" href="'.JURI::base().$params->get('folder').''.$img->name.'" rel="lightbox[papers]" title="'.$links[$conta].'"></a>';
					
					echo '<a href="'.JURI::base().$params->get('folder').''.$img->name.'" rel="shadowbox['.$nombrebox.']"></a>';
					
					
					}
				
					$conta++;

			}


?>



<?php 
$ta1='

<style type="text/css">

			.movie'.$module->id.' {
				width: '.$params->get('width').';
				height: '.$params->get('height').';';
				
				if($params->get('background')!="") $ta1.='background-color: #'.$params->get('background');
				
				if($params->get('imageb')!="") $ta1.='background-image: url('.$params->get('imageb').');';
				$ta1.='
			}
			div.movie<?php echo $module->id; ?> {
				width: '.$params->get('width').';
				height: '.$params->get('height').';
				
				border: '.$params->get('border').'px solid #'.$params->get('bordercolor').';

			}
		</style>		
';
$document->addCustomTag($ta1);

?>





<div class="movie<?php echo $module->id; ?>">


        		<div id="flashcontent<?php echo $module->id; ?>">
			Flash 8 required 
		</div>
<script type="text/javascript">
			var so = new SWFObject("<?php echo JURI::base(); echo 'modules/mod_flash_rotator/tmpl/'; ?>mod_flash_rotator.swf", "bramfusion", "<?php echo $params->get('width'); ?>", "<?php echo $params->get('height'); ?>", "8", "#FFFFFF");
			so.addParam("quality", "high");
			so.addParam("wmode", "transparent");
			so.addParam("flashvars", "<?php
	
	echo $texto;
	
	
	?>");
			so.addParam("allowScriptAccess", "always");
			so.write("flashcontent<?php echo $module->id; ?>");
		</script>

</div>