var tAnimar;
var tAnimart;
var tAnimarcs;
var w=0;
var wt=0;
var wcs=0;

function getdiv(id){
  if (document.layers){
	 var div = document.layers(id);
	 return div;
  } else if (document.all) {
	 var div = document.all(id);
	 return div;
  } else if (document.getElementById) {
	 var div = document.getElementById(id);
	 return div;
  }
}

function animar(id){	
  if ( w < 139 ){ 
  	w+=5;
  	getdiv(id).style.width=w+'px';
  	tAnimar=setTimeout("animar(id)",10)
  } else {
  	getdiv(id).style.width=144+'px';
    stopCount();
  }
}

function animarcs(idcs){	
  if ( wcs < 70 ){ 
  	wcs+=5;
  	getdiv(idcs).style.width=wcs+'px';
  	tAnimar=setTimeout("animarcs(idcs)",10)
  } else {
  	getdiv(idcs).style.width=70+'px';
    stopCount();
  }
}

function animart(idt){
  if ( wt < 269 ){ 
  	wt+=5;
  	getdiv(idt).style.width=wt+'px';
  	tAnimart=setTimeout("animart(idt)",10)
  } else {
  	getdiv(idt).style.width=269+'px';
    stopCount();
  }
}

function animartb(idt){
  if ( wt > 15 ){ 
  	wt-=5;
  	getdiv(idt).style.width=wt+'px';
  	tAnimart=setTimeout("animartb(idt)",10)
  } else {
  	getdiv(idt).style.width=10+'px';
    stopCount();
  }
}

function stopCount()
{
 clearTimeout(tAnimar);
 clearTimeout(tAnimart);
}

var o = 10;
var tTrans;

function offpr(){
  if ( o > 1 ){ 
  	o-=1;
  	getdiv('productofull').style.opacity = o/10;
	getdiv('cubretodo').style.opacity = o/20;
	getdiv('productofull').style.filter = 'alpha(opacity=' + o*10 + ')';
	getdiv('cubretodo').style.filter = 'alpha(opacity=' + o*5 + ')';
  	tTrans=setTimeout("offpr()",10)
  } else {
	getdiv('productofull').style.display= 'none';
	getdiv('cubretodo').style.display= 'none';
    stopCount();
  }
}

var on = 0;
var tTranson;

function onpr(){
  if ( on < 10 ){ 
  	on+=1;
	getdiv('productofull').style.opacity = on/10;
	getdiv('cubretodo').style.opacity = on/20;
	getdiv('productofull').style.filter = 'alpha(opacity=' + on*10 + ')';
	getdiv('cubretodo').style.filter = 'alpha(opacity=' + on*5 + ')';
  	tTranson=setTimeout("onpr()",10)
  } else { 
  	stopCount();
  }
}
