// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults




	function changeLocation(date) {

                year = date.getFullYear();

                if (isNaN(year)) {
                  return;
                }

		month = date.getMonth() + 1;
		day = date.getDate();

                today = new Date();
                if ((year==today.getFullYear())&&(month==today.getMonth()+1)&&(day==today.getDate())) {
                  location.href = '/';
                  return;
                }


		if (month < 10) {
			month = "0" + month;
		}
		if (day < 10) {
			day = "0" + day;
		}
                /* TODO: remove hardcoding of path prefix */
		location.href = '/archive/' + year + "/" + month + '/' + day;
	}


function unhide(divID) {
  var item = document.getElementById(divID);
  if (item) {
    item.className=(item.className=='hidden')?'unhidden':'hidden';
  }
}
