 // Librería sin contenidos para un bóton realizada por Isi.
botonimagenincremento=5;

function botonimagen(nombre,posx,posy,ancho,alto,img1,img2,img3,accdentro,accabajo,accarriba,accfuera,zindex,visibilidad) {
	this.nombre=nombre;
	this.css="cssisibotonimagen"+nombre;
	this.capa="capaisibotonimagen"+nombre;
	this.img="imagenisibotonimagen"+nombre;
	this.posx=posx;
	this.posy=posy;
	this.posxactual=posx;
	this.posxfinal=posx;
	this.posyactual=posy;
	this.posyfinal=posy;
	this.ancho=ancho;
	this.alto=alto;
	this.i=0;
	this.nimg1=img1; this.nimg2=img2; this.nimg3=img3;
	this.img1=new Image(); this.img1.src=img1?img1:"";
	this.img2=new Image(); this.img2.src=img2?img2:"";
	this.img3=new Image(); this.img3.src=img3?img3:"";
	this.bloqueo=0;
	this.accdentro=accdentro;
	this.accabajo=accabajo;
	this.accarriba=accarriba;
	this.accfuera=accfuera;
	this.zindex=zindex;
	this.visibilidad=visibilidad;
	this.escribircss=isibotonimagenescribircss;
	this.escribirhtml=isibotonimagenescribirhtml;
	this.iniciar=isibotonimageniniciar;
	this.ver=isibotonimagenver;
	this.ocultar=isibotonimagenocultar;
	this.cambiarindex=isibotonimagencambiarindex;
	this.ir=isibotonimagenir;
	this.hacer=isibotonimagenhacer;
	this.dentro=isibotonimagendentro;
	this.abajo=isibotonimagenabajo;
	this.arriba=isibotonimagenarriba;
	this.fuera=isibotonimagenfuera;
	this.iry=isibotonimageniry;
	this.poner_imagen=isibotonimagenponer_imagen;
	this.bloquear=isibotonimagenbloquear;
	this.desbloquear=isibotonimagendesbloquear;
	}

function isibotonimagenescribircss() {
	document.write('.'+this.css+' {position:absolute;top:'+this.posy+';left:'+this.posx+';width:'+this.ancho+';height:'+this.alto+';clip:rect(0,'+this.ancho+','+this.alto+',0);visibility:'+(this.visibilidad?'visible':'hidden')+';z-index:'+this.zindex+'}\n');
	return false;
	}

function isibotonimagenescribirhtml() {
	document.write('<div id="'+this.capa+'" class="'+this.css+'" onmouseover="'+this.nombre+'.dentro()" onmousedown="'+this.nombre+'.abajo()" onmouseup="'+this.nombre+'.arriba()" onmouseout="'+this.nombre+'.fuera()">\n');
	if (is_nav4) { document.write('<a href="javascript:isibotonimagennada()" onmouseover="'+this.nombre+'.dentro()" onmousedown="'+this.nombre+'.abajo()" onmouseup="'+this.nombre+'.arriba()" onmouseout="'+this.nombre+'.fuera()">\n'); }
	document.write('<img name="'+this.img+'" src="'+this.img1.src+'" width='+this.ancho+' height='+this.alto+' border=0>\n');
	if (is_nav4) { document.write('</a></div>\n'); } else { document.write('</div>\n'); }
	return false;
	}

function isibotonimageniniciar() {
	}

function isibotonimagenver() {
	this.visibilidad=1;
	visibilidad(this.capa,this.visibilidad);
	return false;
	}

function isibotonimagenocultar() {
	this.visibilidad=0;
	visibilidad(this.capa,this.visibilidad);
	return false;
	}

function isibotonimagencambiarindex(i) {
	this.zindex=n;
	zindex(this.capa,this.zindex);
	return false;
	}

function isibotonimagenir(x,y) {
	clearInterval(this.i);
	this.posxfinal=x;
	this.posyfinal=y;
	acctmp=(this.nombre+".hacer()");
	eval('this.i=setInterval("'+acctmp+'",50)');
	return false;
	}

function isibotonimagenhacer() {
	if (this.posxactual<this.posxfinal) {this.posxactual+=botonimagenincremento; }
		else if (this.posxactual>this.posxfinal) {this.posxactual-=botonimagenincremento; }
	if (this.posyactual<this.posyfinal) {this.posyactual+=botonimagenincremento; }
		else if (this.posyactual>this.posyfinal) {this.posyactual-=botonimagenincremento; }
	if ((this.posxactual==this.posxfinal) && (this.posyactual==this.posyfinal)) {clearInterval(this.i); }
	posicionar(this.capa,this.posxactual,this.posyactual);
	return false;
	}

function isibotonimagendentro() {
	if (!this.bloqueo) {
		if (this.nimg2) { eval('document.'+this.img+'.src=this.img2.src'); }
		eval(this.accdentro);
		}
	// return false;
	}

function isibotonimagenabajo() {
	if (!this.bloqueo) {
		if (this.nimg3) { eval('document.'+this.img+'.src=this.img3.src'); }
		eval(this.accabajo);
		}
	// return false;
	}

function isibotonimagenarriba() {
	if (!this.bloqueo) {
		if (this.nimg2) { eval('document.'+this.img+'.src=this.img2.src'); }
		else if (this.nimg1) { eval('document.'+this.img+'.src=this.img1.src'); }
		eval(this.accarriba);
		}
	// return false;
	}

function isibotonimagenfuera() {
	if (!this.bloqueo) {
		if (this.nimg1) { eval('document.'+this.img+'.src=this.img1.src'); }
		eval(this.accfuera);
		}
	// return false;
	}
function isibotonimageniry(y) { this.ir(this.posx,y); return false;}

function isibotonimagennada() { }

function isibotonimagenbloquear() { this.bloqueo=1; return false;}

function isibotonimagendesbloquear() { this.bloqueo=0; return false;}

function isibotonimagenponer_imagen(n) {
	if ((!this.bloqueo) && (n==1 || n==2 || n==3)) {
		if (eval('this.img'+n+'.src')) { eval('document.'+this.img+'.src=this.img'+n+'.src'); }
		}
	}