// JavaScript Document

function validateSignUpForm(theform){	
	var valid = true;
	var s_email = theform.s_email.value;
	var s_comments = theform.s_comments.value;
	var re = /(<([^>]+)>)/gi;
    var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    if(pattern.test(s_email))
		{          
    }
	else{   
		alert("Please enter a valid \"Email\" address.");
		theform.s_email.focus();
		valid = false;
    }
	if (re.test(s_comments))
	{
		alert("Our form doesn't accept HTML, Script code in it.");
		theform.s_comments.focus();
		valid = false;
	}
	return valid;
}

function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}

function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}



	

