/**************************TODO LO DE AJAX ********************************************************/
var cargador='<center><br><br><img src=images/cargador.gif><br><font class=link-lead-news>Buscando</font></center>';

function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false; 
	try 
	{ 
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e)
	{ 
		try
		{ 
			// Creacion del objet AJAX para IE 
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } 

	return xmlhttp; 
}

function search_eventos(){
	var contenedor;
	contenedor = document.getElementById('list_eventos');
	var lengua= document.frm.lengua.value;
	var ct_ev_id= document.frm.ct_ev_id.value;
	contenedor.innerHTML=cargador;
	ajax=nuevoAjax();
	ajax.open("GET", "rpt_eventos.asp?lengua="+lengua+"&ct_ev_id="+ct_ev_id,true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			contenedor.innerHTML = ajax.responseText
		}
	}

	 ajax.send(null)

}


/**************************END AJAX ********************************************************************/
function VF_frm_search(){
	var theForm = document.frm_search;
	var errMsg = "";
	var setfocus = "";

	if (theForm['keyword'].value == ""){
		errMsg = "Escriba una palabra para buscar !!";
		setfocus = "['keyword']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else theForm.submit();
}

function zoomText(tipo){
//inicializaciones
obj=document.getElementById("Lectura");
if (obj.style.fontSize==""){
obj.style.fontSize="100%";
}
actual=parseInt(obj.style.fontSize);
incremento=20;
//operacion
if(tipo=="normal"){
obj.style.fontSize="100%"
}
if(tipo=="aumentar"){
valor=actual+incremento;
obj.style.fontSize=valor+"%"
}
if(tipo=="disminuir"){
valor=actual-incremento;
obj.style.fontSize=valor+"%"
}
}

function ventanaSecundaria (URL){ 
window.open(URL,"HETS","width=400, height=250, scrollbars=no, menubar=no, location=no, resizable=no") 
} 

function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint = window.open('','','letf=0,top=0,width=620,height=500,toolbar=0,scrollbars=1,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.write("<link href='css/estilo.css' rel='stylesheet' type='text/css'><title>IMPRIMIR</title>");
WinPrint.document.close()
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}