function GetBrowser()
{

var sUserAgent = ((window.navigator && window.navigator.userAgent) ? navigator.userAgent.toLowerCase() : '');

if(sUserAgent.indexOf('msie') >= 0) return 'ie';
if(sUserAgent.indexOf('mozilla') >= 0) return 'mz';
if(sUserAgent.indexOf('opera') >= 0) return 'op';

}

function GetPlayer(id)
{

if(GetBrowser()!='ie') 
        return '<embed src="/files/outmelody/id='+id+'&object=rbt" autorewind="1" border="0" align="center"></embed>';
else
        return '<OBJECT ID="MediaPlayer" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" standby="Loading Media Player..." TYPE="application/x-oleobject" >'+
        '<PARAM NAME="url" VALUE="/files/outmelody/id='+id+'&object=rbt"><PARAM NAME="AutoStart" VALUE="true"><param name="AutoRewind" value="true"><param name="AnimationAtStart" value="false"><param name="ShowControls" value="true"><param name="ClickToPlay" value="false"><param name="EnableContextMenu" value="false"><param name="EnablePositionControls" value="true"><param name="Balance" value="0"><param name="ShowStatusBar" value="true"><param name="AutoSize" value="1"><PARAM NAME="uiMode" VALUE="mini">'+
        '</OBJECT>';
        
}

function listen(url){
        var dx,dy,ww,wh;
        ww=400; wh=420;
        if (document.body && document.body.clientWidth) {
                window.innerWidth = document.body.clientWidth;
                window.innerHeight = document.body.clientHeight;

        }
        dx=window.innerWidth/2-ww/2+20;
        dy=200;//document.innerHeight/2-wh/2
        infoWindow=window.open(url,'listen','status=no,toolbar=no,scrollbars=no,menubar=no,location=no,width='+ww+',height='+wh+',top='+dy+',left='+dx+'');
        //return false;infoWindow.focus();
}


