function check1()
{
if (document.form1.clogin.value == "")
{
alert("Please enter login name\n");
document.form1.clogin.focus();
return false;
}

fl = document.form1.clogin.value.substring(0,1);
if (! ((fl>="A" && fl<="Z") || (fl>="a" && fl<="z")))
{
alert("First character of the Login Name should be an alphabet.\n");
document.form1.clogin.focus();
return false;
}

if (document.form1.cpw.value == "")
{
alert("Please enter your password\n");
document.form1.cpw.focus();
return false;
}

if (document.form1.cpw.value.indexOf(" ",0)>=0)
{
alert("Password field should not contain any spaces.\n");
document.form1.cpw.focus();
return false;
}

if (document.form1.cpw.value != document.form1.cpw2.value)
{
alert("Your Password does not match with the Confirmation Password\n");
document.form1.cpw2.focus();
return false;
}

if (document.form1.cemail.value == "")
{
alert("Please enter your valid EMail ID\n");
document.form1.cemail.focus();
return false;
}

if (document.form1.cemail.value.indexOf("@",0)<0 || document.form1.cemail.value.indexOf(".",0)<0)
{
alert("EMail Id should have a proper domain name.\n");
document.form1.cemail.focus();
return false;
}

if (document.form1.cname.value == "")
{
alert("Please fill in the name\n");
document.form1.cname.focus();
return false;
}
if (document.form1.gender.value == "")
{
alert("Please select the gender\n");
document.form1.gender.focus();
return false;
}
if (document.form1.cmonth.value == "")
{
alert("Please select Your Birth Month\n");
document.form1.cmonth.focus();
return false;
}
if (document.form1.cdate.value == "")
{
alert("Please select Your Birth Date \n");
document.form1.cdate.focus();
return false;
}
if (document.form1.cyear.value == "")
{
alert("Please select Your Birth Year\n");
document.form1.cyear.focus();
return false;
}
if (document.form1.country.value == "")
{
alert("Please select the country\n");
document.form1.country.focus();
return false;
}

      if (document.form1.ctelephone.value == "")
      {
      alert("Please enter phone");
      document.form1.ctelephone.focus();
      return false;
      }

      if (!document.form1.ctelephone.value == "")
      {
      var digits = "0123456789-";
      for (var i = 0; i < document.form1.ctelephone.value.length; i++)
      {
      temp = document.form1.ctelephone.value .substring(i, i+1)
      if (digits.indexOf(temp) == -1 &&
      document.form1.ctelephone.value  != "")
      {
      alert("Enter a valid Phone Number");
      document.form1.ctelephone.focus();
      return false;
      }
     }
    }

      if (document.form1.terms.checked ==false)
      {
      alert("Please select the Terms and Condition");
      document.form1.terms.focus();
      return false;
      }


 document.form1.action="signup.jsp?mode=deathwish&id=1";
 document.form1.method="post";
 document.form1.submit();
}

