function ImprimirNoticia(url){	desp=''//	var leftPos = 3000, topPos = 3000;	var leftPos = 30, topPos = 30;	window.open(url,'_blank',desp+'width=700 ,height=500 ,top=' + topPos + ',left=' + leftPos);	window.status="Printing..... Please wait"}function historia(id){	var url = document.forms[0].PathDb.value+"HistoriaNoticiaWeb?openform&"+id	abreventana(640,480,url,"historia","Si")}function buscar(idioma){var doc = document.forms[0];//var url = doc.PathDb.value+'page?openform&idcontenido=Busqueda'+idioma+'?SearchView&query='+doc.Busqueda.value;var url = doc.PathDb.value+'Busqueda'+idioma+'?SearchView&query='+doc.Busqueda.value;	desp='scrollbars,'//	var leftPos = 3000, topPos = 3000;	var leftPos = 30, topPos = 30;	window.open(url,'_top');}function contactenos(){abreventana(400,285,document.forms[0].PathDb.value+'/ContactenosWeb?openform','contactenos','No')}function temas(){abreventana(400,285,document.forms[0].PathDb.value+'/Tema?openform','Temas','No')}function misDatos(){var doc = document.forms[0];var user = doc.UserWeb.value;var url = doc.PathDb.value+"Usuarios/Alberto Croce?EditDocument";//var url = server+"Usuarios/"+user+"?EditDocument";abreventana(480,340,url,'misDatos','Si')}function abreventana(popW,popH,url,nomW,desplaza){	var w = 480, h = 340;	if (document.all || document.layers) {		w = screen.availWidth;   		h = screen.availHeight;	}	desp=''	if (desplaza=='Si'){		desp =  'scrollbars, '	}	var leftPos = (w-popW)/2, topPos = (h-popH)/2;	window.open(url,nomW,desp+'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos);}function MostrarDiv(div){if (div=='none'){return true}elseshowDiv(div);}function trim(aStr) {	return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "")}function validateRequiredFields( f ){	for (var i=0; i < f.elements.length; i++){		e = f.elements[i];		/* 			Split apart the arguments in to a 2 dimensional array!					format - Failure Alert Label # Required (true|false)		*/		a = e.id.split("#");				switch (a[3]){			case "rut": 	{					MostrarDiv(a[2]);					if (!checkDV(e)){						return false					};					break}			case "date": 	{					MostrarDiv(a[2]);					if (!ValidaFecha(e)){						return false					};					break}			case "num": {						MostrarDiv(a[2]);						if (!validateNum(e)){						return false						};						break}			default : break		}			//checks input types - :"text", "select-one", "select-multiple", "textarea", ["checkbox", "radio"]			if ( a[1] == "true" ) {			/*						showDiv sets the Div which contains required field visible			*/							MostrarDiv(a[2]);									switch (e.type) {					case "text":					if ( trim(e.value) == "" ){						alert(a[0] + " es un dato requerido.\n\nPor Favor, Ingrese Informaci\u00F3n");						e.value="";						e.focus();						return false}							break					case "textarea":					if ( trim(e.value) == "" ){						alert(a[0] + " es un dato requerido.\n\nPor Favor, Ingrese Informaci\u00F3n");						e.focus();						return false}						break					case "select-one":					if ( e.selectedIndex == 0 ){						alert(a[0] + " es un dato requerido.\n\nPor Favor, Seleccione una Entrada");						e.focus();						return false}						break					case "select-multiple":					if (e.selectedIndex == -1){						alert(a[0] + " es un dato requerido.\n\nPor Favor, Seleccione una Entrada");						e.focus();						return false}						break					case "checkbox":						hasChecked = false;						p = eval("e.form." + e.name);						for (var r=0; r < p.length; r++){							if ( p[r].checked ){hasChecked = true};						}						if (!hasChecked) {							alert(a[0] + " es un dato requerido.\n\nPor Favor, Seleccione una Entrada");							e.focus();							return hasChecked;						}						break				case "radio":						hasChecked = false;						p = eval("e.form." + e.name);						for (var r=0; r < p.length; r++){							if ( p[r].checked ){hasChecked = true};						}						if (!hasChecked) {							alert(a[0] + " es un dato requerido.\n\nPor Favor, Seleccione una Entrada");							e.focus();							return hasChecked;						}						break				default:						break				}						}	}	return true;}function ValidaField(doc){var field = doc.Authorvar field1=doc.email//var field2=doc.cuerpovar mensaje = 'Debe ingresar el Nombre';if(field.value==''){	alert(mensaje)	field.focus();	return false;}mensaje = 'Debe ingresar el email';if(field1.value==''){	alert(mensaje)	field1.focus();	return false;}//mensaje = 'Debe ingresar el comentario';//if(field2.value==''){//	alert(mensaje)//	field2.focus();//	return false;//}return true}function ValidaFieldEmail(doc){var field = doc.Para//var field2=doc.cuerpovar mensaje = 'Debe ingresar el destinatario';if(field.value==''){	alert(mensaje)	field.focus();	return false;}//mensaje = 'Debe ingresar el comentario';//if(field2.value==''){//	alert(mensaje)//	field2.focus();//	return false;//}return true}function doSubmit(f, v){	if ( v ){	if ( ValidaField( f ) ){ //		if ( v){ 				f.submit();			return(true)		}else{		return(false)				}	} else {		f.submit();	}}function doSubmitEmail(f, v){	if ( v ){	if ( ValidaFieldEmail( f ) ){ //		if ( v){ 				f.submit();			return(true)		}else{		return(false)				}	} else {		f.submit();	}}function validateNum(field) {	var valid = "0123456789"	var ok = "si";	var temp;		for (var i=0; i<field.value.length; i++) {		temp = "" + field.value.substring(i, i+1);		if (valid.indexOf(temp) == "-1") ok = "no";	}	if (ok == "no") {		alert("Solo n\u00FAmeros son aceptados");		field.value = ""		field.focus();		field.select();		return false   }else{		return true}}function mandarGalleta(nombre, valor) {//  top.cabezote.document.cookie = nombre + "=" + escape(valor)+"; expires=" + NoCaduca()  document.cookie = nombre + "=" + escape(valor)+"; expires=" + NoCaduca()}function NoCaduca() {var hoy = new Date()										var msEnXDias = 100000hoy.setDate(hoy.getDate() + msEnXDias)				return (hoy.toGMTString())}function replaceString(oldS,newS,fullS) {// Replaces oldS with newS in the string fullS   for (var i=0; i<fullS.length; i++) {           if (fullS.substring(i,i+oldS.length) == oldS) {         fullS = fullS.substring(0,i)+newS+fullS.substring(i+oldS.length,fullS.length)      }   }   return fullS}function Menu(elemento){if (!document.getElementById(elemento) ) return truevar estilo = document.getElementById(elemento).style.display;if (estilo=='block'){	document.getElementById(elemento).style.display='none';	}else{	document.getElementById(elemento).style.display='block';	mandarGalleta("cate",elemento);	}}function MenuOcultar(elemento){if (!document.getElementById(elemento) ) return true	document.getElementById(elemento).style.display='none';}function buscaValor(field) {if (field.type.toString().toLowerCase() == 'select-one'){	indice=field.options.selectedIndex;	var valor=field.options(indice).text;}else{	var valor=field.value;}return valor;}function Mostrar(elemento){	document.getElementById(elemento).style.display='block';}function Ocultar(elemento){	document.getElementById(elemento).style.display='none';}function lang1(idioma){var doc = document.forms[0];mandarGalleta("kdbidiomaavina", idioma);//mandarGalleta("idioma", idioma);//alert(document.URL);location.href=document.URL;//top.contenido.location.href=top.contenido.document.URL//top.cabezote.location.href=top.cabezote.document.URL}function bgChange(bg){var celda = top.cabezote.document.getElementById('celdaImagen')if(celda.background!=bg) celda.background=bg}//Funciones para cada menufunction menuFoto(foto,url){//bgChange(foto)//window.open(url,'contenido')window.open(url,'_self')}