//Variables globales
var banderas=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
//*****************
window.onload = prepareButton;
 
function prepareButton()
{

	$("ir_descuentos").onclick=function(){aparecerdes(0,"menu_descuentos");}
	$("ir_desfotos").onclick=function(){aparecerdes(1,"menu_desilus");}

	$("ir_menu").onclick=function(){
		window.location.href="menu.html";
	}
	
	$("irdes_tres_cerditos").onclick=function(){aparecerdes(2,"des_tres_cerditos");}
	$("irdes_caperucita").onclick=function(){aparecerdes(3,"des_caperucita");}
	$("irdes_patito").onclick=function(){aparecerdes(4,"des_patito");}
	$("irdes_7_cabritillos").onclick=function(){aparecerdes(5,"des_7_cabritillos");}
	$("irdes_blancanieves").onclick=function(){aparecerdes(6,"des_blancanieves");}
	$("irdes_alibaba").onclick=function(){aparecerdes(7,"des_alibaba");}
	$("irdes_hansel").onclick=function(){aparecerdes(8,"des_hansel");}
	$("irdes_pulgarcita").onclick=function(){aparecerdes(9,"des_pulgarcita");}
	$("irdes_bella_durmiente").onclick=function(){aparecerdes(10,"des_bella_durmiente");}
	$("irdes_ratoncito").onclick=function(){aparecerdes(11,"des_ratoncito");}
	$("irilus_tres_cerditos").onclick=function(){aparecerdes(12,"ilus_tres_cerditos");}
	$("irilus_caperucita").onclick=function(){aparecerdes(13,"ilus_caperucita");}
	$("irilus_patito").onclick=function(){aparecerdes(14,"ilus_patito");}
	$("irilus_7_cabritillos").onclick=function(){aparecerdes(15,"ilus_7_cabritillos");}
	$("irilus_blancanieves").onclick=function(){aparecerdes(16,"ilus_blancanieves");}
	$("irilus_alibaba").onclick=function(){aparecerdes(17,"ilus_alibaba");}
	$("irilus_hansel").onclick=function(){aparecerdes(18,"ilus_hansel");}
	$("irilus_pulgarcita").onclick=function(){aparecerdes(19,"ilus_pulgarcita");}
	$("irilus_bella_durmiente").onclick=function(){aparecerdes(20,"ilus_bella_durmiente");}
	$("irilus_ratoncito").onclick=function(){aparecerdes(21,"ilus_ratoncito");}
}

function aparecerdes(posvector,div){
		if (banderas[posvector]==0){
			$(div).className="visible_trans";
			banderas[posvector]=1;
		}else{
			$(div).className="oculto_trans";
			banderas[posvector]=0;
		}

}
