function local_date () {

startoffset = 30;
duration = 7;
servertz = -5;
  
theday = new Date ();
theday2 = new Date ();

theyearfirst = document.form1.gciy.options[0].value;
thetz = theday.getTimezoneOffset ();

epoch = theday.getTime () + (24 * 3600 * startoffset + 60 * thetz + 3600 * servertz) * 1000;

theday.setTime (epoch);
thedate = theday.getDate ();
themonth = theday.getMonth () + 1;
theyear = theday.getFullYear ();

theyearoffset = theyear - theyearfirst;

document.form1.gcid.options[thedate].selected = true;
document.form1.gcim.options[themonth].selected = true;
document.form1.gciy.options[theyearoffset].selected = true;

epoch2 = epoch + 24 * 3600 * duration * 1000;

theday2.setTime (epoch2);
thedate2 = theday2.getDate ();
themonth2 = theday2.getMonth () + 1;
theyear2 = theday2.getFullYear ();

theyearoffset2 = theyear2 - theyearfirst;

document.form1.gcod.options[thedate2].selected = true;
document.form1.gcom.options[themonth2].selected = true;
document.form1.gcoy.options[theyearoffset2].selected = true;

}

