function chk() 
{
	if (document.company.m_mode.value!="e") 
		{
			if (document.company.txtlogin.value=="")
			 {
				alert("Please Enter a valid Login Name!")
				document.company.txtlogin.focus()
				return false
			 }
			var len=document.company.txtlogin.value.length
			if(len<5)
			{
				alert("Login name should be atleast 5 characters")
				document.company.txtlogin.focus()
				return false
			}
			if (document.company.txtpassword.value=="")
			{
				alert("Please Enter a valid Password!")
				document.company.txtpassword.focus()
				return false
			}
			var len1=document.company.txtpassword.value.length
			if(len1<5)
			{
				alert("Password should be atleast 5 characters")
				document.company.txtlogin.focus()
				return false
			}
			if (document.company.txtrepassword.value=="")
			{
				alert("Please Retype the password!")
				document.company.txtrepassword.focus()
				return false
			}
			if (document.company.txtpassword.value!=document.company.txtrepassword.value)
			{
				alert("Password not matched with retyped password")
				document.company.txtrepassword.focus()
				return false
			}
			if (document.company.txtquestion.value=="")
			{
				alert("Please Enter a valid Secret Question")
				document.company.txtquestion.focus()
				return false
			}
			if (document.company.txtanswer.value=="")
			{
				alert("Please Enter a answer for secret question")
				document.company.txtanswer.focus()
				return false
			}
		}
	if (document.company.txtcompany.value=="")
		{
			alert("Please Enter name of the Company!")
			document.company.txtcompany.focus()
			return false
		}
	if (document.company.txtindustry.value==""&&document.company.txtoindustry.value=="")
		{
			alert("Please Choose a Industry type!")
			document.company.txtindustry.focus()
			return false
		}
	if (document.company.txtperson.value=="")
		{
			alert("Please Enter a contact person name!")
			document.company.txtperson.focus()
			return false
		}
	if (document.company.txtdesignation.value=="")
		{
			alert("Please Enter a designation of contact person!")
			document.company.txtdesignation.focus()
			return false
		}
	if (document.company.txtaddress.value=="")
		{
			alert("Please Enter the address of the company!")
			document.company.txtaddress.focus()
			return false
		}
	if (document.company.sel_city.options[document.company.sel_city.selectedIndex].value=="")
		{
			alert("Please Enter the City !")
			document.company.sel_city.focus()
			return false
		}
	if (document.company.sel_state.options[document.company.sel_state.selectedIndex].value=="")
		{
			alert("Please Enter the State !")
			document.company.sel_state.focus()
			return false
		}
	if (document.company.txtcountry.value=="")
		{
			alert("Please Enter the Country of the company!")
			document.company.txtcountry.focus()
			return false
		}
	if (document.company.txtphone.value=="")
		{
			alert("Please Enter a Phone number")
			document.company.txtphone.focus()
			return false
		}
	if (document.company.txtemail.value=="")
		{
			alert("Please Enter a Email Id")
			document.company.txtemail.focus()
			return false
		}
	return true
}

function agree1() 
	{
		if(document.company.agree.checked) 
			{
				document.company.sub.disabled=false
				return true
			}
		else
			{
				document.company.sub.disabled=true
			}
}

function verify() {
win=window.open("","logincheck","height=200 width=300 resize=no scrolling=no")
win.document.location="logincheck.asp?n=" + document.company.txtlogin.value + "&fr=company"
}

