<!--
function f1() 
{
	if (document.Member_Appln.Level.selectedIndex == 0)
	{
		document.Member_Appln.EntranceFee.value = 5000;
		document.Member_Appln.AnnualFee.value   = 5000;
	}

	if (document.Member_Appln.Level.selectedIndex == 1)
	{
		document.Member_Appln.EntranceFee.value = 2000;
		document.Member_Appln.AnnualFee.value   = 2000;
	}

	if (document.Member_Appln.Level.selectedIndex == 2)
	{
		document.Member_Appln.EntranceFee.value = 1000;
		document.Member_Appln.AnnualFee.value   = 1000;
	}

	if (document.Member_Appln.Level.selectedIndex == 3)
	{
		document.Member_Appln.EntranceFee.value = 1000;
		document.Member_Appln.AnnualFee.value   = 1000;
	}

	if (document.Member_Appln.Level.selectedIndex == 4)
	{
		document.Member_Appln.EntranceFee.value = 100;
		document.Member_Appln.AnnualFee.value   = 100;
	}

//	var indx = document.Member_Appln.Level.selectedIndex;
//	document.Member_Appln.EntranceFee.selectedIndex = indx;
//	document.Member_Appln.AnnualFee.selectedIndex = indx;

}

function Appln_Validator(theForm)
{

  if (theForm.User_Name.value == "")
  {
    alert("Please enter the USER NAME.");
    theForm.User_Name.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-_";
  var checkStr = theForm.User_Name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"_\" characters in the USER NAME field.");
    theForm.User_Name.focus();
    return (false);
  }

  if (theForm.Pwd.value == "")
  {
    alert("Please enter the Password.");
    theForm.Pwd.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-";
  var checkStr = theForm.Pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
	if (ch == checkOK.charAt(j))
        	break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and digit characters in the PASSWORD field.");
    theForm.Pwd.focus();
    return (false);
  }

  if (theForm.Pwd.value != theForm.Pwd_Confirm.value)
  {
    alert("Password confirmation does not match.");
    theForm.Pwd_Confirm.focus();
    return (false);
  }

  if (theForm.Name.value == "")
  {
    alert("Please enter the NAME to be included in SCAFI.");
    theForm.Name.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.Name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and whitespace characters in the NAME field.");
    theForm.Name.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-., \t\r\n\f";
  var checkStr = theForm.Company.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit, whitespace and \".\" characters in the COMPANY/INSTITUTE NAME field.");
    theForm.Company.focus();
    return (false);
  }

  if (theForm.Address.value == "")
  {
    alert("Please give your Complete postal Address.");
    theForm.Address.focus();
    return (false);
  }

  var checkOK = "0123456789- \t\r\n\f";
  var checkStr = theForm.Phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and whitespace characters in the PHONE field.");
    theForm.Phone.focus();
    return (false);
  }

  var checkOK = "0123456789- \t\r\n\f";
  var checkStr = theForm.Fax.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the FAX NUMBER field.");
    theForm.Fax.focus();
    return (false);
  }

   if (theForm.Email.value == "")
  {
    alert("Please enter a valid EMAIL ID.");
    theForm.Email.focus();
    return (false);
  }

  var txt
  var cnt
  var invalid
  var alpbet
  alpbet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
  txt=theForm.Email.value
  var inv
  if (txt.length >0)
  {
     stringarray=txt.split("");
     invalid = false
     inv=false
     for (var j=0; j < alpbet.length; j++)
     {
       if (stringarray[0].toUpperCase() == alpbet[j])
       {
          invalid = false;
          break;
       }
       else
           invalid = true;
     }
     if (invalid == true)
     {
       alert("Please enter valid EMAIL address - first character must be an alphabet");
       theForm.Email.focus();
       return false;
     }
     for (var i=0; i<txt.length; i++)
     {
        for (var j=0; j < alpbet.length; j++)
        {
            if (stringarray[i].toUpperCase() == alpbet[j])
            {
               inv = false;
               break;
            }
            else
            {
               if ((stringarray[i] == "1") || (stringarray[i] == "2") || (stringarray[i] == "3") || (stringarray[i] == "4") || (stringarray[i] == "5") || (stringarray[i] == "6") || (stringarray[i] == "7") || (stringarray[i] == "8") || (stringarray[i] == "9") || (stringarray[i] == "0"))
               {
                  inv = false;
                  break;
               }
               if (stringarray[i] == "@")
               {
                  inv = false;
                  break;
               }
               if (stringarray[i] == ".")
               {
                  inv = false;
                  break;
               }
               if (stringarray[i] == "_")
               {
                  inv = false;
                  break;
               }
               if (stringarray[i] == "-")
               {
                  inv = false;
                  break;
               }
               inv=true;
            }
       }
       if (inv == true)
          break;
    }
    if (inv == true)
    {
       alert("Only special characters allowed in EMAIL are @ .  _  and - ");
       theForm.Email.focus();
       return false;
    }
    if (txt.length == (txt.lastIndexOf(".")+1))
    {
       alert ("Please enter valid EMAIL address - dot cannot be the last character");
	theForm.Email.focus();
	return false;
    }
    if (txt.indexOf(".") ==  txt.indexOf("@")+ 1)
    {
       alert ("Please enter valid EMAIL address - @ and . in consecutive positions");
       theForm.Email_Ind.focus();
       return false;
    }
    if (txt.indexOf(".") ==  txt.indexOf("@")- 1)
    {
       alert ("Please enter valid EMAIL address - @ and . in consecutive positions");
	theForm.Email.focus();
       return false;
    }

    if (txt.indexOf("@") == -1)
    {
       alert ("Please enter valid EMAIL address - @ missing");
	theForm.Email.focus();
       return false;
    }
    if (txt.indexOf(".") == -1)
    {
       alert ("Please enter valid EMAIL address - . missing");
	theForm.Email.focus();
       return false;
    }
    if (txt.indexOf("@")<3)
    {
       alert("Please enter valid EMAIL address - @ within 3 positions");
	theForm.Email.focus();
       return false;
    }
    cnt=0;
    for (var i=0; i<stringarray.length; i++)
    {
       if (stringarray[i] == "@")
      {
          cnt= cnt + 1;
      }
    }
    if (cnt > 1)
    {
        alert("Please enter valid EMAIL address - more than 1 @");
	theForm.Email.focus();
        return false;
    }
  }

  return (true);
}

-->
