//loultimo.js

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 == -68) {
		//alert(this.yact)
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',4000);
	}
	else if(this.yact == -135) {
		//alert(this.yact)
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',4000);
	}
	else if(this.yact == -202) {
		//alert(this.yact)
		this.yact--;
		tout = setTimeout(this.nombre + '.next()',4000);
	}
	else if(this.yact == -280) {
		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;
}