//funcion contra el spam
function antispam(cuenta,clase)
{
var dominio = "portalejido.com"
document.write("<a class='"+ clase +"' href=\"mailto:" + cuenta + "@" + dominio + "\">" + cuenta + "@" + dominio + "</a>");
}

function opcionmenu(){
	if ((self.location.href == 'http://servidor.portalejido/') || (self.location.href == 'http://www.portalejido.com/'))
	{
		var marcado='index';
	}
	else
	{	try {
			var documento = self.location.href.match( /\/([^/]+)$/ )[1];
			marcado = documento.replace(".aspx","");
		} catch(e){}
	}
	if (document.getElementById(marcado)!=null)
	{
		document.getElementById(marcado).className='botonon';
		document.getElementById(marcado).onmouseout=function(){}
	}
}

var activonoticias;
var activolateral;

activonoticias = "n1";
activolateral = "l1";

function colorboton(boton,clase){		

	var actual;
	var cla;
	var flecha;
	var botonflecha;
	
	cla = clase;
	actual = document.getElementById(boton);
	
	flecha = "f" + boton;
	botonflecha = document.getElementById(flecha);

	if((activonoticias != boton)&&(activolateral != boton)){
	
		if(cla == "botonmenuoff"){
			actual.className= cla;
			botonflecha.src = "imagenes/botonflechaoff.gif";
		}

		if(cla == "botonmenuon"){
			actual.className= cla;
			botonflecha.src = "imagenes/botonflechaon.gif";
		}
		
	}	
}

function imprimir(que) {
	var ventana = window.open("", "", "");
	var contenido = "<html><body onload='window.print();window.close();'>" + document.getElementById(que).innerHTML + "</body></html>";
	ventana.document.open();
	ventana.document.write(contenido);
	ventana.document.close();
}

function antispamempresa(cuenta,dominio,clase)
{
	if ((cuenta!="") && (dominio!="")){
		document.write("<a class='"+ clase +"' href=\"mailto:" + cuenta + "@" + dominio + "\">" + cuenta + "@" + dominio + "</a>");
	}
}
