
function frm_model_app_reset()
{
	document.frm_model_app.reset();
}
function frm_model_app_validate_form()
{
	with(document.frm_model_app)
	{
		
		if(trim(txt_name.value) == "")
		{
			alert("Please enter name.");
			txt_name.focus();
			return false;
		}
		
		if(trim(cbo_height_ft.value) == "")
		{
			alert("Please select height in foot.");
			cbo_height_ft.focus();
			return false;
		}
		if(trim(cbo_height_inch.value) == "")
		{
			alert("Please select height in inch.");
			cbo_height_inch.focus();
			return false;
		}
		if(trim(cbo_weight.value) == "")
		{
			alert("Please select weight.");
			cbo_weight.focus();
			return false;
		}
		if(trim(cbo_m1.value) == "")
		{
			alert("Please enter bust size.");
			cbo_m1.focus();
			return false;
		}
		if(trim(cbo_m2.value) == "")
		{
			alert("Please enter cup size.");
			cbo_m2.focus();
			return false;
		}
		if(trim(cbo_m3.value) == "")
		{
			alert("Please enter waist size.");
			cbo_m3.focus();
			return false;
		}
		if(trim(cbo_m4.value) == "")
		{
			alert("Please enter hip size.");
			cbo_m4.focus();
			return false;
		}
		if(trim(cbo_age.value) == "")
		{
			alert("Please select age.");
			cbo_age.focus();
			return false;
		}		
		if(trim(txt_ethnicity.value) == "" )
		{
			alert("Please select ethnicity.");
			txt_ethnicity.focus();
			return false;
		}
		
		if(trim(txt_address.value) == "")
		{
			alert("Please enter address.");
			txt_address.select();
			txt_address.focus();
			return false;
		}
		if(trim(txt_email.value) == "")
		{
			alert("Please enter email address. Format: emailid@domainname.com");
			txt_email.select();
			txt_email.focus();
			return false;
		}
		if(sValidateMailAddress(trim(txt_email.value)) == false)
		{
			alert("Please enter valid email address. Format: emailid@domainname.com");
			txt_email.select();
			txt_email.focus();
			return false;
		}
		if(trim(txt_phone.value) == "")
		{
			alert("Please enter phone number.");
			txt_phone.select();
			txt_phone.focus();
			return false;
		}
		
	
		 var i,flagCheck,int_arr_ubound;
		 flagCheck = false;	 
		 
		 int_arr_ubound = elements['cb_skill[]'].length;	 
		 for(i=0;i<int_arr_ubound;i++)
		 {
			if(elements['cb_skill[]'][i].checked)
			{
				flagCheck = true;			
			}
		 }	 
		
		if(flagCheck==false)
		{
			alert("Please select at least one Interest.");
			return false;
		}
		
		if(trim(txt_website.value) != "")
		{
			if(isValidUrl(trim(txt_website.value)) == false)
			{
				txt_url.select();
				txt_url.focus();
				return false;
			}
		}
		if(trim(file_headshot.value) == "")
		{
			alert("Please select head shot image file.");
			file_headshot.select();
			file_headshot.focus();
			return false;
		}
		if(trim(file_headshot.value) != "")
		{
			if(checkExt(trim(file_headshot.value))==false)
			{
				file_headshot.select();
				file_headshot.focus();
				return false;
			}
		}
		if(trim(file_fullbody.value) == "")
		{
			alert("Please select full body image file.");
			file_fullbody.select();
			file_fullbody.focus();
			return false;
		}
		if(trim(file_fullbody.value) != "")
		{
			if(checkExt(trim(file_fullbody.value))==false)
			{
				file_fullbody.select();
				file_fullbody.focus();
				return false;
			}
		}
		
		if(chkagree.checked == false)
		{
			alert("Please check agreement.");
			return false;
		}
	}
	return true;
}
