// To Check the username is alredy exists or not
function checkavailability(id) {

	var regExpEmailid = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	var userId = document.getElementById(id).value;
	if (userId.charAt(0) == ' ') {
		var message = "Error Space Not Allowed.";
		showError(message);
		return false;
	}
	if (userId == '' || userId == null) {
		var message = "Error Please Enter Username";
		showError(message);
		obj$(id).focus();
		return false;
	}

	if (!regExpEmailid.test(userId)) {
		var mess = "Plese Enter a valid Emailid"
		showError(mess);
		obj$(id).focus();
		return false;
	}

	return true;

}

function showError(message) {
	divObj = obj$("registerInfodiv");
	divObj.style.visibility = "visible";
	divObj.innerHTML = message;

} 
