// JavaScript Document
function getPageObject(sObjID) {
	if (document.all)
		return document.all[sObjID]
	else
		return document.getElementById(sObjID)
}

var mydate= new Date(); 
var sGMT = mydate.toGMTString();

var theyear=mydate.getUTCFullYear();
var themonth=mydate.getUTCMonth();
var thetoday=mydate.getUTCDate();
var theday=mydate.getUTCDay();

var month = new Array("01","02","03","04","05","06","07","08","09","10","11","12");
var month_s = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var day = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
var weekday_s = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");

var date = "";
var date_s ="";


var cid = getPageObject("cid");
for (var i=1; i<22; i++) {
	var mydate= new Date(theyear,themonth,thetoday+i);

	theyear1=mydate.getFullYear();
	themonth1=mydate.getMonth();
	thetoday1=mydate.getDate();
	theday1=mydate.getDay();
	
	date = theyear1+"-"+month[themonth1]+"-"+day[thetoday1]; 
	date_s =day[thetoday1]+" "+month_s[themonth1]+" "+theyear1+" ("+weekday_s[theday1]+")";	

	cid.options[i-1] = new Option(date_s,date,false);
}

var cod = getPageObject("cod");
for (var i=2; i<23; i++) {
	var mydate= new Date(theyear,themonth,thetoday+i);

	theyear1=mydate.getFullYear();
	themonth1=mydate.getMonth();
	thetoday1=mydate.getDate();
	theday1=mydate.getDay();
	
	date = theyear1+"-"+month[themonth1]+"-"+day[thetoday1];
	date_s =day[thetoday1]+" "+month_s[themonth1]+" "+theyear1+" ("+weekday_s[theday1]+")";	

	cod.options[i-2] = new Option(date_s,date,false);
}