home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2003 October / cmycha200310.iso / NHL2004 / NHL2004Demo.exe / fe / COMMON / js / NHL_Stats_Base.js < prev    next >
Text File  |  2003-08-20  |  2KB  |  82 lines

  1. function NHL_Stats_Base()
  2. {
  3.     if( !(this instanceof NHL_Stats_Base)) return new NHL_Stats_Base( );
  4.     var protect        = this.createProtection(JAX_Object);
  5.     protect.gamePoints            = "";
  6.     protect.otWins                = "";
  7.     protect.otLosses            = "";
  8.     protect.draws                = "";
  9. };
  10. NHL_Stats_Base.prototype                        = new JAX_Object;
  11. NHL_Stats_Base.prototype.getGamePoints                = function()
  12. {
  13.     try {
  14.         var protect        = this.getProtection(NHL_Stats_Base);
  15.         return protect.gamePoints;
  16.     } catch (e) {
  17.         return -1;
  18.     };
  19. };
  20. NHL_Stats_Base.prototype.getOT_Wins                = function()
  21. {
  22.     try {
  23.         var protect        = this.getProtection(NHL_Stats_Base);
  24.         return protect.otWins;
  25.     } catch (e) {
  26.         return -1;
  27.     };
  28. };
  29. NHL_Stats_Base.prototype.getOT_Losses                = function()
  30. {
  31.     try {
  32.         var protect        = this.getProtection(NHL_Stats_Base);
  33.         return protect.otLosses;
  34.     } catch (e) {
  35.         return -1;
  36.     };
  37. };
  38. NHL_Stats_Base.prototype.getDraws                = function()
  39. {
  40.     try {
  41.         var protect        = this.getProtection(NHL_Stats_Base);
  42.         return protect.draws;
  43.     } catch (e) {
  44.         return -1;
  45.     };
  46. };
  47. NHL_Stats_Base.prototype.setGamePoints            = function(gamePoints)
  48. {
  49.     var protect        = this.getProtection(NHL_Stats_Base);
  50.     if ( !(isNaN(parseInt(gamePoints))) )     {
  51.         protect.gamePoints        = gamePoints;
  52.     } else {
  53.         protect.gamePoints        = 0;
  54.     };
  55. };
  56. NHL_Stats_Base.prototype.setOT_Wins            = function(winCount)
  57. {
  58.     var protect        = this.getProtection(NHL_Stats_Base);
  59.     if ( !(isNaN(parseInt(winCount))) )     {
  60.         protect.otWins        = winCount;
  61.     } else {
  62.         protect.otWins        = 0;
  63.     };
  64. };
  65. NHL_Stats_Base.prototype.setOT_Losses            = function(lossCount)
  66. {
  67.     var protect        = this.getProtection(NHL_Stats_Base);
  68.     if ( !(isNaN(parseInt(lossCount))) )     {
  69.         protect.otLosses    = lossCount;
  70.     } else {
  71.         protect.otLosses    = 0;
  72.     };
  73. };
  74. NHL_Stats_Base.prototype.setDraws                = function(drawCount)
  75. {
  76.     var protect        = this.getProtection(NHL_Stats_Base);
  77.     if ( !(isNaN(parseInt(drawCount))) )     {
  78.         protect.draws        = drawCount;
  79.     } else {
  80.         protect.draws        = 0;
  81.     };
  82. };