/*REMOVE

var holiday_http = getHTTPObject();
var holiday_url = "/ajax/holiday_list.php?country=";

function getHolidays(obj) {

  var country = document.getElementById(obj.name).value;
  holiday_http.open("GET", holiday_url + country, true);
  holiday_http.onreadystatechange = handleHttpHoliday;
  holiday_http.send(null);
}

function handleHttpHoliday() {
        if (holiday_http.readyState == 4) {
                if (holiday_http.responseText.indexOf('invalid') == -1) {
                        results = holiday_http.responseText;
                        if (results != "") {
                                document.getElementById('holiday_select').innerHTML = results;
//alert(results);
                        }
                }
        }
}

function holiday_period_switch(period){
  if(period=="weekly"){
    if(document.getElementById('weekend_span')){
      document.getElementById('weekend_span').style.display="none";
    }
    document.getElementById('graph_var').innerHTML="\
      <input type='radio' name='data_var' value='temp' onclick=\"holiday_weekly_variable_switch('temp');\" checked>Temp&nbsp;&nbsp;&nbsp;\
      <input type='radio' name='data_var' value='prcp' onclick=\"holiday_weekly_variable_switch('prcp');\">Precip\
    ";
  }else{
    if(document.getElementById('weekend_span')){
    document.getElementById('weekend_span').style.display="";
    }
    document.getElementById('graph_var').innerHTML="<input type='radio' name='data_var' value='temp' checked>Temp&nbsp;&nbsp;&nbsp;";
  }
}

function holiday_weekly_variable_switch(variable){
  if(variable=="prcp"){
    document.getElementById('temp_overlay_span').innerHTML="&nbsp; ";
  }else{
    document.getElementById('temp_overlay_span').innerHTML="\
      <input type='checkbox' id='maxTemp'>Max Temp <br />\
      <input type='checkbox' id='minTemp'>Min Temp <br />\
      <input type='checkbox' id='avgTemp'>Avg Temp <br />\
    ";
  }
}
*/


function getHolidays(object){
	holidayURL="/ajax/holiday_list.php?country=";
	//Make sure the object exists
	if(document.getElementById(object.id) && document.getElementById(object.id).value){
		var country = document.getElementById(object.id).value;
		holidayURL+=country;
		holidayURL=encodeURI(holidayURL);
		console.log("FETCHING URL="+holidayURL+" FOR COUNTRY="+country);
		replaceDynamicContent('holiday_select',holidayURL);
	}
	else{
		//Invalid
		alert("Element does not exist");
		return;
	}
	
	return;
	
	
}