var head;
var heads = new Array();
var ind = 0;
var total = 0;

function processHeads(){ 
	if (holiday != "") {
		var divHoliday = document.getElementById('holiday');
		divHoliday.style.marginTop='-20px';
		divHoliday.style.height='105px';
		divHoliday.style.visibility='visible';
//		divHoliday.innerHTML = "<img src=\"pictures/ribbon.jpg\">";	
		heads[total++]="<span class=\"blue\">Happy "+holiday+" Day!<\span>";
	}
	
	var divTitle = document.getElementById('title');
	var chs = divTitle.childNodes;
	for (var i = 0; i < chs.length;i++) {
		if (chs[i].nodeType == 1) {
			heads[total++] = chs[i].innerHTML;
			if (chs[i].className == 'theHead') 
				head = chs[i];
		}
	}
	head.innerHTML = heads[0];
    if (total == 0)
	  return;
    setInterval("rotateHead()", 10000);
}	
function rotateHead(){
	ind = (ind+1) % total;
	head.innerHTML = heads[ind];
}
window.onload= processHeads;
