function validateusercomment(obj,objtype,error_id,tofocus)
{
	var numericExpression = /^[0-9]+$/;
	var MaxCharacter=300;
	words=obj.value;
	WordLength=words.length;
	limit=MaxCharacter-WordLength;
	if(IsEmpty(obj,objtype)){
		printError(error_id,"Please enter the message",'block',obj,tofocus);
	    return false;
	}
	if(obj.value.match(numericExpression)){
		printError(error_id,"Numbers Alone Not Allowed ","block",obj,tofocus);
			return false;
	}
	if(WordLength<85){
		printError(error_id,"Enter the character More than 85 ",'block',obj,tofocus);
		return false;
	}
	if(limit<0){
                printError(error_id,"Max Length of the character 300 exceeded",'block',obj,tofocus);
                return false;
     }else{
		printError(error_id,"",'none',obj,'');
		return true;
	}
}
function validateproject(obj,tofocus){
	if(obj.selectedIndex==0){
		//Function For Validate Project->tofocus=1
		printError('project_error',"Please choose Project","block",obj,tofocus);
		return false;
	}
	else{
		printError('project_error',"","none",obj,tofocus);
	}
	return true;
}
function microsite_validate(obj){
	if(obj.NAME){
		if(!validatename(obj.NAME,"text",1)){
			return false;
		}
	}
	if(obj.COUNTRY){
		if(!validatecountry(obj.COUNTRY,"select",1)){
			return false;
		}
	}
	if(obj.COUNTRYCODE){
		if(!validatecountrycode(obj.COUNTRYCODE,"select",1)){
			return false;
		}
	}
	if(!validateContactNumber('COUNTRYCODE',obj.AREACODE,'AREACODE',obj.PHONENO,obj.MOBILENO,'phoneno_error','mobileno_error',1)){
		return false;
	}
	if(obj.projectname){
		if(!validateproject(obj.projectname,1)){
			return false;
	}
	}
	if(obj.EMAIL){
		if($('EMAIL').readOnly!=true){
			if(!validateemail(obj.EMAIL,"text","Div_user_email",1,1)){
				return false;
			}
		}
	}
	if(obj.MESSAGE){
		if(!validateusercomment(obj.MESSAGE,'textarea','Div_comment',1)){
				return false;
			}
		}
	return true;
}
function dispStatediv1(countryval){
	//For Selecting countrycode based on country
		    $('COUNTRYCODE').options[countryval].selected="selected";
}
function ms_dispStatediv(countrycodeval){
	//For Selectin Country based on country code
		    $('COUNTRY').options[countrycodeval].selected="selected";
	}
