   var prodbtns = new Array()
   function homeProd(uid) {
   		var este = this;
   		this.uid = uid;
		this.set = false;
		var div = $('home-prod-btn-'+uid);
		this.div = div;
		div.addEvents({
		//	mouseover:function() { if(!este.set) este.div.setStyle('background-image', 'url('+este.backimgover+')'); },
		//	mouseout:function() {if(!este.set) este.div.setStyle('background-image', 'url('+este.backimg+')');},
		//	click: function() { este.prodFill();}
			mouseover: function() { este.prodFill();}
		});
		this.Create = function() {
			div.setStyle('background-image', 'url('+this.backimg+')');
			var myImages = new Asset.images([this.backimg, this.backimgclick, this.backimgover, this.prodimg]);
			prodbtns.push(this);
		} 
		this.prodFill = function() {
			var pFx = new Fx.Tween('prodShow',{});
			pFx.set('opacity','0');
			$('prodShow').setStyle('background-image', 'url('+este.prodimg+')');
			$('prodTxt').set('html',este.prodtxt);
			$('prodLink').setProperty('href',este.prodlink);
			pFx.start('opacity','0','1');
			this.div.setStyle('background-image', 'url('+this.backimgclick+')');
			for (var i=0; i<prodbtns.length; i++) {
				prodbtns[i].set = false;
				if(prodbtns[i]!=este) prodbtns[i].div.setStyle('background-image', 'url('+prodbtns[i].backimg+')');
			};
			this.set = true;
		}
     }

//   var promobtns = new Array()
   function promoBtn(uid) {
   		var este = this;
   		this.uid = uid;
		var img = $('promo-img-'+uid);
		var div = $('obj-'+uid);
		this.div = div;
		this.img = img;
		this.Create = function() {
			if(this.imgover)
				this.div.addEvents({
					mouseover:function() { este.img.setProperty('src', este.imgover); este.div.getElements('a').setStyle('text-decoration','underline');  },
					mouseout:function() { este.img.setProperty('src', este.imgsrc);  este.div.getElements('a').setStyle('text-decoration','none'); },
					click: function() { location = este.url}
				});
			este.img.setProperty('src', este.imgsrc);
			var myImages = new Asset.images([this.imgsrc, this.imgover]);
//			promobtns.push(this);
		}
     }

	function homeServ(uid,prefix) {
   		var este = this;
   		this.uid = uid;
		var div = $(prefix+'-serv-btn-'+uid);
		var a = $(prefix+'-serv-a-'+uid);
		this.a = a;
		this.div = div;
		div.addEvents({
	       mouseover : function() {
				this.setStyles({
					'background-image': 'url('+este.himage+')',
				    border: '1px solid '+este.hcolor
				});
				este.a.setStyle('color',este.hcolor);
				este.a.setStyle('font-size',este.hfont+'px');
				este.txt.clean();
				var v = este.txt.split(' ');
				este.a.setStyle('line-height',120/v.length);
				este.a.set('text',este.txt);
			},
	    	mouseout: function() {
				this.setStyles({
					'background-image': 'url('+este.image+')',
				    border: '1px solid '+este.color
				});
				este.a.setStyle('color', este.color);
				este.a.setStyle('font-size',este.font+'px');
				este.a.setStyle('line-height',120);
				este.a.set('text',este.abrev);
			},
			click: function() {
				location = este.a.getProperty('href');
			}
		});
		this.preLoad = function(){
			var myImages = new Asset.images([this.himage,this.image]);
		}
	}

  function Imgs(container,w,h) {
  	  if(w===undefined)w=490;
  	  if(h===undefined)h=200;
      this.els = $(container).getElements('div');
      for(i=0;i<this.els.length;i++) {
          this.els[i].setStyle('position','absolute');
          this.els[i].setStyle('width',w+'px');
          this.els[i].setStyle('height',h+'px');
          this.els[i].fade('hide');
      }
      this.current = 0;
      this.els[this.current].fade('in');
      this.prev = function() {
          this.els[this.current].fade('out');
          this.current = (this.current - 1);// % this.els.length;
          if(this.current < 0) this.current = this.els.length + this.current;
          this.els[this.current].fade('in');
		  if(this.current == 0) this.prevbtn.fade('hide');
		  if(this.current == this.els.length - 2) this.nextbtn.fade('show');
      }
      this.next = function() {
          this.els[this.current].fade('out');
          this.current = (this.current + 1);// % this.els.length;
          this.els[this.current].fade('in');
		  if(this.current + 1 == this.els.length) this.nextbtn.fade('hide');
		  if(this.current == 1) this.prevbtn.fade('show');
      }
  }


// SCROLL CLIENTES HOME
////////////////


