
function InSpan1(theSpan){
 theSpan.className='spanIn1';
}

function OutSpan1(theSpan){
 theSpan.className='spanOut1';
}


function Form_Validator(theForm)
{
  if (theForm.Username.value == "")
     {
    alert("Please enter your last name.");
    theForm.Username.focus();
    return (false);
    }
  if (theForm.Pass.value == "")
     {
    alert("Please enter your subscription number.");
    theForm.Pass.focus();
    return (false);
    }

 return (true);
}

function Form_ValidatorHon(theForm)
{
 if (theForm.sur.value == "")
  {
    alert("Please enter a value for the \"Family name\" field.");
    theForm.sur.focus();
    return (false);
  }
  if (theForm.e_mail.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.e_mail.focus();
    return (false);
  }

  var pattern = /.+@.+(\.).+/; 
  if (theForm.e_mail.value.search(pattern) == -1) 
  { 
    alert("Please enter a valid E-mail address."); 
    theForm.e_mail.focus(); 
    return (false); 
  }

 return (true);
}

var theUrl 
function Myactn(actn){
theUrl=actn
}

function submitFrm(){
document.RegForm.action=theUrl
}

function Form_Validator2(theForm)
{
	for (t = 0; t < 6; t++)
          {
               if (eval("document.RegForm.rad[" + t + "].checked") == true)
                   {
				   	sw=1;
					j=t;
					t=6;
									
					}
				else{
									sw=0;
					}
		}
	if(sw ==0)
	{
		alert( "Please choose a type of Membership");
		theForm.rad[0].focus();
		return (false);
	}				

if (theForm.sur.value == "")
  {
    alert("Please enter a value for the \"Family name\" field.");
    theForm.sur.focus();
    return (false);
  }

 /* if (theForm.user1.value == "")
  {
    alert("Please enter a value for the \"Membership No\" field.");
    theForm.user1.focus();
    return (false);
  }
  */
  
  if (theForm.e_mail.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.e_mail.focus();
    return (false);
  }

  var pattern = /.+@.+(\.).+/; 
  if (theForm.e_mail.value.search(pattern) == -1) 
  { 
    alert("Please enter a valid E-mail address."); 
    theForm.e_mail.focus(); 
    return (false); 
  }

   submitFrm();
}


function Form_ValidatorUDP(theForm)
{
	
if (theForm.sur.value == "")
  {
    alert("Please enter a value for the \"Family name\" field.");
    theForm.sur.focus();
    return (false);
  }

  if (theForm.user1.value == "")
  {
    alert("Please enter a value for the \"Membership No\" field.");
    theForm.user1.focus();
    return (false);
  }

    return (true);
}

function Form_ValidatorUDPSOC(theForm)
{
	
if (theForm.org.value == "")
  {
    alert("Please enter a value for the \"Society name\" field.");
    theForm.org.focus();
    return (false);
  }

  if (theForm.user1.value == "")
  {
    alert("Please enter a value for the \"Membership No\" field.");
    theForm.user1.focus();
    return (false);
  }

    return (true);
}

function Form_ValidatorSoc(theForm)
{
	for (t = 0; t < 3; t++)
          {
               if (eval("document.RegForm.rad[" + t + "].checked") == true)
                   {
				   	sw=1;
					j=t;
					t=3;
									
					}
				else{
									sw=0;
					}
		}
	if(sw ==0)
	{
		alert( "Please choose a type of Membership");
		theForm.rad[0].focus();
		return (false);
	}				

if (theForm.org.value == "")
  {
    alert("Please enter a value for the \"Society name\" field.");
    theForm.org.focus();
    return (false);
  }

 /* if (theForm.user1.value == "")
  {
    alert("Please enter a value for the \"Membership No\" field.");
    theForm.user1.focus();
    return (false);
  }
  */
  
  if (theForm.e_mail.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.e_mail.focus();
    return (false);
  }

  var pattern = /.+@.+(\.).+/; 
  if (theForm.e_mail.value.search(pattern) == -1) 
  { 
    alert("Please enter a valid E-mail address."); 
    theForm.e_mail.focus(); 
    return (false); 
  }

   submitFrm();
}

function Form_ValidatorSoc2(theForm)
{
	for (t = 0; t < 3; t++)
          {
               if (eval("document.RegForm.rad[" + t + "].checked") == true)
                   {
				   	sw=1;
					j=t;
					t=3;
									
					}
				else{
									sw=0;
					}
		}
	if(sw ==0)
	{
		alert( "Please choose a type of Membership");
		theForm.rad[0].focus();
		return (false);
	}				

if (theForm.org.value == "")
  {
    alert("Please enter a value for the \"Society name\" field.");
    theForm.org.focus();
    return (false);
  }

 if (theForm.user1.value == "")
  {
    alert("Please enter a value for the \"Membership No\" field.");
    theForm.user1.focus();
    return (false);
  }
  
  
  /*if (theForm.e_mail.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.e_mail.focus();
    return (false);
  }

  var pattern = /.+@.+(\.).+/; 
  if (theForm.e_mail.value.search(pattern) == -1) 
  { 
    alert("Please enter a valid E-mail address."); 
    theForm.e_mail.focus(); 
    return (false); 
  }*/

   submitFrm();
}