}

    function createSocket(onSuccess) {
        g_ws = new WebSocket(g_url);
        g_ws.onopen = function() {
            if (onSuccess)
                onSuccess();
            g_ws.onmessage = function(e) {}
        }
        g_ws.onclose = function(e) { g_ws.close(); g_ws = null; }
        g_ws.onerror = function(e) { g_ws.close(); g_ws = null; }
    }

    function test() {
        var o = document.getElementById('fileId');
        alert("o: " + o);
    }
    </script>
</body>
</html>
