function activiteObj()
{/*
   objects = document.getElementsByTagName("object");
   for (var i = 0; i < objects.length; i++)
   {
       objects[i].outerHTML= objects[i].outerHTML;
   }*/
}

/*
 * Arguments: None
 * Return: Boolean
 *
 * uses html element 'conf_apt_frm_obj'
 * Checks to see if today lies in a left and right bound
 *  - left_bound = apt - 1 day @ 00:00:00
 *  - right_bound = apt day @ 00:00:00
 */
function conf_apt_time_check()
{
   var today = new Date();
   var apt = new Date();
   var left_bound;
   var right_bound;
   var conf_apt_frm_obj = document.getElementById("conf_apt_frm");
   var apt_hour = parseInt(conf_apt_frm_obj.date_hour.value);

   if( !conf_apt_frm_obj.date_ampm.value.search("PM") )
   {
      apt_hour += 12;
   }

   apt.setFullYear(conf_apt_frm_obj.date_year.value,conf_apt_frm_obj.date_month.value,conf_apt_frm_obj.date_day.value);
   apt.setHours(apt_hour,conf_apt_frm_obj.date_min.value);

   left_bound = new Date(apt);
   left_bound.setDate(left_bound.getDate()-1);
   left_bound.setHours( 0, 0, 0, 0 );

   right_bound = new Date(apt);
   right_bound.setHours( 0, 0, 0, 0 );

   if( today > apt )
   {
      alert("Sorry, we must have gotten out wires crossed! Your appointment time has already passed, please email me so we can get our wires uncrossed!\n\nThank you!\n                       ~Ananda");
      return false;
   }

   if( today > right_bound )
   {
      alert("Sorry, we have missed our email confirmation window. We are too close (later than 12am the day of) to confirm your appointment via email. You may try me by phone to see if your time is still available. If we have already connected via phone i will see you shortly. Otherwise please see the scheduling section of my webpage to set up another appointment!\n\nThank you and see you soon!\n                       ~Ananda");
      return false;
   }
   else if( today < left_bound )
   {
      alert("Hello, I am glad you are so eager to get to your appointment!\nAppointments should be confirmed no earlier than 12am the day prior and no later than midnight of the day prior to the appointment).\n\nThank you!\n                       ~Ananda");
      return false;
   }

   return true;
}

function old_conf_apt_time_check()
{
   var today = new Date();
   var apt = new Date();
   var tmp, tmp2;
   var conf_apt_frm_obj = document.getElementById("conf_apt_frm");
   eval('var apt_hour = '+conf_apt_frm_obj.date_hour.value);

   if( !conf_apt_frm_obj.date_ampm.value.search("PM") )
   {
      apt_hour += 12;
   }

   apt.setFullYear(conf_apt_frm_obj.date_year.value,conf_apt_frm_obj.date_month.value,conf_apt_frm_obj.date_day.value);
   apt.setHours(apt_hour,conf_apt_frm_obj.date_min.value);

   if( today > apt )
   {
      alert("Sorry, we must have gotten out wires crossed! Your appointment time has already passed, please email me so we can get our wires uncrossed!\n\nThank you!\n                       ~Ananda");
      return false;
   }

   tmp = new Date();
   tmp.setHours(tmp.getHours()+24);
   tmp2 = new Date();
   tmp2.setHours(18,0);

   if(today.getDate() == apt.getDate() && today.getFullYear() == apt.getFullYear())
   {
      tmp = apt;
      tmp.setHours(tmp.getHours()-2);
      tmp2 = new Date();
      tmp2.setHours(10,0);

      if(( today > tmp  ) ||
         ( today > tmp2 ))
      {
         alert("Sorry, we have missed our email confirmation window. We are too close (with in 2 hours) to confirm your appointment via email.\nYou may try me by phone to see if your time is still available. If we have already connected via phone i will see you shortly.\nOtherwise please see the scheduling section of my webpage to set up another appointment!\n\nThank you and see you soon!\n                       ~Ananda");
         return false;
      }
   }
   else if( tmp < apt || today < tmp2 )
   {
      alert("Hello, I am glad you are so eager to get to your appointment!\nAppointments should be confirmed no earlier than 12am the day prior and no later than midnight of the day prior to the appointment).\n\nThank you!\n                       ~Ananda");
      return false;
   }

   return true;
}