/* manual control */
function showContent(showThis) { 
	document.getElementById(showThis).style.display = "block";
}
function hideContent(hideThis) {
	document.getElementById(hideThis).style.display = "none"; 
}
function swapContent(hideThis,showThis) { 
	document.getElementById(hideThis).style.display = "none"; 
	document.getElementById(showThis).style.display = "block";
}


/* date controls */
var dd = new Date();
var YYYY = dd.getFullYear();
var MM = (String(dd.getMonth()+1).length==2)?(dd.getMonth()+1):'0'+(dd.getMonth()+1);
var DD = (String(dd.getDate()).length==2)?dd.getDate():'0'+dd.getDate();
var YYYYMMDD = parseInt(YYYY + '' + MM + '' + DD);

function displayUntil(transitionDate, theDiv){
	if(YYYYMMDD <= transitionDate) {
		showContent(theDiv);
	} else {
		hideContent(theDiv);
	}
}
function displayStarting(transitionDate, theDiv){
	if(YYYYMMDD >= transitionDate) {
		showContent(theDiv);
	} else {
		hideContent(theDiv);
	}
}
function swapStarting(transitionDate,first,second) { 
	if(YYYYMMDD >= transitionDate) {
		swapContent(first, second);
	}
}