function preloadImages() {
	arImageSrc = new Array (
		"../images/bot01b.gif",
		"../images/bot01.gif",
		"../images/bot02b.gif",
		"../images/bot02.gif",
		"../images/bot03b.gif",
		"../images/bot03.gif",
		"../images/bot04b.gif",
		"../images/bot04.gif",
		"../images/txt.gif",
		"../images/txt01.gif",
		"../images/txt02.gif",
		"../images/txt03.gif",
		"../images/txt04.gif"
	);

	arImageList = new Array ();
	for (counter in arImageSrc) {
		arImageList[counter] = new Image();
		arImageList[counter].src = arImageSrc[counter];
	}
}
preloadImages();
	
function imgovr1(m1) {
	m1.src = arImageList[0].src;
}
function imgout1(m1) {
	m1.src = arImageList[1].src;
}
function imgovr2(m2) {
	m2.src = arImageList[2].src;
}
function imgout2(m2) {
	m2.src = arImageList[3].src;
}
function imgovr3(m3) {
	m3.src = arImageList[4].src;
}
function imgout3(m3) {
	m3.src = arImageList[5].src;
}
function imgovr4(m4) {
	m4.src = arImageList[6].src;
}
function imgout4(m4) {
	m4.src = arImageList[7].src;
}
function imgovr5(m5) {
	m5.src = arImageList[9].src;
}
function imgout5(m5) {
	m5.src = arImageList[8].src;
}
function imgovr6(m5) {
	m5.src = arImageList[10].src;
}
function imgout6(m5) {
	m5.src = arImageList[8].src;
}
function imgovr7(m5) {
	m5.src = arImageList[11].src;
}
function imgout7(m5) {
	m5.src = arImageList[8].src;
}
function imgovr8(m5) {
	m5.src = arImageList[12].src;
}
function imgout8(m5) {
	m5.src = arImageList[8].src;
}
function rota_imagenes(imagenes, tiempo, nombre, numero) {
	tiempo=tiempo * 1000
	var arrimgs;
	arrimgs=imagenes.split(",");
	var numimgs = arrimgs.length;
	eval("window.document."+nombre).src= arrimgs[numero];
	numero=numero+1;
	if (numero>(numimgs-1)) {
		numero=0;
	}
	TimerObject = setTimeout('rota_imagenes("'+imagenes+'", '+tiempo/1000+', "'+nombre+'", '+numero+')', tiempo);
}
function detalle(cve) {	
	window.open('definicion.asp?cve_glosario='+cve,'detalle','scrollbars=no,resizable=no,width=335,height=250');
}
function condi() {
	window.open('condiciones.php','cond','scrollbars=no,resizable=no,width=320,height=250');
}
function condiuno() {
	window.open('disclaimer.php','cond','scrollbars=auto,resizable=no,width=320,height=537');
}

//////////////////////////////////////////////////
//IMPLEMENTACION DE NUEVOS OBJETOS
Element.implement({
	getText: function(){
		return this.get('text');
	},
	setText: function(text){
		return this.set('text', text);
	},
	setHTML: function(){
		return this.set('html', arguments);
	},
	getHTML: function(){
		return this.get('html');
	},
	getTag: function(){
		return this.get('tag');
	},
	trimAll: function(){
		
	},
	comboAnidadoJSON: function (hijo, nom_obj, data_json, defaultSel, val_padre) {
		var padre = this;
		var hijo = $(hijo);
		
		if (!hijo)
			return false;
			
		var id = ( typeof(val_padre) != 'undefined' )?val_padre:padre.get('value');
		
		var obj_act = {};
		var cont = false;
		if (id > 0 || id != "") {
			obj_act = eval( 'data_json.' + nom_obj + id );
		}
		if ( typeof(obj_act) != 'undefined' && obj_act.length > 0) {
			
			hijo.empty();
			
			var defSel = ( typeof(defaultSel) != 'undefined' )?true:false;
			var optSelDef = 0;
			
			$each(obj_act, function ( el, i ) {
				var opt = new Element('option');
				opt.setProperty("value", el.id);
				opt.setHTML(el.text); 
				hijo.adopt(opt);
				if ( el.id == defaultSel ) {
					optSelDef = i;
				}
			});
			if (optSelDef > 0) {
				hijo.options[optSelDef].selected = true;
			}
		} else {
			hijo.length = 1;
		}
	}
});