dovrebbe andare con

codice:
setTimeout("document.getElementById('"+div+"').style.display = 'none'", 500);
ciao