function isEmailAddress(theElement){
	var s = document.getElementById(theElement).value
	var filter=/^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
	if (s.length == 0 ) return false;
	if (filter.test(s))
		return true;
	else
		return false;
	}
	
function EstaVacio(FieldId){
	return(document.getElementById(FieldId).value=="");
	}
		

function SetScrollDivParameters(){
	scrolldiv_setColor('');	// Setting border color of the scrolling content
	setSliderBgColor('');	// Setting color of the slider div
	setContentBgColor('');	// Setting color of the scrolling content
	setScrollButtonSpeed(1);	// Setting speed of scrolling when someone clicks on the arrow or the slider
	setScrollTimer(5);	// speed of 1 and timer of 5 is the same as speed of 2 and timer on 10 - what's the difference? 1 and 5 will make the scroll move a little smoother.
	scrolldiv_setWidth(735);	// Setting total width of scrolling div 735
	scrolldiv_setHeight(450);	// Setting total height of scrolling div
	scrolldiv_initScroll();	// Initialize javascript functions	
	}


function VerificaDatos(){
	var nombre=true;
	var correo=true;
	var empresa=true;
	var texto=true;	
	
	str="Falta o tienen errores los siguientes campos:\n\n";
	if(EstaVacio('nombre')){ nombre=false; str=str + "-Nombre\n"; }
	if(EstaVacio('correo') || !isEmailAddress('correo')){correo=false; str=str + "-Correo\n"; }
	if(EstaVacio('empresa')){ empresa=false; str=str + "-Empresa\n";}
	if(EstaVacio('texto')){ texto=false;  str=str + "-Mensaje\n"; }
	
	
	if(nombre && correo && empresa && texto)
		document.form1.submit();
	else
		alert(str);
	}

