// menu secundario

function menuSec(id,conf){

	this.id = id;

	this.x = conf.x;

	this.y = conf.y;

	this.w = conf.anchos;

	this.lnk = conf.links;

	this.selected = -1;

}



menuSec.prototype.set = function(raiz,donde){

	this.madre = arena(this.id+".madre",null,this.x,this.y,170,64,"hid",100);

	this.logo = arena(this.id+".logo",this.id+".madre",0,0,83,64,null,10,null,"<a href="+donde+"><img src="+raiz+"/img/logob2b.gif width=83 height=64 border=0></a>");

	this.rallab = arena(this.id+".rallab",this.id+".madre",166,0,2,62,null,10,"#FFFFFF");

	this.ralla = arena(this.id+".ralla",this.id+".madre",91,10,100,1,"hide",20,"#3C638C");

	this.opcion = [];

	for (var i=1; i<=5; i++){

		/* Cambios realizados por Elena Sotelo. 07/11/2001 
			 Comento el i!=3 para mostrar la imagen correspondiente a Sala de prensa
			 La linea de codigo comentada, se utiliza para quitar la imagen correspondiente a Sala de prensa.
		*/
		
		//if (i!=3){
			//this.opcion[i] = arena(this.id+".opcion["+i+"]",this.id+".madre",87,((i>3)? (i-1)*10 :i*10),75,9,null,10,null,"<a href="+this.lnk[i]+"><img src="+raiz+"/img/menu_1_"+i+".gif border=0></a>");
		
			this.opcion[i] = arena(this.id+".opcion["+i+"]",this.id+".madre",87,i*10,75,9,null,10,null,"<a href="+this.lnk[i]+"><img src="+raiz+"/img/menu_1_"+i+".gif border=0></a>");
			
			this.opcion[i].mOver(this.id+".mOver("+i+")");
			
			this.opcion[i].mOut(this.id+".mOut("+i+")");
		//}

	}

}



menuSec.prototype.mOver = function(cual){

	this.ralla.show();

	this.ralla.clip(0,1,0,0);

	this.ralla.move(91,this.opcion[cual].y+8);

	this.ralla.wTMClip(0,1,(this.w[cual]-4),1,30,30,6);

}



menuSec.prototype.mOut = function(cual){ (this.selected!=-1)? (cual!=this.selected)? this.mOver(this.selected) : null : this.ralla.wTMClip(0,1,0,1,30,30,6); }



menuSec.prototype.resetea = function(){

	this.selected = -1;

	this.ralla.wTMClip(0,1,0,1,30,30,6);

}
