function submitForms()
{
 if ( isFname() && isLname() && isDD() && isMM() && isYYYY() &&  isGender() && isMaritalStatus() && isNationality() && isAddress() && isCountry() && isphone() && isVisaStatus() && isPCategory() && isPositionID() && isExperience() && isSalary() && isCurrency()  && isHowDidYouHear() && isCareerSummary() && isEmail() &&  validatePwd() && File1())
	/*
	if (confirm("\n Thank you !"))
	{
	//alert("\n Thank you !");
	return true;
	}
	else
	{
		//alert("\n You have abort the submission.");
	return false
	}
	*/
	return true;
else 
	return false;
}
function isEmail() {
if (document.Form1.Email.value == "") {
alert (" Enter Email")
document.Form1.Email.focus();
return false;
}
if (document.Form1.Email.value.indexOf ('@',0) == -1 ||
document.Form1.Email.value.indexOf ('.',0) == -1) {
alert ("\n The E-Mail Field Requires a \"@\" and a \".\"be used. \n\n Enter Correct Email");
document.Form1.Email.focus();
return false;
}
return true;
}
function isFname() 
{
if (document.Form1.FirstName.value == "")
{
alert ("Enter First Name");
document.Form1.FirstName.focus();
return false;
}
return true;
}
function isLname()
 {
if (document.Form1.LastName.value == "") 
{
alert ("Enter Last Name");
document.Form1.LastName.focus();
return false;
}
return true;
}
function isAddress()
 {
if (document.Form1.Address.value == "")
 {
alert (" Enter Address");
document.Form1.Address.focus();
return false;
}
return true;
}

function isCountry()
 {
 if ( document.Form1.Country.selectedIndex == 0 )
    {
        alert ( "Select Country" );
        document.Form1.Country.focus();
        return false;
    }

return true;
} 
function isphone()
 {
if ( document.Form1.Phone.value == "" )
    {
        alert ("Enter Phone No");
        document.Form1.Phone.focus();
        return false;
    }

return true;

  }
 function isNationality()
 {
 if ( document.Form1.Nationality.selectedIndex == 0 )
    {
        alert ( "Select Nationality" );
        document.Form1.Nationality.focus();
        return false;
    }

return true;
}
  function isDD()
 {
 if ( document.Form1.DD.selectedIndex == 0 )
    {
        alert ( "Select Birth Date" );
        document.Form1.DD.focus();
        return false;
    }

return true;
 }
   function isMM()
 {
 if ( document.Form1.MM.selectedIndex == 0 )
    {
        alert ( "Select Birth Date" );
        document.Form1.MM.focus();
        return false;
    }

return true;
}
    function isYYYY()
 {
 if ( document.Form1.YYYY.selectedIndex == 0 )
    {
        alert ( "Select Birth Date" );
        document.Form1.YYYY.focus();
        return false;
    }

return true;
}
   function isGender()
 {
 if ( document.Form1.Gender.selectedIndex == 0 )
    {
        alert ( "Select Gender" );
        document.Form1.Gender.focus();
        return false;
    }

return true;
}
   function isMaritalStatus()
 {
 if ( document.Form1.MaritalStatus.selectedIndex == 0 )
    {
        alert ( "Select Marital Status" );
        document.Form1.MaritalStatus.focus();
        return false;
    }

return true;
}
   function isVisaStatus()
 {
 if ( document.Form1.VisaStatus.selectedIndex == 0 )
    {
        alert ( "Select Visa Status" );
        document.Form1.VisaStatus.focus();
        return false;
    }

return true;
}

function isPCategory()
{
 if ( document.Form1.ddlPositionCatID.selectedIndex == 0 )
    {
        alert ( "Select Position Category " );
		document.Form1.ddlPositionCatID.focus();	
        return false;
    }

return true;
}

 function isPositionID()
 {
 if ( document.Form1.PositionID.selectedIndex == 0 )
    {
        alert ( "Select Position Sought" );
        document.Form1.PositionID.focus();
        return false;
    }

return true;
}
function isExperience()
 {
 if ( document.Form1.Experience.selectedIndex < 0 )
    {
        alert ( "Select Experience" );
        document.Form1.Experience.focus();
        return false;
    }

return true;
}
function isSalary() 
{
if ( document.Form1.Salary.value=="") 
            {
		alert("Enter Expected Salary");
		document.Form1.Salary.focus();
		return false;
	}

	return true;
}
// salary field accepts only numbers
function isSalaryNum(field)
{
var valid = "0123456789";
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++){
	temp = "" + field.value.substring(i,i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no"){
	alert("Invalid entry in salary field! Only numbers are accepted!");
	field.focus();
	field.select();
}
}
function isCurrency()
 {
 if ( document.Form1.Currency.selectedIndex < 0 )
    {
        alert ( "Select Currency  ." );
        document.Form1.Currency.focus();
        return false;
    }

return true;
}
 function isHowDidYouHear()
 {
 if ( document.Form1.HowDidYouHear.selectedIndex == 0 )
    {
        alert ( "Select How did you hear about dulscojobs." );
        document.Form1.HowDidYouHear.focus();
        return false;
    }

return true;
  }
 function isCareerSummary()
 {
if (document.Form1.CareerSummary.value == "")
 {
alert (" Enter Career Summary");
document.Form1.CareerSummary.focus();
return false;
}
return true;
}
function validatePwd() {
var invalid = " "; // Invalid character is a space
var minLength = 3; // Minimum length
var pw1 = document.Form1.Password.value;
var pw2 = document.Form1.ConfirmPassword.value;
// check for a value in both fields.
if (pw1 == '' || pw2 == '') {
alert("Enter Password");
//document.Form1.Password.focus();
return false;
}
// check for minimum length
if (document.Form1.Password.value.length < minLength) {
alert('Your password must be at least ' + minLength + ' characters long. Try again.');
return false;
}
// check for spaces
if (document.Form1.Password.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
else {
if (pw1 != pw2) {
alert ("You did not enter the same new password twice. Please re-enter your password.");
return false;
}
else {
return true;
      }
   }
}
function File1() 
{
if (document.Form1.File1.value == "")
{
alert ("Pls. Upload Your Resume");
document.Form1.File1.focus();
return false;
}
return true;
}
