serverframe4.html

    <head><title>serverframe4.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)
        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)
        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")

    </script>
    </body>