//---------------------------------------------------------------------------------------------------
//	Module Name:- Book Me
//	File Name  :- bookme.js
//	Create Date:- 10-Jul-2008
//	Intially Create By :-
//	Update History:
//---------------------------------------------------------------------------------------------------

function frm_bookme_Validate_Add()
{
	with(document.frm_bookme)
	{
		if(isEmpty(txt_skill.value))
		{
			alert("Please enter type of assignment.");
			txt_skill.select();
			txt_skill.focus();
			return false;
		}

		if(isEmpty(txt_budget.value))
		{
			alert("Please enter Budget.");
			txt_budget.select();
			txt_budget.focus();
			return false;
		}
		
		if(isNaN(txt_budget.value))
		{
			alert("Please enter numeric value for Budget.");
			txt_budget.select();
			txt_budget.focus();
			return false;
		}
		if(txt_budget.value <=0)
		{
			alert("Please enter value greater than zero for Budget.");
			txt_budget.select();
			txt_budget.focus();
			return false;
		}

		
		if(isEmpty(txt_eventdatetime.value))
		{
			alert("Please enter event Date, Time Details");
			txt_eventdatetime.select();
			txt_eventdatetime.focus();
			return false;
		}		
		
		//if(isDate('mdy',cbo_month.value + "/" + cbo_day.value + "/" + cbo_year.value)==false)
		//{
		//	alert("Please enter valid date.");
		//	return false;
		//}
		//if(cbo_timehh.value=="" || cbo_timemm.value=="" || cbo_timeampm.value=="")
		//{
		//	alert("Please enter valid time");
		//	return false;
		//}

		if(cbo_timezone.value=="")
		{
			alert("Please enter Event Timezone");
			cbo_timezone.focus();
			return false;
		}
		
		if(isEmpty(txt_venue.value))
		{
			alert("Please enter event Venue/Location.");
			txt_venue.select();
			txt_venue.focus();
			return false;
		}
		if(isEmpty(ta_description.value))
		{
			alert("Please enter Event Details.");
			ta_description.select();
			ta_description.focus();
			return false;
		}
		if((ta_description.value.length) > 2048)
		{
			alert("Maximum 2048 character can be allowed for Event Details.");
			ta_description.select();
			ta_description.focus();
			return false;
		}		

		if(isEmpty(txt_name.value))
		{
			alert("Please enter Contact Person Name.");
			txt_name.select();
			txt_name.focus();
			return false;
		}
		if (isEmpty(txt_email.value))
		{
			alert("Please enter E-mail Address");
			txt_email.focus();
			return false;			
		}
		if (!sValidateMailAddress(txt_email.value))
		{
			alert("Please enter valid email address: Format: emailid@domainname.com");
			txt_email.select();
			txt_email.focus();
			return false;
		}
		if(isEmpty(trim(txt_code.value)))
		{
			alert("Please enter Verification Code.");
			txt_code.select();
			txt_code.focus();
			return false;
		}
	}
}
