﻿// JScript File

function isEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return true;
	}
	return false;
}


function CheckName(sender, args)
  {  
    var iGotText = args.Value;  
      if (iGotText == 'NAME') 
      {
         alert('Name is required for newsletter');
         args.IsValid = false;        
      }
      else
      {args.IsValid = true;}
  }
  
  function CheckEmail(sender, args)
  {  
    var iGotText = args.Value;  
      if (iGotText == 'EMAIL ADDRESS') 
      {
         alert('Email Address is required for newsletter');
         args.IsValid = false;        
      }
      else
      {args.IsValid = true;}
  }


function ClientValidate(source, clientside_arguments)
   {         
      if (clientside_arguments.Value % 2 == 0 )
      {
         clientside_arguments.IsValid=true;
      }
      else {clientside_arguments.IsValid=false};
   }