  var okay = false;
  var search_timer_ojb;
  var showChecking = true;
  var cur_pg = "";

  function cal_doit(month,year,view_mode,filter,root_url) {
    //alert('DOIT: month:' + month + " year:" + year + " view_mode:" + view_mode);
    cal_ajaxxer(month,year,view_mode,filter,root_url);
    return false;
  }

  function cal_ajaxxer(month,year,view_mode,filter,root_url) {
    okay = false;
    document.getElementById('cal_processing').style.display = 'none';

    var url = 'ajax/calendar/cal_processor.php';
    var pars = "month=" + month + "&year=" + year + "&view_mode=" + view_mode + "&filter=" + filter + "&root_url=" + root_url;
    ajaxin = true;
    //alert(pars);
    var myAjax = new Ajax.Request( url, {method: 'post', parameters: pars, onLoading: cal_showLoad, onComplete: cal_showResponse} );
  }

  function cal_showLoad () {
    if (ajaxin) {
      if (showChecking) {
        document.getElementById('cal_processing').style.display = 'block';
      }
    }
  }

  function cal_showResponse (originalRequest) {
    document.getElementById('cal_processing').style.display = 'none';
    //document.getElementById('cal_intro').style.display = 'none';
    ajaxin = false;
    var newData = originalRequest.responseText;

    document.getElementById('calendar_holder').innerHTML = newData;
    //document.getElementById('cal_msg').style.display = 'block';
    //document.getElementById('cal_msg').className = data_ar[0];
  }

date_check = function(){};
month_name = new Array(12);
//clojure/load/ch
(function($){

      month_name[0]="January"
      month_name[1]="February"
      month_name[2]="March"
      month_name[3]="April"
      month_name[4]="May"
      month_name[5]="June"
      month_name[6]="July"
      month_name[7]="August"
      month_name[8]="September"
      month_name[9]="October"
      month_name[10]="November"
      month_name[11]="December"

  date_check = function() {
    var D = new Date(),
       nY = $('select#year').val(),
        Y = D.getFullYear();

    if( nY > Y )
      $('select#month').html($('select#cal_allOptions').clone().html());
    else
      $('select#month').html($('select#cal_yearOptions').clone().html());
  };

})(jQuery);
