var EVOLUCION = {
	init : function()
	{
		if (document.getElementById('op_histo'))
		{
			var opcmenu = document.getElementById('op_histo').getElementsByTagName('a');
			for (cont = 0; cont < opcmenu.length; ++cont)
			{
				document.getElementById(opcmenu[cont].id).onclick = function()
				{
					if (document.getElementById('imagen_inicio_histo'))
						document.getElementById('imagen_inicio_histo').className = 'dnone';
					EVOLUCION.poneracero();
					document.getElementById(this.id).className = 'active';
					document.getElementById(this.id.replace('op_','txt_')).className = 'dblock';
					document.getElementById(this.id.replace('op_','img_')).className = 'dblock';
					return false;
				}
			}
		}
	},
	poneracero : function()
	{
		var opcmenu = document.getElementById('op_histo').getElementsByTagName('a');
		for (cont = 0; cont < opcmenu.length; ++cont)
		{
			document.getElementById(opcmenu[cont].id).className = 'dnone';
			document.getElementById(opcmenu[cont].id.replace('op_','txt_')).className = 'dnone';
			document.getElementById(opcmenu[cont].id.replace('op_','img_')).className = 'dnone';
		}
		
	}
}


/* LOAD */

function addLoadEvent(fn)
 {
	var old = window.onload;
	if(typeof window.onload != 'function')
		window.onload = fn;
	else
		window.onload = function()
		 {
			old();
			fn();
		 }
 }

addLoadEvent( function() { EVOLUCION.init(); } );
