// JavaScript Document

function chkForm()
{

	
	if(document.frm.txtName.value=="")
	{
		alert("Name is Empty")
		document.frm.txtName.focus()
		return false	
	}	
	
	if(document.frm.txtAddress.value!="")
		{
			if(IsvalidDescription(document.frm.txtAddress.value,0,250,"","Maximum 250 characters allowed..",0)==false)
			{
				document.frm.txtAddress.focus()
				return false
			}

			if(Isword(document.frm.txtAddress.value,40)==false)
			{
				alert("One of the character exceeds the character limit 40")
				document.frm.txtAddress.focus()
				return false
			}

		}
		
	if (isValidEmail(document.frm.txtEmailid.value)==false)
	{
		alert("Email Id is Invalid")
		document.frm.txtEmailid.focus()
		return false	
	}
	
	if(document.frm.txtTitle.value=="")
	{
		alert("Title is Empty")
		document.frm.txtTitle.focus()
		return false	
	}
	
	if(document.frm.txtDesc.value=="")
	{
		alert("Description is Empty")
		document.frm.txtDesc.focus()
		return false	
	}	
	
	/*if(Isword(document.frm.txtDesc.value,40)==false)
	{
		alert("One of the character exceeds the character limit 40")
		document.frm.txtDesc.focus()
		return false
	}*/

	setTimeout("delay()",1250); 	
	return false
	
	
	
}

function delay()
{
	document.frm.action="Discussion_Add_Save.asp"
	document.frm.submit()
}
