var disp = 7;          
var imgn = 'new.gif';  // image filename
var imgw = 40;         // image width
var imgh = 20;         // image height


function newCheck(y,m,d) {var after = new Date(); after.setDate(after.getDate() - disp); var nc = new Date(); nc.setFullYear(y); nc.setMonth(m-1); nc.setDate(d); if (nc.valueOf() >= after.valueOf()) {document.write('<img src="'+imgn+'" width="'+imgw+'" height="'+imgh+'"alt="new" \/>');}}
                    