function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function Is(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
 
 
 function da(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }


function validateform3()
{


if (document.frm2.Name.value == "" )
  {
   document.frm2.Name.focus();

   alert ("Please Enter the Name of Author");
   return false;
  }

if (document.frm2.Designation.value == "" )
  {
   document.frm2.Designation.focus();

   alert ("Please Enter the Designation");
   return false;
  }
  
  if (document.frm2.Organization.value == "" )
  {
   document.frm2.Organization.focus();

   alert ("Please Enter Organization");
   return false;
  }
  if (document.frm2.Address.value == "" )
  {
   document.frm2.Address.focus();

   alert ("Please Enter the Address");
   return false;
  }
  
  if (document.frm2.City.value == "" )
  {
   document.frm2.City.focus();

   alert ("Please Enter the City");
   return false;
  }
  
  if (document.frm2.State.value == "" )
  {
   document.frm2.State.focus();

   alert ("Please Enter the State");
   return false;
  }
  
  if (document.frm2.Country.value == "" )
  {
   document.frm2.Country.focus();

   alert ("Please Enter the Country");
   return false;
  }
  

  
  if (document.frm2.PIN.value.length == 0) 
  {
      alert("Please Enter your pin/zip number");
	  document.frm2.PIN.focus();
	  return false;
  } 
  
  if (IsNumeric(document.frm2.PIN.value) == false) 
  {
      alert("Please enter a valid pin/zip number");
	  document.frm2.PIN.focus();
	  return false;
  }
	  
  
  if (document.frm2.City.value == "" )
  {
  
   document.frm2.City.focus();

   alert ("Please Enter your City");
   return false;
  }
    
	if (document.frm2.Phone.value == 0) 
  {
      alert("Please Enter your Phone number");
	  document.frm2.Phone.focus();
	  return false;
  } 
  
    
  
  if (document.frm2.Email.value == "" )
  {
   document.frm2.Email.focus();
   alert ("Please Enter your Email");
   return false;
  }
  
  var str = document.frm2.Email.value;
  if (((str.indexOf(".") > 2) && (str.indexOf("@") > 0)) == false )
  {
   document.frm2.Email.focus();
   alert ("Please Enter a valild Email");
   return false;
  }
  
 
  
       if (document.frm2.Type.value == "" )
  {
  
   document.frm2.Type.focus();

   alert ("Please Enter your Type");
   return false;
  }
  
       if (document.frm2.Title.value == "" )
  {
  
   document.frm2.Title.focus();

   alert ("Please Enter your Title");
   return false;
  }
 		
		
		
   if (document.frm2.AuthorID.value == "" )
  {
  
   document.frm2.AuthorID.focus();

   alert ("Please Enter Author Mail");
   return false;
  }
  
  var str1 = document.frm2.AuthorID.value;
  if (((str.indexOf(".") > 2) && (str.indexOf("@") > 0)) == false )
  {
   document.frm2.AuthorID.focus();
   alert ("Please Enter a vaild Email");
   return false;
  }
  

  
     if (document.frm2.Abstract.value == "" )
  {
  
   document.frm2.Abstract.focus();

   alert ("Please Enter Abstract");
   return false;
  }
  
  
       if (document.frm2.Biography.value == "" )
  {
  
   document.frm2.Biography.focus();

   alert ("Please Enter Biography");
   return false;
  }
  
  
  
         if (document.frm2.LName.value == "" )
  {
  
   document.frm2.LName.focus();

   alert ("Please Enter Name");
   return false;
  }
  
  	if (document.frm2.Date.value == 0) 
  {
      alert("Please Enter Date");
	  document.frm2.Date.focus();
	  return false;
  } 
    

    if (da(document.frm2.Date.value) == false) 
  {
      alert("The date format should be : mm-dd-yyyy");
	  document.frm2.Date.focus();
	  return false;
  }
  
 		
		
		
		
		
		
	document.frm2.method="post";
	//document.frm2.action="Default.asp"
	alert("Thanks for your submission.")
	document.frm2.submit();
}

function Clear()
{
	document.frm2.reset();
}



