
   function validateFormFreeSample() {
  	correct = true;
        myForm = document.forms[0];

                if ((correct) && (myForm.szFirstName.value == '')) {
		  myForm.szFirstName.focus();
                  alert ("Please, fill out 'First name'");
                  correct = false;
                }
                if ((correct) && (myForm.szLastName.value == '')) {
		  myForm.szLastName.focus();
                  alert ("Please, fill out 'Last name'");
                  correct = false;
                }
                if ((correct) && (myForm.szAddress.value == '')) {
		  myForm.szAddress.focus();
                  alert ("Please, fill out 'Address'");
                  correct = false;
                }
                if ((correct) && (myForm.szCity.value == '')) {
		  myForm.szCity.focus();
                  alert ("Please, fill out 'City'");
                  correct = false;
                }
                if ((correct) && (myForm.szState.value == '')) {
		  myForm.szState.focus();
                  alert ("Please, fill out 'State/Province'");
                  correct = false;
                }
                if ((correct) && (myForm.szPostalCode.value == '')) {
		  myForm.szPostalCode.focus();
                  alert ("Please, fill out 'Zip/Postal code'");
                  correct = false;
                }
                if ((correct) && (myForm.szCountry.value == '')) {
		  myForm.szCountry.focus();
                  alert ("Please, fill out 'Country'");
                  correct = false;
                }
                if ((correct) && (myForm.szProfession.value == '')) {
		  myForm.szProfession.focus();
                  alert ("Please, fill out 'Profession'");
                  correct = false;
                }
                if ((correct) && (myForm.szInstitution.value == '')) {
		  myForm.szInstitution.focus();
                  alert ("Please, fill out 'Institution'");
                  correct = false;
                }
                if ((correct) && (myForm.szDepartment.value == '')) {
		  myForm.szDepartment.focus();
                  alert ("Please, fill out 'Department'");
                  correct = false;
                }                
                if ((correct) && (myForm.szEmail.value == '')) {
		  myForm.szEmail.focus();
                  alert ("Please, fill out 'E-mail address'");
                  correct = false;
                }
                if ((correct) && !checkEmail(myForm.szEmail.value)){
		  myForm.szEmail.focus();
                  alert ("Please, check your E-mail address");
                  correct = false;
                }
                if ((correct) && (myForm.szPrimary_Interest.value == '')) {
		  myForm.szPrimary_Interest.focus();
                  alert ("Please, fill out 'Primary Research Interest'");
                  correct = false;
                }
                if ((correct) && (myForm.szGeogr_Interest.value == '')) {
		  myForm.szGeogr_Interest.focus();
                  alert ("Please, fill out 'Geographic Area of Interest'");
                  correct = false;
                }
               if ((correct) && (myForm.szSpeciality.value == '')) {
		  myForm.szSpeciality.focus();
                  alert ("Please, fill out 'Speciality'");
                  correct = false;
                }
         return correct;

   }


   function validateFormEmailAlert() {
        correct = true;
        myForm = document.forms[0];

                if ((correct) && (myForm.szFirstName.value == '')) {
		  myForm.szFirstName.focus();
                  alert ("Please, fill out 'First name'");
                  correct = false;
                }
                if ((correct) && (myForm.szLastName.value == '')) {
		  myForm.szLastName.focus();
                  alert ("Please, fill out 'Last name'");
                  correct = false;
                }
                if ((correct) && (myForm.szEmail.value == '')) {
		  myForm.szEmail.focus();
                  alert ("Please, fill out 'E-mail address'");
                  correct = false;
                }
                if ((correct) && !checkEmail(myForm.szEmail.value)){
		  myForm.szEmail.focus();
                  alert ("Please, check your E-mail address");
                  correct = false;
                }
                if ((correct) && (myForm.szInstitution.value == '')) {
		  myForm.szInstitution.focus();
                  alert ("Please, fill out 'Institution'");
                  correct = false;
                }
                if ((correct) && (myForm.szSpeciality.value == '')) {
		  myForm.szSpeciality.focus();
                  alert ("Please, fill out 'Speciality'");
                  correct = false;
                }
         return correct;

   }

   function validateFormGA() {
  	correct = true;
        myForm = document.forms[0];
        myszSubscription = "";
        myszReceive = "";
        myszCountry = "";
        myszDealer = "";
        myszRegisterVat = "";
        myszMetPayment = "";

        if (correct){
          for (i=0; i<myForm.szSubscription.length; i++) {
             if (myForm.szSubscription[i].checked) {
                 myszSubscription = myForm.szSubscription[i].value; break;
             }
          }
          if (myszSubscription == '') {
              myForm.szSubscription[0].focus();
                  alert ("Please, select one option in 'Subscription'");
                  correct = false;
          }
          if (myszSubscription == 'newSubscription' || myszSubscription == 'renewSubscription') {
          
              if (myForm.szQuantity.value == '') {
		  myForm.szQuantity.focus();
                  alert ("Please, fill out 'Quantity'");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szReceive.length; i++) {
                     if (myForm.szReceive[i].checked) {
                        myszReceive = myForm.szReceive[i].value; break;
                     }
                }
                if (myszReceive == '') {
		  myForm.szReceive[0].focus();
                  alert ("Please, fill out 'Send me the issue by'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szCountry.length; i++) {
                     if (myForm.szCountry[i].checked) {
                        myszCountry = myForm.szCountry[i].value; break;
                     }
                }
                if (myszCountry == '') {
		  myForm.szCountry[0].focus();
                  alert ("Please, fill out 'Delivery to'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szRegisterVat.length; i++) {
                     if (myForm.szRegisterVat[i].checked) {
                        myszRegisterVat= myForm.szRegisterVat[i].value; break;
                     }
                }
                if ((myszRegisterVat == '') && (myszCountry == 'Spain')) {
		  myForm.szRegisterVat[0].focus();
                  alert ("Please, fill out 'Are you a registered for VAT?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szNif.value == '') && (myszRegisterVat== 'Yes')){
		  myForm.szNif.focus();
                  alert ("Please, fill out 'VAT (NIF) number'");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szDealer.length; i++) {
                     if (myForm.szDealer[i].checked) {
                        myszDealer = myForm.szDealer[i].value; break;
                     }
                }
                if (myszDealer == "") {
		  myForm.szDealer[0].focus();
                  alert ("Please, fill out 'Are you a Dealer Agent?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szFirstNameDeliv.value == '')) {
		  myForm.szFirstNameDeliv.focus();
                  alert ("Please, fill out 'First name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szLastNameDeliv.value == '')) {
		  myForm.szLastNameDeliv.focus();
                  alert ("Please, fill out 'Last name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szAddressDeliv.value == '')) {
		  myForm.szAddressDeliv.focus();
                  alert ("Please, fill out 'Address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szPostalCodeDeliv.value == '')) {
		  myForm.szPostalCodeDeliv.focus();
                  alert ("Please, fill out 'Zip/Postal code' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCityDeliv.value == '')) {
		  myForm.szCityDeliv.focus();
                  alert ("Please, fill out 'City' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szStateDeliv.value == '')) {
		  myForm.szStateDeliv.focus();
                  alert ("Please, fill out 'State/Province' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCountryDeliv.value == '')) {
		  myForm.szCountryDeliv.focus();
                  alert ("Please, fill out 'Country' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szEmailDeliv.value == '')) {
		  myForm.szEmailDeliv.focus();
                  alert ("Please, fill out 'E-mail address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && !checkEmail(myForm.szEmailDeliv.value)){
		  myForm.szEmailDeliv.focus();
                  alert ("Please, check your E-mail address (Delivery Address)");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szMetPayment.length; i++) {
                     if (myForm.szMetPayment[i].checked) {
                        myszMetPayment = myForm.szMetPayment[i].value; break;
                     }
                }
                if (myszMetPayment == '') {
		  myForm.szMetPayment[0].focus();
                  alert ("Please, fill out one 'Method of payment'");
                  correct = false;
                }
                if ((myszMetPayment == 'Visa' || myszMetPayment == 'Master Card')){
                     if (myForm.szCardNumber.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Card Number'");
                        correct = false;
                     }
                     if (myForm.szExpiryMonth.options[myForm.szExpiryMonth.selectedIndex].value == '' || myForm.szExpiryYear.options[myForm.szExpiryYear.selectedIndex].value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Expiry Date'");
                        correct = false;
                     }
                     if (myForm.szCardName.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Cardholder's name'");
                        correct = false;
                     }
                }
              }
              if ((correct) && (myForm.szEmailInv.value != '') && !checkEmail(myForm.szEmailInv.value)){
		  myForm.szEmailInv.focus();
                  alert ("Please, check your E-mail address (Send invoice)");
                  correct = false;
              }

          }
          if (myszSubscription == 'proforma') {
         	
              if (myForm.szQuantity.value == '') {
		  myForm.szQuantity.focus();
                  alert ("Please, fill out 'Quantity'");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szReceive.length; i++) {
                     if (myForm.szReceive[i].checked) {
                        myszReceive = myForm.szReceive[i].value; break;
                     }
                }
                if (myszReceive == '') {
		  myForm.szReceive[0].focus();
                  alert ("Please, fill out 'Send me the issue by'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szCountry.length; i++) {
                     if (myForm.szCountry[i].checked) {
                        myszCountry = myForm.szCountry[i].value; break;
                     }
                }
                if (myszCountry == '') {
		  myForm.szCountry[0].focus();
                  alert ("Please, fill out 'Delivery to'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szRegisterVat.length; i++) {
                     if (myForm.szRegisterVat[i].checked) {
                        myszRegisterVat= myForm.szRegisterVat[i].value; break;
                     }
                }
                if ((myszRegisterVat == '') && (myszCountry == 'Spain')) {
		  myForm.szRegisterVat[0].focus();
                  alert ("Please, fill out 'Are you a registered for VAT?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szNif.value == '') && (myszRegisterVat== 'Yes')){
		  myForm.szNif.focus();
                  alert ("Please, fill out 'VAT (NIF) number'");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szDealer.length; i++) {
                     if (myForm.szDealer[i].checked) {
                        myszDealer = myForm.szDealer[i].value; break;
                     }
                }
                if (myszDealer == "") {
		  myForm.szDealer[0].focus();
                  alert ("Please, fill out 'Are you a Dealer Agent?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szEmailDeliv.value == '')) {
		  myForm.szEmailDeliv.focus();
                  alert ("Please, fill out 'E-mail address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && !checkEmail(myForm.szEmailDeliv.value)){
		  myForm.szEmailDeliv.focus();
                  alert ("Please, check your E-mail address (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szEmailInv.value != '') && !checkEmail(myForm.szEmailInv.value)){
		  myForm.szEmailInv.focus();
                  alert ("Please, check your E-mail address (Send invoice)");
                  correct = false;
              }
          }
        }
        return correct;
   }
   
   function validateFormBackAGH() {
  	correct = true;
        myForm = document.forms[0];
        myszReceive = "";
        myszRegisterVat = "";
        myszMetPayment = "";

         if (document.forms[0].szTotalNumVolIssueSel.value == '') {
              alert ("Please, at least select one back issues");
              correct = false;
         }else{
              
              if (correct){
                 for (i=0; i<myForm.szReceive.length; i++) {
                     if (myForm.szReceive[i].checked) {
                        myszReceive = myForm.szReceive[i].value; break;
                     }
                }
                if (myszReceive == '') {
		  myForm.szReceive[0].focus();
                  alert ("Please, fill out 'Send me the issue by'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szRegisterVat.length; i++) {
                     if (myForm.szRegisterVat[i].checked) {
                        myszRegisterVat= myForm.szRegisterVat[i].value; break;
                     }
                }
               if (myszRegisterVat == '') {
		  myForm.szRegisterVat[0].focus();
                  alert ("Please, fill out 'Are you a registered for VAT?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szNif.value == '') && (myszRegisterVat== 'Yes')){
		  myForm.szNif.focus();
                  alert ("Please, fill out 'VAT (NIF) number'");
                  correct = false;
              }
              if ((correct) && (myForm.szFirstNameDeliv.value == '')) {
		  myForm.szFirstNameDeliv.focus();
                  alert ("Please, fill out 'First name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szLastNameDeliv.value == '')) {
		  myForm.szLastNameDeliv.focus();
                  alert ("Please, fill out 'Last name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szAddressDeliv.value == '')) {
		  myForm.szAddressDeliv.focus();
                  alert ("Please, fill out 'Address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szPostalCodeDeliv.value == '')) {
		  myForm.szPostalCodeDeliv.focus();
                  alert ("Please, fill out 'Zip/Postal code' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCityDeliv.value == '')) {
		  myForm.szCityDeliv.focus();
                  alert ("Please, fill out 'City' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szStateDeliv.value == '')) {
		  myForm.szStateDeliv.focus();
                  alert ("Please, fill out 'State/Province' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCountryDeliv.value == '')) {
		  myForm.szCountryDeliv.focus();
                  alert ("Please, fill out 'Country' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szEmailDeliv.value == '')) {
		  myForm.szEmailDeliv.focus();
                  alert ("Please, fill out 'E-mail address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && !checkEmail(myForm.szEmailDeliv.value)){
		  myForm.szEmailDeliv.focus();
                  alert ("Please, check your E-mail address (Delivery Address)");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szMetPayment.length; i++) {
                     if (myForm.szMetPayment[i].checked) {
                        myszMetPayment = myForm.szMetPayment[i].value; break;
                     }
                }
                if (myszMetPayment == '') {
		  myForm.szMetPayment[0].focus();
                  alert ("Please, fill out one 'Method of payment'");
                  correct = false;
                }
                else if ((myszMetPayment == 'Visa' || myszMetPayment == 'Master Card')){
                     if (myForm.szCardNumber.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Card Number'");
                        correct = false;
                     }
                     if (myForm.szExpiryMonth.options[myForm.szExpiryMonth.selectedIndex].value == '' || myForm.szExpiryYear.options[myForm.szExpiryYear.selectedIndex].value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Expiry Date'");
                        correct = false;
                     }
                     if (myForm.szCardName.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Cardholder's name'");
                        correct = false;
                     }
                }else{
                  correct = true;
                }
              }
              if ((correct) && (myForm.szEmailInv.value != '') && !checkEmail(myForm.szEmailInv.value)){
		  myForm.szEmailInv.focus();
                  alert ("Please, check your E-mail address (Send invoice)");
                  correct = false;
              }
         }
         return correct;
   }

   
   function validateFormCurrBackGA() {
  	correct = true;
        myForm = document.forms[0];
        myszReceive = "";
        myszCountry = "";
        myszRegisterVat = "";
        myszMetPayment = "";
	myCurrentIssSelec = myForm.szCurrentIss;
	myTotalNumVolSelec = myForm.szTotalNumVolIssueSel.value;

         if (myTotalNumVolSelec == '' && !myCurrentIssSelec.checked) {
              alert ("Please, select at least one issue");
              correct = false;
         }else{
              
              if (correct){
                 for (i=0; i<myForm.szReceive.length; i++) {
                     if (myForm.szReceive[i].checked) {
                        myszReceive = myForm.szReceive[i].value; break;
                     }
                }
                if (myszReceive == '') {
		  myForm.szReceive[0].focus();
                  alert ("Please, fill out 'Send me the issue by'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szCountry.length; i++) {
                     if (myForm.szCountry[i].checked) {
                        myszCountry = myForm.szCountry[i].value; break;
                     }
                }
                if (myszCountry == '') {
		  myForm.szCountry[0].focus();
                  alert ("Please, fill out 'Delivery to'");
                  correct = false;
                }
              }
              if (correct){
                 for (i=0; i<myForm.szRegisterVat.length; i++) {
                     if (myForm.szRegisterVat[i].checked) {
                        myszRegisterVat= myForm.szRegisterVat[i].value; break;
                     }
                }
               if ((myszRegisterVat == '') && (myszCountry == 'Spain')) {
		  myForm.szRegisterVat[0].focus();
                  alert ("Please, fill out 'Are you a registered for VAT?'");
                  correct = false;
                }
              }
              if ((correct) && (myForm.szNif.value == '') && (myszRegisterVat== 'Yes')){
		  myForm.szNif.focus();
                  alert ("Please, fill out 'VAT (NIF) number'");
                  correct = false;
              }
              if ((correct) && (myForm.szFirstNameDeliv.value == '')) {
		  myForm.szFirstNameDeliv.focus();
                  alert ("Please, fill out 'First name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szLastNameDeliv.value == '')) {
		  myForm.szLastNameDeliv.focus();
                  alert ("Please, fill out 'Last name' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szAddressDeliv.value == '')) {
		  myForm.szAddressDeliv.focus();
                  alert ("Please, fill out 'Address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szPostalCodeDeliv.value == '')) {
		  myForm.szPostalCodeDeliv.focus();
                  alert ("Please, fill out 'Zip/Postal code' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCityDeliv.value == '')) {
		  myForm.szCityDeliv.focus();
                  alert ("Please, fill out 'City' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szStateDeliv.value == '')) {
		  myForm.szStateDeliv.focus();
                  alert ("Please, fill out 'State/Province' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szCountryDeliv.value == '')) {
		  myForm.szCountryDeliv.focus();
                  alert ("Please, fill out 'Country' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && (myForm.szEmailDeliv.value == '')) {
		  myForm.szEmailDeliv.focus();
                  alert ("Please, fill out 'E-mail address' (Delivery Address)");
                  correct = false;
              }
              if ((correct) && !checkEmail(myForm.szEmailDeliv.value)){
		  myForm.szEmailDeliv.focus();
                  alert ("Please, check your E-mail address (Delivery Address)");
                  correct = false;
              }
              if (correct){
                 for (i=0; i<myForm.szMetPayment.length; i++) {
                     if (myForm.szMetPayment[i].checked) {
                        myszMetPayment = myForm.szMetPayment[i].value; break;
                     }
                }
                if (myszMetPayment == '') {
		  myForm.szMetPayment[0].focus();
                  alert ("Please, fill out one 'Method of payment'");
                  correct = false;
                }
                else if ((myszMetPayment == 'Visa' || myszMetPayment == 'Master Card')){
                     if (myForm.szCardNumber.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Card Number'");
                        correct = false;
                     }
                     if (myForm.szExpiryMonth.options[myForm.szExpiryMonth.selectedIndex].value == '' || myForm.szExpiryYear.options[myForm.szExpiryYear.selectedIndex].value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Expiry Date'");
                        correct = false;
                     }
                     if (myForm.szCardName.value == ''){
		        myForm.szMetPayment[0].focus();
                        alert ("Please, fill out 'Cardholder's name'");
                        correct = false;
                     }
                }else{
                  correct = true;
                }
              }
              if ((correct) && (myForm.szEmailInv.value != '') && !checkEmail(myForm.szEmailInv.value)){
		  myForm.szEmailInv.focus();
                  alert ("Please, check your E-mail address (Send invoice)");
                  correct = false;
              }

         }
         return correct;
   }
