function pedido(d) {

	//We can use one Request object many times.
    var dir = "contenidos/"+d+".php";
	var req = new Request.HTML({url:dir, 
        onRequest: function(){
        $('webcontent').set('html', '<div id="mensajes"><img src="PIX/loading_asinc.gif"/ cargando...></div>');
        //$(d).setStyle('color', '#009900');
        },
		onSuccess: function(html) {
			//Clear the text currently inside the contenidos div.
			$('webcontent').set('text', '');
			//Inject the new DOM elements into the contenidos div.
			$('webcontent').adopt(html);
            var Acordion = new Accordion('.box_title','.information',{alwaysHide: true,
            onActive: function(titulo_activo, box_title){
			        titulo_activo.setStyle('background-color', '#009900');
		        },
		    onBackground: function(titulo_activo, box_title){
			        titulo_activo.setStyle('background-color', '#65CC00');
		        },
            opacity:false});
            LyteBox.prototype.updateLyteboxItems();
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('webcontent').set('html', '<div id="mensajes">Página no Encontrada</div>');
		}
	});
    req.send();

}



function menu(clase, color1, color2){
        var items = $$(clase);
        for(var i=0;i < items.length; i++){
            activo(items[i],clase,color1,color2);
        }
    }
    
function activo(id,clase,color1,color2){
        id.addEvent('click', function(){
            reset(color1,clase);
            id.setStyle('color',color2);
        });
    }
    
function reset(color, clase){
        var items = $$(clase);
        for (var i=0;i < items.length; i++){
            items[i].setStyle('color', color);
            }
        }