
function newWin(thisurl, name, width, height, options)
{
	if (options == null || options == '') {
		options = "scrollbars=1";
	}

	window.open(thisurl, name,"height=" + height + ",width=" + width + ",top=60,left=60," + options);
}

RealPlayer = function(){
  this.clientType = "rp";
  this.clientDetected = "0";
  this.clientVersion = "Version Unknown";
  this.clientDetect();
};

RealPlayer.prototype.clientDetect = function(){
  try{
    player = new ActiveXObject("rmocx.RealPlayer G2 Control.1");
    switch(player.GetVersionInfo().substr(0,2))
    {
      case "12":
        this.clientVersion = "RPSP";
        this.clientDetected = "1";
        break;
      case "11":
        this.clientVersion = "RP11";
        this.clientDetected = "1";
        break;
      case "6.":
        //RP 10.5 and previous versions since 6 are different only based on minor revision number so we check that.
        if(parseInt(player.GetVersionInfo().substr(7,4)) >= 1016)
          this.clientVersion = "RP10.5";
        else
          this.clientVersion = "PRE10.5";
        this.clientDetected = "1";
        break;
      default:
        this.clientVersion = "PRE10.5";
        this.clientDetected = "1";
        break;
    }
  }catch(e){
    try{
      player = navigator.plugins['RealPlayer Version Plugin'];
      if(player != null && player != "")
      {
        this.clientDetected = "1";
        this.clientVersion = "Version Unknown";
      }
      player = navigator.plugins['RealPlayer Plugin.plugin'];
      if(player != null && player != "")
      {
        this.clientDetected = "1";
        this.clientVersion = "Version Unknown";
      }
      player = navigator.plugins['RealPlayer Plugin'];
      if(player != null && player != ""){
        this.clientDetected = "1";
        this.clientVersion = "Version Unknown";
      }
      player = navigator.plugins['Helix DNA Plugin: RealPlayer G2 Plug-In Compatible'];
      if(player != null && player != ""){
        this.clientDetected = "2";
        this.clientVersion = "Version Unknown";
      }
      if(isObject(navigator.mimeTypes) && isObject(navigator.mimeTypes["audio/x-pn-realaudio-plugin"]))
      {
        this.clientDetected = "1";
        this.clientVersion = "Version Unknown";
      }
    } catch (e){

    }
  }
};