<!--
// - SCRIPT to generate date for tide table URL
//	original purpose has been modified to use the following 
//	parms: (assume today is 20061214)
//		CCYY - returns rv = 2006 
//		  YY - returns rv = 06, or 07 if MMDD is > 1215
//		  MM - returns rv = dec 
//		blank - returns rv = 20061214
function today(dparm)
{
var months = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
var now,rv;
now = new Date();
switch(dparm)
{
	case 'CCYY':
		var rv=now.getFullYear()
		break
	case 'YY':	
		if (now.getMonth() == 11 && now.getDate() > 15) { 
			var ccyy=now.getFullYear() + 1
			var rv=ccyy.toString().substr(2) 
			}
		else	{ 
			var rv=now.getFullYear().toString().substr(2) 
			}
		break
	case 'MM':
		var rv=months.slice(now.getMonth(), now.getMonth()+1)
		break
	default:
		var rv = now.getFullYear() + 
			((now.getMonth() < 9) ? "0" : "") + (now.getMonth()+1) +  
			((now.getDate() < 10) ? "0" : "") + now.getDate();
}
return rv;
}
// -->