function MM_validateForm() { //v4.0
		if (document.getElementById){
		var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
		for (i=0; i<(args.length-2); i+=3) { 
		  test=args[i+2]; val=document.getElementById(args[i]);  
		  if (val) { 
		    nm=val.alt; 
			
			if ((val=val.value)!="") {
			  if(val.toLowerCase().indexOf('sinus')!=-1 && nm != undefined && nm != "Texto de la imagen") errors+='- '+nm+' no puede contener la palabra sinus.\n';
		      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
		        if (p<1 || p==(val.length-1)) errors+='- '+nm+' debe contener una dirección de correo.\n';
		      } else if (test!='R') { num = parseFloat(val);
		        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
		        min=test.substring(8,p); max=test.substring(p+1);
		          }
		        } 
		   } else if (test.charAt(0) == 'R') errors += '- '+nm+' es un campo requerido.\n'; }
		} if (errors) alert('Hay error(es) en el envío:\n'+errors);
		document.MM_returnValue = (errors == '');
		} }
		
		
		function new_freecap()
		{
		// loads new freeCap image
		if(document.getElementById)
		{
			// extract image name from image source (i.e. cut off ?randomness)
			thesrc = document.getElementById("freecap").src;
			thesrc = thesrc.substring(0,thesrc.lastIndexOf(".")+4);
			// add ?(random) to prevent browser/isp caching
			document.getElementById("freecap").src = thesrc+"?"+Math.round(Math.random()*100000);
		} else {
			alert("Sorry, cannot autoreload freeCap image\nSubmit the form and a new freeCap will be loaded");
		}
}

$(document).ready(function(){
	$("#capLink").click(function(){
		new_freecap();
		return false;
	});
});