function setdateDropList(objId, sfromdate, stodate){
var obj = document.getElementById(objId);
var length = obj.options.length;
for(var i = length; i = 0; i--){
obj.options.remove(i);
}
var sdate = sfromdate;
while(sdate!=stodate){
obj.options.add(new Option(sdate, sdate));
var date = new Date(sdate);
date.setDate(date.getDate()+1);
smonth = date.getMonth()+1;
if(smonth<10) smonth = "0"+smonth;
sday = date.getDate();
if(sday<10) sday = "0"+sday;
sdate = date.getFullYear() +"-" +smonth+"-" + sday;
}
obj.options.add(new Option(stodate, stodate));
}
var obj = document.getElementById(objId);
var length = obj.options.length;
for(var i = length; i = 0; i--){
obj.options.remove(i);
}
var sdate = sfromdate;
while(sdate!=stodate){
obj.options.add(new Option(sdate, sdate));
var date = new Date(sdate);
date.setDate(date.getDate()+1);
smonth = date.getMonth()+1;
if(smonth<10) smonth = "0"+smonth;
sday = date.getDate();
if(sday<10) sday = "0"+sday;
sdate = date.getFullYear() +"-" +smonth+"-" + sday;
}
obj.options.add(new Option(stodate, stodate));
}