 function chk_form()

   {

    if(document.f1.username.value.length<5)

    {

     alert("Please fill user name here");

     document.f1.username.focus();

    }

    else if(document.f1.password.value.length<5)

    {

     alert("Please fill password here");

     document.f1.password.focus();

    }

   else if(document.f1.password1.value.length<5)

    {

     alert("Please fill confirm password here");

     document.f1.password1.focus();

    }

	else if (document.f1.password.value!=document.f1.password1.value) 

    {

     alert("Confirm password does not match, please specify again");

     document.f1.password1.focus();

    }


	else if(document.f1.first_name.value.length<1)
    {

     alert("Please enter first name here");

     document.f1.first_name.focus();

	}	

	else if(document.f1.mobile.value.length<10 && isNaN(document.f1.mobile.value) )
    {
     alert("Please enter your correct mobile no");
     document.f1.mobile.focus();
	}	

	else if(document.f1.additional_education.value.length>400)
    {

     alert("allowed character limit is 400, your are using " + document.f1.additional_education.value.length + " characters at the moment ");

     document.f1.additional_education.focus();

	}	

	else if(document.f1.social_organisation.value.length>400)

    {

     alert("allowed character limit is 400, your are using " + document.f1.social_organisation.value.length + " characters at the moment ");

     document.f1.social_organisation.focus();

	}	

	else if(document.f1.residential_address.value.length>300)

    {

     alert("allowed character limit is 300, your are using " + document.f1.residential_address.value.length + " characters at the moment ");

     document.f1.residential_address.focus();

	}	

	else if(document.f1.city.value.length<1)

    {

     alert("Please enter city here");

     document.f1.city.focus();

	}	

	else if(document.f1.pin.value.length<1)

    {

     alert("Please enter pin here");

     document.f1.pin.focus();

	}	


    else if(document.f1.email.value=="")

    {

     alert("Please fill Email Address");

     document.f1.email.focus();

    }

    else if(document.f1.email.value.indexOf('@') == -1)

     {

      alert("Please check your E-mail field.");

      document.f1.email.focus();

     }

    else if(document.f1.email.value.indexOf('.') == -1)

     {

      alert("Please check your E-mail field.");

      document.f1.email.focus();

     }
/*	else if(document.f1.nickname.value.length<1 || isNaN(document.f1.nickname.value))
    {
     alert("Please enter stay class from ! only numeric digits are allowed for e.g 10 ");
     document.f1.nickname.focus();
	}	

	else if(document.f1.maiden_name.value.length<1 || isNaN(document.f1.maiden_name.value))
    {
     alert("Please enter stay class upto you studied! only numeric digits are allowed for e.g 12 ");
     document.f1.maiden_name.focus();
	}	
*/
	else if(document.f1.phone_country.value.length<2)

    {

     alert("Please enter country code here");

     document.f1.phone_country.focus();

	}	

	else if(isNaN(document.f1.phone_country.value))

    {

     alert("Country code must be numeric");

     document.f1.phone_country.focus();

	}	

	else if(document.f1.std.value.length<2)

    {

     alert("Please enter STD code here");

     document.f1.std.focus();

	}	

	else if(isNaN(document.f1.std.value))

    {

     alert("STD code must be numeric");

     document.f1.std.focus();

	}	

	else if(document.f1.phone.value.length<3)

    {

     alert("Please enter phone no here");

     document.f1.phone.focus();

	}	

	else if(isNaN(document.f1.phone.value))

    {

     alert("phone must be numeric");

     document.f1.phone.focus();

	}	

	else if(document.f1.present_specialisation.value.length>200)

    {

     alert("allowed character limit is 200, your are using " + document.f1.present_specialisation.value.length + " characters at the moment ");

     document.f1.present_specialisation.focus();

	}	


	else 

	{

			document.f1.submit();

	}

	}







function chk_feedback()

{

    if(document.f1.name.value.length<2)

    {

     alert("Please fill name here");

     document.f1.name.focus();

    }

    else if(document.f1.email.value=="")

    {

     alert("Please fill Email Address");

     document.f1.email.focus();

    }

    else if(document.f1.email.value.indexOf('@') == -1)

     {

      alert("Please check your E-mail field.");

      document.f1.email.focus();

     }

    else if(document.f1.email.value.indexOf('.') == -1)

     {

      alert("Please check your E-mail field.");

      document.f1.email.focus();

     }

    else if(document.f1.subject.value.length<2)

    {

     alert("Please fill subject here");

     document.f1.subject.focus();

    }

    else if(document.f1.suggestion.value.length<5)

    {

     alert("Please fill suggestion here");

     document.f1.suggestion.focus();

    }

	else 

	{

		document.f1.submit();

	}

}


