		var maxfutureheaders = 20;
		var maxsizerows = 20;
		function nextfuturedate() {
			var id = ""; var loop = 0; var totalrows = getTotalFutureRows(); var totalheaders = getTotalFutureheaders();
			var lowestshownheader = getLowestFutureShownHeader();
			var highestshownheader = getHighestFutureShownHeader();
			//ignore this call if there are no higher headers
			id = "fut_head_" + (highestshownheader + 1);
			if(document.getElementById(id)) {				
				//hide the lowest col
				id = "fut_head_" + lowestshownheader;
				document.getElementById(id).style.display = "none";
				while(loop++<(totalrows)) {
					id = "fut_" + loop + "_" + lowestshownheader;
					document.getElementById(id).style.display = "none";
				}
				//show the next highest col
				id = "fut_head_" + (highestshownheader + 1);
				document.getElementById(id).style.display = "";
				loop = 0;
				while(loop++<(totalrows)) {
					id = "fut_" + loop + "_" + (highestshownheader + 1);
					document.getElementById(id).style.display = "";
				}
				if((highestshownheader+1)==totalheaders) {
					document.getElementById("ftdnext").style.display = "none";
				}
				document.getElementById("ftdprev").style.display = "";
			}
		}
		function prevfuturedate() {
			var id = ""; var loop = 0; var totalrows = getTotalFutureRows();
			var lowestshownheader = getLowestFutureShownHeader();
			var highestshownheader = getHighestFutureShownHeader();
			//ignore this call if there are no lower headers
			id = "fut_head_" + (lowestshownheader - 1);
			if (document.getElementById(id)) {
				//hide the highest col
				id = "fut_head_" + highestshownheader;
				document.getElementById(id).style.display = "none";
				while(loop++<(totalrows)) {
					id = "fut_" + loop + "_" + highestshownheader;
					document.getElementById(id).style.display = "none";
				}
				//show the next lowest col
				id = "fut_head_" + (lowestshownheader - 1);
				document.getElementById(id).style.display = "";
				loop = 0;
				while(loop++<(totalrows)) {
					id = "fut_" + loop + "_" + (lowestshownheader - 1);
					document.getElementById(id).style.display = "";
				}
				if((lowestshownheader-1)==1) {
					document.getElementById("ftdprev").style.display = "none";
				}
				document.getElementById("ftdnext").style.display = "";
			}
		}
		function getTotalFutureheaders() {
			var id = ""; var ret = 0; var i = 0;
			while(i++<(maxfutureheaders+1)) {
				id = "fut_head_" + i;
				if(document.getElementById(id)) {
					ret = i;
				} else {
					return ret;
				}
			}
			return ret;
		}
		function getTotalFutureRows() {
			var id = ""; var ret = 0; var i = 0;
			while(i++<(maxsizerows+1)) {
				id = "fut_" + i + "_1";
				if(document.getElementById(id)) {
					ret = i;
				} else {
					return ret;
				}
			}
			return ret;
		}
		function getLowestFutureShownHeader() {
			var totalheaders = getTotalFutureheaders(); var id = ""; var i = 0;
			while(i++<(totalheaders+1)) {
				id = "fut_head_" + i;
				if(document.getElementById(id)) {
					if(document.getElementById(id).style.display=="") return i;
				} else {
					return id;
				}
			}
			return id;
		}
		function getHighestFutureShownHeader() {
			var totalheaders = getTotalFutureheaders(); var id = ""; var i = 0;
			var ret = "";
			while(i++<(totalheaders+1)) {
				id = "fut_head_" + i;
				if(document.getElementById(id)) {
					if(document.getElementById(id).style.display=="") {
						ret = i;
					}
				} else {
					return ret;
				}
			}
			return ret;
		}

