function Rollover(cual,porcual){
		if(document.images){
			document.images[cual].src = '../img/' + porcual + '.jpg'
		}
	}

function RolloverSub(cual,porcual){
		if(document.images){
			document.images[cual].src = 'img/' + porcual + '.jpg'
		}
	}
	
	
function enviarmail(){
	if(document.frmemail.txNombre.value==''){
		alert('Debe ingresar su nombre.');
		document.frmemail.txNombre.focus();
		return false;
	}
	if(document.frmemail.txmail.value==''){
		alert('Debe ingresar su dirección de email.');
		document.frmemail.txmail.focus();
		return false;
	}else{
		if(!functMail(document.frmemail.txmail.value)){
			alert('Debe ingresar una dirección de email válida');
			document.frmemail.txmail.focus();
			return false;
		}
	}
	
	if(document.frmemail.txmsg.value==''){
		alert('Debe ingresar su comentario.');
		document.frmemail.txmsg.focus();
		return false;
	}
	document.frmemail.submit();
	
}
function functMail(string){
	if (typeof(string)!='object'){
		valor = string;
	}
	else{
			var X = new String;
			X = string.value;			
			valor = X;
	}
	if (string == ""){
			return(false);
	}
	else{
		
		if (valor.search(/[A-Za-z0-9ñ\-\.\_]+@[A-Za-z0-9\-]+\.[A-Za-z0-9]+(\.[A-Za-z0-9]*)?/g) != 0)
			return (false);
		else
			return(true);	
	}
}


function openPhoto(fotoName){
	window.open('popup.php?fotoName=' + fotoName,'Municipalidad_Perez','width=520,height=500,scrollbars=no,resizable=no,toolbar=no,left=100,top=100');
}
function openMapa(fotoName){
	window.open('popup.php?fotoName=' + fotoName,'Municipalidad_Perez','width=780,height=600,scrollbars=yes,resizable=yes,toolbar=no,left=10,top=10');
}
function openRadio(){
	window.open('radioonline.html','La_20_FM','width=190,height=210,scrollbars=no,resizable=no,toolbar=no,left=100,top=100');
}
function changeSection(id_seccion, id_contenido){
	document.frmSeccion.id_seccion.value=id_seccion;
	document.frmSeccion.id_contenido.value=id_contenido;
	document.frmSeccion.action='contenidos.php';
	document.frmSeccion.submit();
}

function changePublicacion(id_tipo){
	document.frmSeccion.tipo.value=id_tipo;
	document.frmSeccion.action='publicaciones.php';
	document.frmSeccion.submit();
}

function verPublicacion(idP){
		document.frm.idPublicacion.value = idP;
		document.frm.submit();
}
function verPublicacionHome(idP, idT){
		document.frm.idPublicacion.value = idP;
		document.frm.tipo.value = idT;
		document.frm.submit();
}