<!--
function redirectIfNotFriday(redirectURL) {
 
  var date_obj = new Date();
  var month_utc = date_obj.getUTCMonth();
  var month_mst = month_utc;
  var date_utc = date_obj.getUTCDate();
  var date_mst = date_utc;
  var year_utc = date_obj.getUTCFullYear();
  var year_mst = year_utc;
  var day_utc = date_obj.getUTCDay();
  var day_mst = day_utc;
  var hour_utc = date_obj.getUTCHours();
  var hour_mst = hour_utc;
  var minute_utc = date_obj.getUTCMinutes();
  var minute_mst = minute_utc;
  date_obj.setMinutes(minute_mst);
  var second_utc = date_obj.getUTCSeconds();
  var second_mst = second_utc;
  date_obj.setSeconds(second_mst);
  hour_mst = hour_utc - 8; //because hours are 0-based, we subtract 8 instead of 7, to convert GMT to MST
  if (hour_mst >= 0)
      date_obj.setHours(hour_mst);
  else if (hour_mst < 0) { //which happens when hour_utc is <= 7
      if (hour_mst == -1) { //because hour_utc is 7
          hour_mst = 23;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -2) { //because hour_utc is 6
          hour_mst = 22;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //subtract 1 from month since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //decrement year since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -3) { //because hour_utc is 5
          hour_mst = 21;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -4) { //because hour_utc is 4
          hour_mst = 20;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -5) { //because hour_utc is 3
          hour_mst = 19;
          date_obj.setHours(hour_mst);
          date_mst--; //substract 1 from date since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //decrement year since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -6) { //because hour_utc is 2
          hour_mst = 18;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //decrement year since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -7) { //because hour_utc is 1
          hour_mst = 17;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }

      else if (hour_mst == -8) { //because hour_utc is 0
          hour_mst = 16;
          date_obj.setHours(hour_mst);
          date_mst--; //since we just lost a day
          if (date_mst == 0) { //date before decrementing was the first day of the month
              month_mst--; //since we just lost a month
              if (month_mst == -1) { //month before decrementing was the first month of the year
                  month_mst = 11; //set month to last since we're losing time
                  date_obj.setMonth(month_mst);
                  year_mst--; //since we just lost a year
                  date_obj.setFullYear(year_mst);
              }
              date_mst = getLastDayOfMonth2011Through2015(year_mst, month_mst);
          }
          date_obj.setDate(date_mst);
          day_mst = date_obj.getDay(); //get the day again since the date changed
      }
  }

  var full_date_mst = month_mst + "/" + date_mst + "/" + year_mst;
  //alert("full_date_mst is: " + full_date_mst);
  var full_time_mst = hour_mst + ":" + minute_mst + ":" + second_mst;
  //alert("full_time_mst is: " + full_time_mst);

  if (dateIsInDST2011Through2015(full_date_mst, full_time_mst)) {
      var hour_mdt = hour_mst;
      var day_mdt = day_mst;
      var date_mdt = date_mst;
      var month_mdt = month_mst;
      var year_mdt = year_mst;
      hour_mdt++; //add 1 to the hour since conversion from GMT to MST is GMT - 6h when DST is in effect
      if (hour_mdt == 24) { //hour is 1:00 AM
          hour_mdt = 0;

          day_mdt++; //add 1 to the day since incrementing the hour brought it to the next day
          if (day_mdt == 7) //day is the first day of the week
              day_mdt = 0;

          date_mdt++; //add 1 to the date since incrementing the hour brought it to the next day
          if (date_mdt == 32) { //date is the first day of the next month
              date_mdt = 1;

              month_mdt++; //add 1 to the month since incrementing the date brought it to the next month
              if (month_mdt == 12) { //month is the first month of the next year
                  month_mdt = 0;
                  year_mdt++; //add 1 to the year since incrementing the month brought it to the next year
                  date_obj.setFullYear(year_mdt);
              }
              date_obj.setMonth(month_mdt);
          }
          date_obj.setDate(date_mdt);
      }
      date_obj.setHours(hour_mdt);
  }

  var today = date_obj.getDay();
  //alert("today is: " + today);
  var hour = date_obj.getHours();
  //alert("hour is: " + hour);
  if (today != 5) { //i.e. Friday (counting begins at 0, not 1)
      window.location = redirectURL; //redirect the browser to the url passed
      return true;
  }

  else if (hour < 16) { //today is Friday, but time is less than 5:00 PM
      window.location = redirectURL; //redirect the browser to the url passed
      return true;
  }
  
  else {
      return false;
  }

}

function dateIsInDST2011Through2015(fullDate, fullTime) {
 
  var date_arr = fullDate.split("/");
  var month = date_arr[0];
  var date = date_arr[1];
  var year = date_arr[2];

  //Get elements of the time passed
  var time_arr = fullTime.split(":");
  var hour = time_arr[0];
  var minute = time_arr[1];
  var second = time_arr[2];
  
  if ((year == 2011) && ((month >= 2) && (month <= 10))) { //month is March or a month after March and the month is before November or November
      if ((month == 10) && (date > 6)) //current date is in November but past November 6th
          return false;

      else if ((month == 10) && (date == 6)) { //current date is November 6th
          if (hour < 1) //hour is less than 2 AM
              return true; //since DST has not ended yet, even though it is the end date

          else if ((hour == 1) || (hour > 1)) //hour is 2 AM or later
              return false; //since DST just ended
      }
      
      else if (month < 10) {
          if ((month == 2) && (date < 13)) //month is March but its not the 13th yet
              return false;

          else if ((month == 2) && (date == 13))
              if (hour < 1) //hour is less than 2 AM
                  return false;

          return true; //in all other cases
      }
  }
  
  else if ((year == 2012) && ((month >= 2) && (month <= 10))) { //month is March or a month after March and the month is before November or November
      if ((month == 10) && (date > 4)) //current date is in November but past November 4th
          return false;

      else if ((month == 10) && (date == 4)) { //current date is November 4th
          if (hour < 1) //hour is less than 2 AM
              return true; //since DST has not ended yet, even though it is the end date

          else if ((hour == 1) || (hour > 1)) //hour is 2 AM or later
              return false; //since DST just ended
      }
      
      else if (month < 10) {
          if ((month == 2) && (date < 11)) //month is March but its not the 11th yet
              return false;

          else if ((month == 2) && (date == 11))
              if (hour < 1) //hour is less than 2 AM
                  return false;

          return true; //in all other cases
      }
  }
  
  else if ((year == 2013) && ((month >= 2) && (month <= 10))) { //month is March or a month after March and the month is before November or November
      if ((month == 10) && (date > 3)) //current date is in November but past November 3rd
          return false;

      else if ((month == 10) && (date == 3)) { //current date is November 3rd
          if (hour < 1) //hour is less than 2 AM
              return true; //since DST has not ended yet, even though it is the end date

          else if ((hour == 1) || (hour > 1)) //hour is 2 AM or later
              return false; //since DST just ended
      }
      
      else if (month < 10) {
          if ((month == 2) && (date < 10)) //month is March but its not the 10th yet
              return false;

          else if ((month == 2) && (date == 10))
              if (hour < 1) //hour is less than 2 AM
                  return false;

          return true; //in all other cases
      }
  }
  
  else if ((year == 2014) && ((month >= 2) && (month <= 10))) { //month is March or a month after March and the month is before November or November
      if ((month == 10) && (date > 2)) //current date is in November but past November 2nd
          return false;

      else if ((month == 10) && (date == 2)) { //current date is November 2nd
          if (hour < 1) //hour is less than 2 AM
              return true; //since DST has not ended yet, even though it is the end date

          else if ((hour == 1) || (hour > 1)) //hour is 2 AM or later
              return false; //since DST just ended
      }
      
      else if (month < 10) {
          if ((month == 2) && (date < 9)) //month is March but its not the 9th yet
              return false;

          else if ((month == 2) && (date == 9))
              if (hour < 1) //hour is less than 2 AM
                  return false;

          return true; //in all other cases
      }
  }
  
  else if ((year == 2015) && ((month >= 2) && (month <= 10))) { //month is March or a month after March and the month is before November or November
      if ((month == 10) && (date > 1)) //current date is in November but past November 1st
          return false;

      else if ((month == 10) && (date == 1)) { //current date is November 1st
          if (hour < 1) //hour is less than 2 AM
              return true; //since DST has not ended yet, even though it is the end date

          else if ((hour == 1) || (hour > 1)) //hour is 2 AM or later
              return false; //since DST just ended
      }
      
      else if (month < 10) {
          if ((month == 2) && (date < 8)) //month is March but its not the 8th yet
              return false;

          else if ((month == 2) && (date == 8))
              if (hour < 1) //hour is less than 2 AM
                  return false;

          return true; //in all other cases
      }
  }

  else {
      return false;
  }

  return false;

}

function getLastDayOfMonth2011Through2015(year, month) {

  var last_day_of_month = 0;
  switch (year) {
     case 2011:
         switch (month) {
            case 0: //January
                last_day_of_month = 31;
                return last_day_of_month;

            case 1: //February
                last_day_of_month = 28;
                return last_day_of_month;

            case 2: //March
                last_day_of_month = 31;
                 return last_day_of_month;

            case 3: //April
                last_day_of_month = 30;
                return last_day_of_month;

            case 4: //May
                last_day_of_month = 31;
                return last_day_of_month;

            case 5: //June 
                last_day_of_month = 30;
                return last_day_of_month;

            case 6: //July
                last_day_of_month = 31;
                return last_day_of_month;

            case 7: //August
                last_day_of_month = 31;
                return last_day_of_month;

            case 8: //September
                last_day_of_month = 30;
                return last_day_of_month;

            case 9: //October
                last_day_of_month = 31;
                return last_day_of_month;

            case 10: //November
                last_day_of_month = 30;
                return last_day_of_month;

            case 11: //December
                last_day_of_month = 31;
                return last_day_of_month;

            default:
                return last_day_of_month; //as 0

         }
     
     case 2012:
         switch (month) {
            case 0: //January
                last_day_of_month = 31;
                return last_day_of_month;

            case 1: //February
                last_day_of_month = 29;
                return last_day_of_month;

            case 2: //March
                last_day_of_month = 31;
                 return last_day_of_month;

            case 3: //April
                last_day_of_month = 30;
                return last_day_of_month;

            case 4: //May
                last_day_of_month = 31;
                return last_day_of_month;

            case 5: //June 
                last_day_of_month = 30;
                return last_day_of_month;

            case 6: //July
                last_day_of_month = 31;
                return last_day_of_month;

            case 7: //August
                last_day_of_month = 31;
                return last_day_of_month;

            case 8: //September
                last_day_of_month = 30;
                return last_day_of_month;

            case 9: //October
                last_day_of_month = 31;
                return last_day_of_month;

            case 10: //November
                last_day_of_month = 30;
                return last_day_of_month;

            case 11: //December
                last_day_of_month = 31;
                return last_day_of_month;

            default:
                return last_day_of_month; //as 0

         }
    
     case 2013:
         switch (month) {
            case 0: //January
                last_day_of_month = 31;
                return last_day_of_month;

            case 1: //February
                last_day_of_month = 28;
                return last_day_of_month;

            case 2: //March
                last_day_of_month = 31;
                 return last_day_of_month;

            case 3: //April
                last_day_of_month = 30;
                return last_day_of_month;

            case 4: //May
                last_day_of_month = 31;
                return last_day_of_month;

            case 5: //June 
                last_day_of_month = 30;
                return last_day_of_month;

            case 6: //July
                last_day_of_month = 31;
                return last_day_of_month;

            case 7: //August
                last_day_of_month = 31;
                return last_day_of_month;

            case 8: //September
                last_day_of_month = 30;
                return last_day_of_month;

            case 9: //October
                last_day_of_month = 31;
                return last_day_of_month;

            case 10: //November
                last_day_of_month = 30;
                return last_day_of_month;

            case 11: //December
                last_day_of_month = 31;
                return last_day_of_month;

            default:
                return last_day_of_month; //as 0

         }
   
     case 2014:
         switch (month) {
            case 0: //January
                last_day_of_month = 31;
                return last_day_of_month;

            case 1: //February
                last_day_of_month = 28;
                return last_day_of_month;

            case 2: //March
                last_day_of_month = 31;
                 return last_day_of_month;

            case 3: //April
                last_day_of_month = 30;
                return last_day_of_month;

            case 4: //May
                last_day_of_month = 31;
                return last_day_of_month;

            case 5: //June 
                last_day_of_month = 30;
                return last_day_of_month;

            case 6: //July
                last_day_of_month = 31;
                return last_day_of_month;

            case 7: //August
                last_day_of_month = 31;
                return last_day_of_month;

            case 8: //September
                last_day_of_month = 30;
                return last_day_of_month;

            case 9: //October
                last_day_of_month = 31;
                return last_day_of_month;

            case 10: //November
                last_day_of_month = 30;
                return last_day_of_month;

            case 11: //December
                last_day_of_month = 31;
                return last_day_of_month;

            default:
                return last_day_of_month; //as 0

         }

     case 2015:
         switch (month) {
            case 0: //January
                last_day_of_month = 31;
                return last_day_of_month;

            case 1: //February
                last_day_of_month = 28;
                return last_day_of_month;

            case 2: //March
                last_day_of_month = 31;
                 return last_day_of_month;

            case 3: //April
                last_day_of_month = 30;
                return last_day_of_month;

            case 4: //May
                last_day_of_month = 31;
                return last_day_of_month;

            case 5: //June 
                last_day_of_month = 30;
                return last_day_of_month;

            case 6: //July
                last_day_of_month = 31;
                return last_day_of_month;

            case 7: //August
                last_day_of_month = 31;
                return last_day_of_month;

            case 8: //September
                last_day_of_month = 30;
                return last_day_of_month;

            case 9: //October
                last_day_of_month = 31;
                return last_day_of_month;

            case 10: //November
                last_day_of_month = 30;
                return last_day_of_month;

            case 11: //December
                last_day_of_month = 31;
                return last_day_of_month;

            default:
                return last_day_of_month; //as 0

         }

     default:
         return last_day_of_month; //as 0
  }

}
//-->
