//javascript function to open url in same window
// new window, or background window
    function openWin(url, opt) {
        if (opt == 0) {
            // current window
            window.location = url;
        }
        else if (opt == 1) {
            // new window
            window.open(url);
        }
        else if (opt == 2) {
            // background window
            window.open(url);
            self.focus();
        }
    }