  <!--

  //Messages
  msgSelectOption = 'Please select an option in';
  msgEmail = 'Please write a valid email address';
  msgNotEmpty = "Please complete the field";

	function CheckPage()
	{
	  var nResult = 0;
    var index = -1;
    var value, value1 = '';

    //Requerid fields
    var strEmail = 'Email';
    var strName = 'First Name';
    var strTypecase = 'Type of Case';
    var strGetstartedwith = 'Get Started With ';

    //Others
    var strPhone = 'Phone';
    var strLanguage = 'language';
    var strCaseinfo = 'Additional details';
    var strLocation = 'City, State, Country';

    strLanguage = document.getElementById( 'language' ).value;

		if(strLanguage == 'spanish')
		{
      strEmail = 'Email';
      strName = 'Nombre';
      strTypecase = 'Tipo de caso';
      strGetstartedwith = 'Empezar con ';
      msgSelectOption = 'Por favor seleccione una opción en';
      msgEmail = 'Por favor escriba una dirección de correo electronica valida';
      msgNotEmpty = "Por favor complete el campo ";
		}

    value1 = document.getElementById('getstartedwith');
    index = value1.selectedIndex;
    value1 = value1[index].value;
    if(value1 == 0 )
    {
      alert ( msgSelectOption + ' (' + strGetstartedwith +')' );
		  return;
    }

    value = document.getElementById('typecase');
    index = value.selectedIndex;
    value = value[index].value;
    if(value == 0 )
    {
      alert ( msgSelectOption + ' (' + strTypecase +')' );
		  return;
    }

		nResult += NotEmpty( nResult, 'name', strName);
		if(nResult == 1)
		{
			return;
		}

    nResult += Email( nResult, 'email','Email' );
		if(nResult == 1)
		{
			return;
		}

	  if (1)
    {
	    var el = document.getElementById( 'formCandidate' );
			if ( typeof(el)=='object' && el != null ) el.submit();
		}

	}

  function NotEmpty( old_res, id, field_title )
  {
     if ( old_res==0 )
     {
        var el = document.getElementById( id );
        if ( typeof(el)=='object' && el!=null )
          if ( el.value=='' )
          {
             alert( msgNotEmpty + ' ' + field_title + '"' );
             return 1;
          }
     }
     return 0;
  }
  function Email( old_res, id, field_title )
  {
     if ( old_res==0 )
     {
        var el = document.getElementById( id );
        if ( typeof(el)=='object' && el!=null && el.value!='' )
        {
           var re = /^[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9][a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$/;

           if (el.value.search(re) != -1 )  return 0;
           else
           {
              alert(msgEmail);
              return 1;
           }
        }
     }
     return 0;
  }

function nothing() {}
  -->
