function Browser() {
        var ua, s, i;
//        this.isSA                = false;        // Safari Browser
        this.isIE                = false;        // Internet Explorer
//        this.isOP                = false;        // Opera
//        this.isNS                = false;        // Netscape
        this.version = null;
        ua = navigator.userAgent;
        s = "MSIE";
        if ((i = ua.indexOf(s))) {
                this.isIE = true;
                this.version = parseFloat(ua.substr(i + s.length));
                return;
        }
}

var browser = new Browser();

function Popup(sURL, sName, sParameters)
{
        var hWindow = window.open(sURL, sName, sParameters);

        if (hWindow != null)
        {
                try
                {
                        hWindow.focus();
                }
                catch (e)
                {

                }
        }
}
function OpenAudio (sUrl)
{
        var w = 200;
        var h = 250;
        var l = eval((screen.width - w) - 20);
        var t = eval(20);
        Popup("/play_audio.php?fl="+sUrl+"&lang=ru","mp3","left="+l+",top="+t+",width="+w+",height="+h+",menubar=no,scrollbars=no")
}

function MoveToPage(page)
{
        parent.location.href = page;
        window.close();
}

// change the named image
function change(img, ref) {
   if (browser.isIE == true) {
       document.images[img].src = ref;
   }
}