// JavaScript Document

function valbutton(thisform) {

myOption = -1;

for (i=thisform.opcion.length-1; i > -1; i--) {

if (thisform.opcion[i].checked) {

myOption = i; i = -1;

}

}

if (myOption == -1) {

return false;

} else return true;

} 



var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9_\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

function validaForm3(){
	obj = document.forms["destino_busquedas"];
	var errores = new Array();
	with (obj){		
			
			if(select2.value=="Indicar"){
				errores.push("- Por favor, el puerto sobre el que quiere información.");				
			}			
	
if (valbutton(obj)==false){

errores.push("- Indique el tipo de información que desea.");

}	
	
	
	if (errores.length > 0){
		var mensajes = "Por favor, revise los dados introducidos:\n\n";
		for(var i=0; i<errores.length; i++){
			mensajes += errores[i]+"\n";
		}
		alert(mensajes);
		return false;
	}
	}
}

