function cancelEdit() {
   if (confirm("Any changes you have made will be lost.  Are you sure you would like to continue?")) {
    document.location="http://www.amgenMed.com";
   }
  }
 
  function retrieveRadioSelection( radioGroup ) {
   var result;
   var i;
   
   for (i = radioGroup.length-1; i > -1; i-=1) {
    if (radioGroup[i].checked) {
    result = radioGroup[i].value;
    }
   }
  
   return result;  
  }
     
  function validateEntries( form1 ) {
   var form = document.forms["donationTypeSelectionForm"];
   // handle the therapeutic area radio button.
   var therapeuticAreaGroup = form.therapeuticArea;
   var donationTypeGroup = form.donationType;
   var donationTypeOther = form.donationTypeOther;
   
   var therapeuticArea = retrieveRadioSelection(therapeuticAreaGroup);
//   var donationType = retrieveRadioSelection(donationTypeGroup);
// this will always be the same for the Healthcare Donations path   
var donationType = "other"; 
   
   if (!therapeuticArea) {
    alert("A therapeutic area must be selected");
    
    return false;
   }
   
   if (!donationType) {
    alert("A donation type must be selected");
    
    return false;
   }
/*
   if (donationType == "pharmacy_residency") {
    //alert("The application acceptance period for 2008 Pharmacy Residency – Stipend Support has expired.");
    //return false;
   window.location.href = "apply_donation_additional_reqs_7.html";
    //return true;
   }
*/   
   
   if (therapeuticArea == "inflammation_rheumatology" && donationType == "fellowship") {
    var todayDate = new Date();
    var endDate = new Date(2007, 2, 16);
    if (todayDate >= endDate) {
     alert("Fellowship Programs are not currently open for this therapeutic area.  Please check back later.");
   
     return false;
    }
    
    return true;
   }
 
if (therapeuticArea == "inflammation_dermatology" && donationType == "fellowship") {
    //var todayDate = new Date();
    //var endDate = new Date(2008, 2, 29);
    //if (todayDate >= endDate) {
     //alert("The application acceptance period for 2008 Dermatology Fellowship/Residency Stipend Support has expired.");
    window.location.href = "apply_donation_additional_reqs_2_dermatology.html";
   
     return false;
   }
/*
   if ((donationType == "fellowship" || donationType == "junior_faculty") && (therapeuticArea != "oncology" && therapeuticArea != "nephrology")) {
    alert("Junior Faculty and Fellowhip programs are not open for this therapeutic area.");
    
    return false;
   }
   
*/
   if (therapeuticArea == "nephrology" && donationType == "fellowship"){
    //alert("The application acceptance period for 2008 Nephrology Fellowship Stipend Support has expired.");
    window.location.href = "apply_donation_additional_reqs_2.html";
    return false;
   }
   if (therapeuticArea == "nephrology" && donationType == "junior_faculty") {
    //alert("The application acceptance period for 2008 Nephrology Junior Faculty Awards has expired.");
       window.location.href = "apply_donation_additional_reqs_5a.html";
    
    return false;
   }
   
   if (therapeuticArea == "oncology" && donationType == "junior_faculty") {
    alert("Oncology will not be offering Junior Faculty Awards in 2007.");
    return false;
   }
   
   if (therapeuticArea == "oncology" && donationType == "fellowship") {
    //var todayDate = new Date();
    //alert(todayDate);
    //var beginDate = new Date(2007, 1, 15);
    //var endDate = new Date(2008, 2, 20);
    //if (todayDate < beginDate) {
     //alert("Applications for Hematology/Oncology physician fellowships will be accepted beginning February 15, 2007.");
        
     //return false;
    //}
    
    //if (todayDate > endDate) {
    // alert("The application acceptance period for 2008 Hematology/Oncology Fellowship-Stipend Support has expired.");
        window.location.href = "apply_donation_additional_reqs_oncology.html"; 
     return false;
    //}
   }
   
   if (donationType == "other") {
    if (donationTypeOther.value === null || donationTypeOther.value === '') {
     alert('Please provide a donation type description.');
     
     donationTypeOther.focus();
     return false;
    }
   }
   
   if (therapeuticArea == "inflammation_rheumatology" && donationType != "fellowship" && donationType != "junior_faculty"  && donationType != "pharmacy_residency" ) { 
    alert("Please note, Amgen and Wyeth jointly review all rheumatology requests.\n\nIf you have submitted this education grant to Wyeth, you are ineligible for grant funding from Amgen.");
   }
   
   return true;
  }