function validate_form ( )
{
	valid = true;
	sRequired="The following errors have occured:\n\n"
	
	if ( document.myform.FirstName.value.length < 1 )
        {
				sRequired+="- Please enter your name.\n"
                valid = false;
        }
		
		if ( document.myform.Title.value.length < 1 )
        {
				sRequired+="- Please enter your title.\n"
                valid = false;
        }
		
		if ( document.myform.Facility.value.length < 1 )
        {
				sRequired+="- Please enter the name of your facility.\n"
                valid = false;
        }
		
		if ( document.myform.Phone.value.length < 1 )
        {
				sRequired+="- Please enter your phone number.\n"
                valid = false;
        }

		if((document.myform.Email.value.indexOf("@")==-1) || (document.myform.Email.value.indexOf(".")==-1))
		{
		sRequired+= "- Please enter a valid email address.\n"
		valid = false;
		}
		
		if ( document.myform.Story.value.length < 1 )
        {
				sRequired+="- Please enter your patient safety story.\n"
                valid = false;
        }
		
		
		if (!valid){
			alert(sRequired);	
		}


        return valid;
}

function removeSpaces(string) {
	var tstring = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	return tstring;
}

// to strip spaces, add this to input field.....   onblur="this.value=removeSpaces(this.value);"