This is the function that i want to activate using shell script (this is a portion of the .js file..there are other functions..not related). This code is in select.js file
...
......
function generateReport(typeReport){
Months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"

;
today = new Date();
month = Months[today.getMonth()];
nday = today.getDate();
year = today.getFullYear();
sday = today.getDate()-6;
if (sday < 1) {
if ((month == 'Mar')||(month == 'May')||(month == 'Jul')||(month == 'Oct')||(month == 'Dec')){
stday = 30 + sday;
}else{
stday = 31 + sday;
}
smonth = Months[today.getMonth()-1];
}else{
stday = sday;
smonth = month;
}
startPeriod = smonth+" "+stday+" "+year;
endPeriod = month+" "+nday+" "+year;
cgiCall = '/servlet/MReport?option=EReport&type=Excel';
cgiCall += '&trend=Daily';
cgiCall += '&startPeriod=' + toCgiFormat(startPeriod);
cgiCall += '&endPeriod=' + toCgiFormat(endPeriod);
cgiCall += '&saveToFile=true';
cgiCall += '&name=Summ';
openExcel(cgiCall,this.window.name);
}
....
...