<head><title>transparent.html</title></head> <script src=../window.js></script> <script src=../examples.js></script> <body> <input value="overlay two maps in a window" type=button onclick="submitAll()"> <script> w = new win(50,50,400,400,"overlay window","win.html") function submitAll() { s1.setVar("map_countries_class_color", Math.round(Math.random() * 255) + " " + Math.round(Math.random() * 255) + " " + Math.round(Math.random() * 255) ) s1.setVar("mapsize",w.contentWidth + " " + w.contentHeight) s1.setTarget(w.contentWindow.img1var) sl1.img = w.contentWindow.img1var s1.submit() s2.setVar("map_countries_class_color", Math.round(Math.random() * 255) + " " + Math.round(Math.random() * 255) + " " + Math.round(Math.random() * 255) ) s2.setVar("mapsize",w.contentWidth + " " + w.contentHeight) s2.setTarget(w.contentWindow.img2var) sl2.img = w.contentWindow.img2var s2.submit() } w.setExecOnResize(submitAll) s1 = new serverFrame() s1.setServerURL(MSURL) s1.setVar("map",MSMAP) s1.setVar("mode","map") s1.setVar("map_projection","proj=sinu,ellps=clrk66") s1.setVar("mapext","-20000000 -10000000 20000000 10000000") s2 = new serverFrame() s2.setServerURL(MSURL) s2.setVar("map",MSMAP) s2.setVar("mode","map") s2.setVar("map_projection","proj=gall,ellps=clrk66") s2.setVar("mapext","-20000000 -10000000 20000000 10000000") sl1 = new slider(200,0,100,1,"1") sl1.showAt(500,100) sl2 = new slider(200,0,100,1,"2") sl2.showAt(500,200) function setTransparency(sl) { var img = sl.img var value = sl.getValue() if (ie) { img.filters.alpha.opacity=value } else { value = value / 100 img.style.MozOpacity = value } } sl1.setMoveFunc(setTransparency) sl1.setStopFunc(setTransparency) sl2.setMoveFunc(setTransparency) sl2.setStopFunc(setTransparency) </script> </body>