var principal = '';

function desplegar_menu (elemento, valor) {
	anterior = principal;
	principal = elemento;
	
	if (valor == '#') {
		if(anterior == '')
		{
			document.getElementById('menu_op_'+principal).style.display = 'block';
			document.getElementById('op_'+principal).className = 'menu_on';
		}
		else
		{
			if (anterior == principal)
			{			
				if (document.getElementById('menu_op_'+principal).style.display == 'none') {
					document.getElementById('menu_op_'+principal).style.display = 'block';
					document.getElementById('op_'+principal).className = 'menu_on';
				} else {
					document.getElementById('menu_op_'+principal).style.display = 'none';
					document.getElementById('op_'+principal).className = 'menu_off';
				}
			}
			else
			{
				document.getElementById('menu_op_'+anterior).style.display = 'none';
				document.getElementById('menu_op_'+principal).style.display = 'block';
				document.getElementById('op_'+anterior).className = 'menu_off';
				document.getElementById('op_'+principal).className = 'menu_on';
			}
		}
	} else window.location = valor;
}

function rollover(valor, color) { document.getElementById("td_"+valor).style.backgroundColor = color; }

function metawords(valor) { window.open('http://northwindkitesurf.wordpress.com/?s='+valor); }
