How to get the div id value
If div has 'runat=server' then the ID can be accessed as:
var divToAccess = document.getElementById("<%=whateverIsDivId.ClientID%>");
If div is a general HTML control without runat=server,
var divToAccess = document.getElementById("whateverIsDivId");