function aniObj (nombre,capa,padre,vel,yact){

	this.nombre=nombre;
	this.capa=capa;
	this.padre=padre;
	this.vel=vel;
	this.yact = yact;
	this.dir=1;

	this.play=aniObj_play;
	this.next=aniObj_next;
	this.stop=aniObj_stop;
	this.mc=aniObj_mc;
	this.tout="";

 }

function aniObj_play() {
	this.mc(this.dir);this.pause=0;
	tout = setTimeout(this.nombre + '.next()',4000);
}

function aniObj_next() { 
//	alert(this.yact);
	if(this.yact == -90) {
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',7000);
	}
	else if(this.yact == -180) {
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',7000);
	}
	else if(this.yact == -270) {
		this.yact --;
		tout = setTimeout(this.nombre + '.next()',7000);
	}
	else if(this.yact == -360) {
		this.yact = 70;
		tout = setTimeout(this.nombre + '.next()',10);
	}
	else if(this.yact == -1) {
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',7000);
	}
	else {	
		this.mc(this.dir);
		setTimeout(this.nombre + '.next()',this.vel);
	}
}

function aniObj_mc(sb) { 
	var oCapa;
	if(sb) this.yact--;
	else this.yact++;
	if (navigator.appName == "Netscape") {
		eval("document.layers['"+this.padre+"'].document.layers['"+this.capa+"'].top=" + this.yact);
	}else{
		eval("document.all['"+this.capa+"'].style.top="+ this.yact);
	}
}

function aniObj_stop() {
	clearTimeout(this.tout);
	this.pause=1;
}

function slide (nombre,capa,padre,vel,yact,clipw){

	this.nombre=nombre;
	this.capa=capa;
	this.padre=padre;
	this.vel=vel;
	this.yact = yact;
	this.dir=1;

	this.start=slide_start;
	this.next=slide_next;
	this.mc= slide_mc;
}

function slide_start() { this.mc(this.yact); setTimeout(this.nombre + '.next()',100); }

var numero = 1;

function slide_next() { 
	
	if(this.yact == -155) {
		
		// se inicia la otra animacion.

		if(numero==num) {
			if(sact=='t1') { 
				numero=1
				t2.capa = 'tiempo' + String(numero)
				t2.start()
				sact = 't2'
			}
			else { 
				numero=1
				t1.capa = 'tiempo' + String(numero)
				t1.start()
				sact = 't1'
			}
		}
		
		else {
			if(sact=='t1') { 
				t2.capa = 'tiempo' + String(numero+1)
				t2.start()
				numero++
				sact = 't2'
			}
			else { 
				t1.capa = 'tiempo' + String(numero+1)
				t1.start()
				numero++
				sact = 't1'
			}
		}
		
		if(this.dir) this.yact--;
		else this.yact++;
		this.mc(this.yact);
		setTimeout(this.nombre + '.next()',this.vel);
	}
	else if(this.yact == -280) {
		
		// se para una i se mueve la capa
		this.yact = 125
		this.mc(this.yact)
	}
	else {	
		if(this.dir) this.yact--;
		else this.yact++;
		this.mc(this.yact);
		setTimeout(this.nombre + '.next()',this.vel);
	}
}

function slide_mc(y) { 
	var oCapa;
	if (navigator.appName == "Netscape") {
		eval("document.layers['"+this.padre+"'].document.layers['"+this.capa+"'].top=" + y);
	}else{
		eval("document.all['"+this.capa+"'].style.top="+ y);
	}
}