function isEmailAddr(emailID)
{
  var result = false
  var theStr = new String(emailID)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function Resume_Form_Validator(submit_resume)
{

  if (submit_resume.DisplayName.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    submit_resume.DisplayName.focus();
    return (false);
  }

  if (submit_resume.DisplayName.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Name\" field.");
    submit_resume.DisplayName.focus();
    return (false);
  }

  if (submit_resume.address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    submit_resume.address.focus();
    return (false);
  }

  if (submit_resume.address.value.length < 10)
  {
    alert("The Address you entered is not valid.\nPlease reenter the Address again in the \"Address\" field.");
    submit_resume.address.focus();
    return (false);
  }
  
  
 if (!isEmailAddr(submit_resume.emailID.value))
  {
    alert("Please enter a valid email ID in the \"eMail ID\" field.");
    submit_resume.emailID.focus();
    return (false);
  }

      
 if (submit_resume.IndustryExperience.value == 0)
  {
    alert("Please select a value for the \"Industry Experience\" field.");
    submit_resume.IndustryExperience.focus();
    return (false);
  }

if (submit_resume.Tech_Experience.value == 0)
  {
    alert("Please select a value for the \"Tech Experience\" field.");
    submit_resume.Tech_Experience.focus();
    return (false);
  }

if (submit_resume.Tech_Consulting.value == 0)
  {
    alert("Please select a value for the \"Tech Consulting Exp.\" field.");
    submit_resume.Tech_Consulting.focus();
    return (false);
  }

if (submit_resume.Availability_Date.value == "")
  {
    alert("Please select a value for the \"Availability Date\" field.");
    submit_resume.Availability_Date.focus();
    return (false);
  }
  
  
if (submit_resume.resume_upload.value == "")
  {
    alert("Please paste your resume in the Resume Textarea");
    submit_resume.resume_upload.focus();
    return (false);
  }

if (submit_resume.resume_upload.value == 200)
  {
    alert("Please Paste the Right Resume");
    submit_resume.resume_upload.focus();
    return (false);
  }



  return (true);
}
