diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 69240d1e45..41edef870c 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -719,7 +719,7 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position, //set generic properties if (!id) { - id = "OpenLayersDiv" + (Math.random() * 10000 % 10000); + id = "OpenLayersDiv" + Math.round(Math.random() * 10000); } if (!position) { position = "absolute"; @@ -754,7 +754,7 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border) { //set generic properties if (!id) { - id = "OpenLayersDiv" + (Math.random() * 10000 % 10000); + id = "OpenLayersDiv" + Math.round(Math.random() * 10000); } if (!position) { position = "relative";