function validateComment() {

	var isValid = true;	
	isFieldFocusSet = false;

	if(isEmptyValue("user")){
			xAlert('Please enter the user name','comment_user'); 
			isValid=false;
			document.getElementById("user").focus;
	}else {
		xAlert('','comment_user');
	}	

	if(isEmptyValue("commentText")){
		xAlert('Comment cannot be empty','comment_commentText'); 
		isValid=false;
		document.getElementById("commentText").focus;
	}else {
		xAlert('','comment_commentText');
	}	

	if(!emailCheck("userEmail")){xAlert('Please enter valid email ','comment_userEmail');
	  	document.getElementById("userEmail").focus();
	  	isValid=false;}	
	else {xAlert('','comment_userEmail');}	
	

	if(isEmptyValue("captchaStr")){xAlert('Please enter security code','user_captcha'); isValid=false;}	
	else {xAlert('','user_captcha');}	
	
	return isValid;	
}

function clearForm(){
	xAlert('','comment_user');
	xAlert('','comment_commentText');
	xAlert('','comment_userEmail');
	xAlert('','user_captcha');
}



