var str = 'pippo_10-09-2006.pdf';
str = str.substr(0,str.lastIndexOf("."));
alert(str);