<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function validarbusqueda(){//Blas Ruiz. Horizonte Virtual 
var textov,texto1,texto2,check1,check2,check3,errors=""
textov=form1.texto.value;
check1 = form1.por.autor.checked;
texto2=form1.texto2.value;
check2 = form1.por.titulo.checked;
texto3=form1.texto3.value;
check3 = form1.por.tema.checked;
	if(check1!=false||check2!=false||check3!=false){
			if (textov=='' && check1==true){
			errors += '- El campo de autor no puede estar vacio.\n';
			}
			if (texto2=='' && check2==true){
			errors += '- El campo de titulo no puede estar vacio.\n';
			}
			if (texto3=='' && check3==true){
			errors += '- El campo de tema no puede estar vacio.\n';
			}
		}
		else
		{
		errors += '- Debe seleccionar una opción para hacer la busqueda.\n';
		}

	if (errors) alert('Se han encontrado los siguientes errores:\n'+errors);
  document.MM_returnValue = (errors == '');
  }
function validarcontacto(){
var nombret,ciudadt,telefonot,emailt,mensajet,email2,email3,errors="";
nombret=form1.nombre.value;
ciudadt=form1.ciudad.value;
telefonot=form1.telefono.value;
emailt=form1.email.value;
mensajet=form1.mensaje.value;
	if (nombret==''){
	errors += '- El Nombre es requerido.\n';
	}
	if (ciudadt==''){
	errors += '- La Ciudad es requerida.\n';
	}
	if (telefonot==''){
	errors += '- El Teléfono es requerido.\n';
	}
	if (emailt==''){
	errors += '- El E-mail es requerido.\n';
	}
	else{
	email2=emailt.indexOf ('@');
	email3=emailt.indexOf ('.');
		if (email2 ==-1 || email3 ==-1){
		 	errors += '- El E-mail es invalido.\n';
		} 
	}
	if (mensajet==''){
	errors += '- El mensaje es requerido.\n';
	}
	if (errors) alert('Se han encontrado los siguientes errores:\n'+errors);
  document.MM_returnValue = (errors == '');
}

//-->


