//Comunicacion Links con Flash
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
/*
function PlayFlashMovie1()
{
	var flashMovie=getFlashMovieObject("BannerHome");
	flashMovie.TGotoLabel("/","banner1");
	flashMovie.Play();
}
function PlayFlashMovie2()
{
	var flashMovie=getFlashMovieObject("BannerHome");
	flashMovie.TGotoLabel("/","banner2");
	flashMovie.Play();
}
function PlayFlashMovie3()
{
	var flashMovie=getFlashMovieObject("BannerHome");
	flashMovie.TGotoLabel("/","banner3");
	flashMovie.Play();
}
function PlayFlashMovie4()
{
	var flashMovie=getFlashMovieObject("BannerHome");
	flashMovie.TGotoLabel("/","banner4");
	flashMovie.Play();
}
*/


//Scroll de links 4 bloques
$(function() {  
	$('#bloque1').cycle({
		fx:     'scrollVert',
		speed:  'slow',
		timeout: 0,
		next:   '#next1',
		prev:   '#prev1'
//		after:   onAfter1
	});	
	$('#bloque2').cycle({
		fx:     'scrollVert',
		speed:  'slow',
		timeout: 0,
		next:   '#next2',
		prev:   '#prev2'
//		after:   onAfter2
	});	
	$('#bloque3').cycle({
		fx:     'scrollVert',
		speed:  'slow',
		timeout: 0,
		next:   '#next3',
		prev:   '#prev3'
//		after:   onAfter3
	});	
	$('#bloque4').cycle({
		fx:     'scrollVert',
		speed:  'slow',
		timeout: 0,
		next:   '#next4',
		prev:   '#prev4'
//		after:   onAfter4
	});	
/*	
function onAfter1(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev1')[index == 0 ? 'hide' : 'show']();
    $('#next1')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
function onAfter2(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev2')[index == 0 ? 'hide' : 'show']();
    $('#next2')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
function onAfter3(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev3')[index == 0 ? 'hide' : 'show']();
    $('#next3')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
function onAfter4(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev4')[index == 0 ? 'hide' : 'show']();
    $('#next4')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
*/
var cantidadbloque1 = ($("#bloque1 .listado").size());
var cantidadbloque2 = ($("#bloque2 .listado").size());
var cantidadbloque3 = ($("#bloque3 .listado").size());
var cantidadbloque4 = ($("#bloque4 .listado").size());
if (cantidadbloque1>1){
	$('#prev1').show();
	$('#next1').show();
}else{
	$('#prev1').hide();
	$('#next1').hide();	
};
if (cantidadbloque2>1){
	$('#prev2').show();
	$('#next2').show();
}else{
	$('#prev2').hide();
	$('#next2').hide();	
};
if (cantidadbloque3>1){
	$('#prev3').show();
	$('#next3').show();
}else{
	$('#prev3').hide();
	$('#next3').hide();	
};
if (cantidadbloque4>1){
	$('#prev4').show();
	$('#next4').show();
}else{
	$('#prev4').hide();
	$('#next4').hide();	
};
 }); 
