var box = {};
var box1 = {};
var boxDetalle = {};
var contSubProductos = 0;
var mouseout = false;

window.addEvent('domready', function() {
	
	if(document.getElementById("fondoNoticia0") != null)
	{
		//Noticia1
		var myEffect = new Fx.Tween($('vinculoNoticia0'));
		
		$('fondoNoticia0').setStyle("opacity", "0");
		
		$('vinculoNoticia0').addEvent('mouseover', function(e) {
			e.stop();
			
			$('fondoNoticia0').tween("opacity",0.1);
						
		});
			
		$('vinculoNoticia0').addEvent('mouseout', function(e) {
			e.stop();
				
			$('fondoNoticia0').tween("opacity",0);
		
		});
	}
	
	if(document.getElementById("fondoNoticia1") != null)
	{
		//Noticia1
		var myEffect1 = new Fx.Tween($('vinculoNoticia1'));
		
		$('fondoNoticia1').setStyle("opacity", "0");
		
		$('vinculoNoticia1').addEvent('mouseover', function(e) {
			e.stop();
			
			$('fondoNoticia1').tween("opacity",0.1);
						
		});
			
		$('vinculoNoticia1').addEvent('mouseout', function(e) {
			e.stop();
				
			$('fondoNoticia1').tween("opacity",0);
		
		});
	}
	
	if(document.getElementById("fondoNoticia2") != null)
	{
		//Noticia1
		var myEffect2 = new Fx.Tween($('vinculoNoticia2'));
		
		$('fondoNoticia2').setStyle("opacity", "0");
		
		$('vinculoNoticia2').addEvent('mouseover', function(e) {
			e.stop();
			
			$('fondoNoticia2').tween("opacity",0.1);
						
		});
			
		$('vinculoNoticia2').addEvent('mouseout', function(e) {
			e.stop();
				
			$('fondoNoticia2').tween("opacity",0);
		
		});
	}
	
	if(document.getElementById("fondoNoticia3") != null)
	{
		//Noticia1
		var myEffect3 = new Fx.Tween($('vinculoNoticia3'));
		
		$('fondoNoticia3').setStyle("opacity", "0");
		
		$('vinculoNoticia3').addEvent('mouseover', function(e) {
			e.stop();
			
			$('fondoNoticia3').tween("opacity",0.1);
						
		});
			
		$('vinculoNoticia3').addEvent('mouseout', function(e) {
			e.stop();
				
			$('fondoNoticia3').tween("opacity",0);
		
		});
	}
	
	if($('boton_nacionales') != null)
	{
		var myVerticalSlide = new Fx.Slide('nacionales');
		var myVerticalSlide1 = new Fx.Slide('internacionales');
	
		myVerticalSlide.hide();
		myVerticalSlide1.hide();
		
		$('boton_nacionales').addEvent('click', function(e){
			e.stop();
			myVerticalSlide.slideIn();
			myVerticalSlide1.hide();
		});
	
		$('boton_internacionales').addEvent('click', function(e){
			e.stop();
			myVerticalSlide1.slideIn();
			myVerticalSlide.hide();
			
		});
		
		myVerticalSlide.addEvent('complete' , function(e){
			
			
		});
		
		myVerticalSlide1.addEvent('complete' , function(e){
			
			
		});
	}
	
	if($('boton_garantia_usuario') != null)
	{
		var myVerticalSlide = new Fx.Slide('garantiaUsuario');
	
		//myVerticalSlide.hide();
		
		MM_swapImage('Imagen14','','imagenes/for_ton_gar_activacion2.png',1);
		document.getElementById('boton_garantia_usuario').onmouseout = null;
		document.getElementById('boton_garantia_terminos').onmouseout = MM_swapImgRestore;
			
		$('boton_garantia_usuario').addEvent('click', function(e){
			e.stop();
			myVerticalSlide.slideIn();
			document.getElementById('boton_garantia_usuario').onmouseout = null;
			document.getElementById('boton_garantia_terminos').onmouseout = MM_swapImgRestore;
			MM_swapImgRestore();
			MM_swapImage('Imagen14','','imagenes/for_ton_gar_activacion2.png',1);
			
		});
	
		$('boton_garantia_terminos').addEvent('click', function(e){													
			e.stop();
			myVerticalSlide.slideOut();
			document.getElementById('boton_garantia_terminos').onmouseout = null;
			document.getElementById('boton_garantia_usuario').onmouseout = MM_swapImgRestore;
			MM_swapImgRestore();
			MM_swapImage('Imagen15','','imagenes/for_ton_gar_politicas2.png',1);
			
		});
		
		myVerticalSlide.addEvent('complete' , function(e){
			
			
		});
		
	
	}
	
	if(document.getElementById("mb1") != null)
	{
		box = new MultiBox('mb', {
							mbClass: '.mb',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
							descClassName:'multiBoxDesc',
							showControls:false,
							container: $(document.body),//where to inject multiBox
							path: './Files/',//path to mp3 and flv players
							useOverlay: true,//use a semi-transparent background. default: false;
							maxSize: {w:940, h:550},//max dimensions (width,height) - set to null to disable resizing
							addDownload: false,//do you want the files to be downloadable?
							pathToDownloadScript: './Scripts/ForceDownload.asp',//if above is true, specify path to download script (classicASP and ASP.NET versions included)
							addRollover: true,//add rollover fade to each multibox link
							addOverlayIcon: false,//adds overlay icons to images within multibox links
							addChain: true,//cycle through all images fading them out then in
							recalcTop: true,//subtract the height of controls panel from top position
							addTips: false,//adds MooTools built in 'Tips' class to each element (see: http://mootools.net/docs/Plugins/Tips)
							showNumbers: false,
							showControls: false
						});
		
		box1 = new MultiBox('mbRegistro', {
							mbClass: '.mbRegistro',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
							showControls:false,
							container: $(document.body),//where to inject multiBox
							path: './Files/',//path to mp3 and flv players
							useOverlay: true,//use a semi-transparent background. default: false;
							maxSize: {w:940, h:800},//max dimensions (width,height) - set to null to disable resizing
							addDownload: false,//do you want the files to be downloadable?
							pathToDownloadScript: './Scripts/ForceDownload.asp',//if above is true, specify path to download script (classicASP and ASP.NET versions included)
							addRollover: true,//add rollover fade to each multibox link
							addOverlayIcon: false,//adds overlay icons to images within multibox links
							addChain: true,//cycle through all images fading them out then in
							recalcTop: true,//subtract the height of controls panel from top position
							addTips: false,//adds MooTools built in 'Tips' class to each element (see: http://mootools.net/docs/Plugins/Tips)
							showNumbers: false,
							showControls: false
						});
	
	/*box = new MultiBox('mb', mbClass: '.mb', {descClassName: 'multiBoxDesc', useOverlay: true});
			});*/
	}
	
	if(document.getElementById("iframeEdicion") != null)
	{
		boxDetalle = new MultiBox('iframeEdicion', {
							mbClass: '.iframeEdicion',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
							showControls:false,
							container: $(document.body),//where to inject multiBox
							path: './Files/',//path to mp3 and flv players
							useOverlay: true,//use a semi-transparent background. default: false;
							maxSize: {w:1010, h:520},//max dimensions (width,height) - set to null to disable resizing
							addDownload: false,//do you want the files to be downloadable?
							pathToDownloadScript: './Scripts/ForceDownload.asp',//if above is true, specify path to download script (classicASP and ASP.NET versions included)
							addRollover: true,//add rollover fade to each multibox link
							addOverlayIcon: false,//adds overlay icons to images within multibox links
							addChain: true,//cycle through all images fading them out then in
							recalcTop: true,//subtract the height of controls panel from top position
							addTips: false,//adds MooTools built in 'Tips' class to each element (see: http://mootools.net/docs/Plugins/Tips)
							showNumbers: false,
							showControls: false
						});	
	}
	
	if(document.getElementById("divPatines") != null)
	{
		var elemento;
		
		var ocultar = false;
		
		//verticalSlidePatines.hide();
		
		$('vinculoPatines').addEvent('mouseover', function(e){
			
			document.getElementById("divPatines").style.visibility="visible";
			//verticalSlidePatines.show();
			MM_swapImage('Image23','','imagenes/but_patines2.png',1, 'vinculoPatines');
		});
	
		$('vinculoPatines').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divPatines");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoPatines');
			
		});
		
		$('divPatines').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divPatines").style.visibility="visible";
		});
		
		$('divPatines').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divPatines");
			elemento.style.visibility="hidden";
			
		});
		
		//Menu botas
		
		var ocultar = false;	
		
		$('vinculoBotas').addEvent('mouseover', function(e){
			
			document.getElementById("divBotas").style.visibility="visible";
			MM_swapImage('Image24','','imagenes/but_botas2.png',1, 'vinculoBotas');
		});
	
		$('vinculoBotas').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divBotas");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoBotas');
			
		});
		
		$('divBotas').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divBotas").style.visibility="visible";
		});
		
		$('divBotas').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divBotas");
			elemento.style.visibility="hidden";
			
		});
		
		//Menu ruedas
		var ocultar = false;
		
		
		
		$('vinculoRuedas').addEvent('mouseover', function(e){
			
			document.getElementById("divRuedas").style.visibility="visible";
			MM_swapImage('Image25','','imagenes/but_ruedas2.png',1, 'vinculoRuedas');
		});
	
		$('vinculoRuedas').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divRuedas");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoRuedas');
			
		});
		
		$('divRuedas').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divRuedas").style.visibility="visible";
		});
		
		$('divRuedas').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divRuedas");
			elemento.style.visibility="hidden";
			
			
		});
		
		//Menu Chasis
		var ocultar = false;
		
		$('vinculoChasis').addEvent('mouseover', function(e){
			
			document.getElementById("divChasis").style.visibility="visible";
			MM_swapImage('Image26','','imagenes/but_chasis2.png',1, 'vinculoChasis');
			
		});
	
		$('vinculoChasis').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divChasis");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoChasis');
		
			
		});
		
		$('divChasis').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divChasis").style.visibility="visible";
		});
		
		$('divChasis').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divChasis");
			elemento.style.visibility="hidden";
			
			
		});
		
		//Menu Proteccion
		var ocultar = false;
		
		
		
		$('vinculoProteccion').addEvent('mouseover', function(e){
			
			document.getElementById("divProteccion").style.visibility="visible";
			MM_swapImage('Image27','','imagenes/but_proteccion2.png',1, 'vinculoProteccion');
		});
	
		$('vinculoProteccion').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divProteccion");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoProteccion');
		
			
		});
		
		$('divProteccion').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divProteccion").style.visibility="visible";
		});
		
		$('divProteccion').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divProteccion");
			elemento.style.visibility="hidden";
			
			
		});
		
		//Menu Accesorios
		var ocultar = false;
		
	
		
		$('vinculoAccesorios').addEvent('mouseover', function(e){
			
			document.getElementById("divAccesorios").style.visibility="visible";
			MM_swapImage('Image28','','imagenes/but_accesorios2.png',1, 'vinculoAccesorios');
			
		});
	
		$('vinculoAccesorios').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divAccesorios");
			elemento.style.visibility="hidden";
			MM_swapImgRestore('vinculoAccesorios');
			
		});
		
		$('divAccesorios').addEvent('mouseover', function(e){
			
			ocultar = false;
			document.getElementById("divAccesorios").style.visibility="visible";
		});
		
		$('divAccesorios').addEvent('mouseout', function(e){
			
			ocultar = true;
			elemento = document.getElementById("divAccesorios");
			elemento.style.visibility="hidden";
			
			
		});
		
		CargarProductos(getQueryVariable("id"), getQueryVariable("esSubCategoria"));
		
		/*if(document.getElementById("idBotonSubCategoria0") != null)
		{
			$("tapaBotonSubCategoria0").addEvent('mouseover', function(e){
				
				var m = $('idBotonSubCategoria0');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							//m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0.1);
				
				$("idBotonSubCategoria0").tween('opacity',0.1);
				
			});
			
			$("tapaBotonSubCategoria0").addEvent('mouseout', function(e){
				
				
				
			});
		}
		
		if(document.getElementById("idBotonSubCategoria1") != null)
		{
			$("tapaBotonSubCategoria1").addEvent('mouseover', function(e){
				
				e.stop();
				
				var m = $('idBotonSubCategoria1');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
								
			});
			
			$("tapaBotonSubCategoria1").addEvent('mouseout', function(e){
				
				e.stop();
				
				var m = $('idBotonSubCategoria1');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
				
			});
		}
		
		if(document.getElementById("idBotonSubCategoria2") != null)
		{
			$("idBotonSubCategoria2").addEvent('mouseover', function(e){
				
				var m = $('idBotonSubCategoria2');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
								
			});
			
			$("idBotonSubCategoria2").addEvent('mouseout', function(e){
				
				var m = $('idBotonSubCategoria2');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
				
			});
		}
		
		if(document.getElementById("idBotonSubCategoria3") != null)
		{
			$("idBotonSubCategoria3").addEvent('mouseover', function(e){
				
				var m = $('idBotonSubCategoria3');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
								
			});
			
			$("idBotonSubCategoria3").addEvent('mouseout', function(e){
				
				var m = $('idBotonSubCategoria3');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
				
			});
		}
		
		if(document.getElementById("idBotonSubCategoria4") != null)
		{
			$("idBotonSubCategoria4").addEvent('mouseover', function(e){
				
				var m = $('idBotonSubCategoria4');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
								
			});
			
			$("idBotonSubCategoria4").addEvent('mouseout', function(e){
				
				var m = $('idBotonSubCategoria4');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
				
			});
		}
		
		if(document.getElementById("idBotonSubCategoria5") != null)
		{
			$("idBotonSubCategoria5").addEvent('mouseover', function(e){
				
				var m = $('idBotonSubCategoria5');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
								
			});
			
			$("idBotonSubCategoria5").addEvent('mouseout', function(e){
				
				var m = $('idBotonSubCategoria5');
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0);
				
			});
		}*/
		
	
		/*var anotherEl1 = $('patinRecreativa');
	
		anotherEl1.addEvent('mouseout', function(e) {
			
			anotherEl1.morph('.cat_boton');
			verticalSlidePatines.show();
			
		});
		
		anotherEl1.addEvent('mouseover', function(e) {
			
			verticalSlidePatines.show();
			// Changes the element's style to .myClass defined in the CSS
			anotherEl1.morph('.cat_boton1');
		});*/
		
		 // creates the hover-slide effect for all link elements           
		/*$('divPatines').getElements('a.cat_boton').addEvents({
			'mouseover': function(){
				//var myFx = new Fx.Morph(this).set('.cat_boton_hover');
				
				$(this).tween('opacity', [0.6, 1]);

				
			},
			'mouseout': function(){
				
			}
		});*/

	 
	}
	
	

function getQueryVariable(variable) {
   
	var query = window.location.search.substring(1);
   
    var vars = query.split("&");
   
    for (var i=0;i<vars.length;i++) {
   
      	var pair = vars[i].split("=");
  
      	if (pair[0] == variable) {
   
      		return pair[1];
  
     	}
   
	}
  
}

	
	function OcultarMenu()
	{
		if(ocultar == true)
		{
			elemento.style.visibility="hidden";
			
			/*if(	verticalSlidePatines != elemento)
			   	verticalSlidePatines.hide();
			
			if(	verticalSlideBotas != elemento)
			   	verticalSlideBotas.hide();
				
			if(	verticalSlideRuedas != elemento)
			   	verticalSlideRuedas.hide();
			
			if(	verticalSlideChasis != elemento)
			   	verticalSlideChasis.hide();
				
			if(	verticalSlideProteccion != elemento)
			   	verticalSlideProteccion.hide();
				
			if(	verticalSlideAccesorios != elemento)
			   	verticalSlideAccesorios.hide();*/
				
			/*verticalSlidePatines.slideOut();
			verticalSlideBotas.slideOut();
			verticalSlideRuedas.slideOut();
			verticalSlideChasis.slideOut();
			verticalSlideProteccion.slideOut();
			verticalSlideAccesorios.slideOut();*/
		}
	}
	
	
});

var primerOver = true;

function CambiarTransicion(id, event)
	{
	
		if(primerOver == false)
	   {
		if(event.relatedTarget == null)
		{
			if(document.getElementById(id).contains(event.toElement) == true)
			{
				return;
			}
		}
		else
		{
			if(document.getElementById(id).contains(event.relatedTarget))
			{
				return
			}
		}
	   }
	   
	   primerOver = false;
	   
		var m = $(id);
				var fx = new Fx.Tween(m,{
					duration: 100,
					onComplete: function(){ 
							m.setStyle('background-image','url(imagenes/base_boton2.jpg)');
							m.fade('in');
					}
				});
				fx.start('opacity',1,0.4);
		
	}

document.onmouseover = function(e){
if (window.Node && Node.prototype && !Node.prototype.contains){
Node.prototype.contains = function (arg){
return !!(this.compareDocumentPosition(arg) & 16)
}
}
}

	function CambiarTransicion1(id, event)
	{
		if(event.relatedTarget == null)
		{
			if(document.getElementById(id).contains(event.toElement) == true)
			{
				return;
			}
		}
		else
		{
			if(document.getElementById(id).contains(event.relatedTarget))
			{
				return
			}
		}

		primerOver = true;
		
		var m = $(id);
			var fx = new Fx.Tween(m,{
				duration: 100,
				onComplete: function(){ 
						m.setStyle('background-image','url(imagenes/base_boton.jpg)');
						m.fade('in');
				}
			});
			fx.start('opacity',1,0.4);

	}
	
function MostrarFormaGarantias()
{
	try
	{
		box.open($('mb1'));	
	}
	 catch(err)
	 {}
}

function MostrarFormaRegistro()
{
	
	try
	{
		 box1.open($('mbRegistro'));
	}
	 catch(err)
	 {}
		
}

var Explorador = {
  Version: function() {
    var version = 999; // we assume a sane browser
    if (navigator.appVersion.indexOf("MSIE") != -1)
      // bah, IE again, lets downgrade version number
      version = parseFloat(navigator.appVersion.split("MSIE")[1]);
    return version;
  }
}

<!--

var elBoton;
var obj;
var srcObj;

var obj1;
var srcObj1;

var restaurar = false;

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  var t = MM_swapImgRestore.arguments;
  /*try
  {*/
	  var initialise;

	  if(t[0] != null)
	  {
			
	  	elBoton = $(t[0]);
		
	 	if(Explorador.Version() >= 8)
		 	initialise = $(t[0]).setStyles({display:"block", zoom:1}); 
		else
			initialise = $(t[0]).setStyles({ zoom:1}); 
		
		setTimeout(EjecutarAnimacionBoton1, 100);
		
		 var initialise1 = $(t[0]).setStyles({filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='firefox.png', sizingMethod='image')"});
		
	  }
	  	  
	  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
	  {
		  x.src =  x.oSrc;	
		restaurar = true;
		  
	  }
  /*}catch(err)
  {}*/
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
 /*try
  {*/
	  var initialise;
	  
	  //alert(a[4]);
	  
	  if(a[4] != null)
	  {
		 
		if(elBoton != null)
			elBoton.fade(1);		
		  
	  	elBoton = $(a[4]);
		
		if(Explorador.Version() >= 8)
		 	initialise = $(a[4]).setStyles({display:"block", zoom:1}); 
		else
			initialise = $(a[4]).setStyles({zoom:1});
			
		setTimeout(EjecutarAnimacionBoton1, 100);

		 var initialise1 = $(a[0]).setStyles({filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='firefox.png', sizingMethod='image')"});
		 
	  }	 
	  
	  for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){
				document.MM_sr[j++]=x; 
				if(!x.oSrc) x.oSrc=x.src; 
				obj = x;
				objSrc = a[i+2];
				restaurar = false;
			}
 /*}catch(err)
  {}*/
}

function EjecutarAnimacionBoton()
{
	if((restaurar != true) && (obj != null))
		obj.src=objSrc;
	
	if(elBoton != null)		
		elBoton.fade(1);
	
}

function EjecutarAnimacionBoton1()
{
	elBoton.fade(0.4);
	
	setTimeout(EjecutarAnimacionBoton, 250);
}

function ObtenerEstadoChat()
{
	var req = new Request({

		url: 'fcms/php_sitio/consulta_administradores.php',

		onSuccess: function(resultado){
			
			if(resultado == 0)
				document.getElementById("imgChat").src = "imagenes/chat_offline.png";
			else
			{
				document.getElementById("imgChat").src = "imagenes/chat_online.png";
				document.getElementById("imgChat").onclick = function() {window.open('cms/index.php?option=com_blastchatc&Itemid=2', null, 'menubar=no,location=no,resizable=no,scrollbars=yes,status=yes,width=800,height=600');};
			}

		},

		onFailure: function(){
			//alert('Request fallo!!');
		}

	});
	
	req.send();	
}

//--> 
