﻿function makeGray (obj, state, text){
	if (state && (obj.value == '')){
	obj.value = text;
	obj.style.color = "Gray";
	} else if (!state && (obj.value == text)){
	obj.style.color = "Black";
	obj.value = '';
	}
}

var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

function checkmail(e){
	var returnval=emailfilter.test(e.value)
	if (returnval==false){
	alert("Please enter a valid email address.")
	e.select()
	}
	return returnval
}

