

function updateGame( app ){
   var _container;
   
   if( app == "SkyClimber" ){
      _container=document.getElementById('gameSelect');
      var _cell = _container.rows[2].cells[0];
      _cell.innerHTML="<SELECT NAME=game ONCHANGE=\"javascript:updateLevel( 'SkyClimber', this.options[this.selectedIndex].value );\">"+
                      " <OPTION>Original</OPTION>"+
                      " <OPTION>WorldTraveler</OPTION>"+
                      " <OPTION>Airterial Assault</OPTION>"+
                      "</SELECT>";
      
      //_cell = _container.rows[2].cells[1];
      //_cell.innerHTML="<INPUT TYPE=hidden VALUE=none NAME=level>";      
      _cell = _container.rows[2].cells[1];
      _cell.innerHTML="&nbsp;";
      
      _container = document.getElementById("frmGame");      
      _container.setAttribute("VALUE","Original");
      _container = document.getElementById("frmLevel");      
      _container.setAttribute("VALUE","empty");
   }

   if( (app == "PacMan") || (app == "Pac") || (app == "Pac(Man)") ){
      _container=document.getElementById('gameSelect');
      var _cell = _container.rows[2].cells[0];
      _cell.innerHTML="&nbsp;";
      _cell = _container.rows[2].cells[1];
      _cell.innerHTML="&nbsp;";
      
      _container = document.getElementById("frmGame");      
      _container.setAttribute("VALUE","empty");
      _container = document.getElementById("frmLevel");      
      _container.setAttribute("VALUE","empty");
   }
   
   if( app == "StackUp" ){
      _container=document.getElementById('gameSelect');
      var _cell = _container.rows[2].cells[0];
      _cell.innerHTML="<SELECT NAME=game ONCHANGE=\"javascript:setGameValue( this.options[this.selectedIndex].value );\">"+
                      " <OPTION>Small</OPTION>"+
                      " <OPTION>Large</OPTION>"+
                      "</SELECT>";
      
      _cell = _container.rows[2].cells[1];
      _cell.innerHTML="<SELECT NAME=level ONCHANGE=\"javascript:setLevelValue( this.options[this.selectedIndex].value );\">"+
                      " <OPTION>4</OPTION>"+
                      " <OPTION>5</OPTION>"+
                      " <OPTION>6</OPTION>"+
                      "</SELECT>";   

      _container = document.getElementById("frmGame");      
      _container.setAttribute("VALUE","Small");
      _container = document.getElementById("frmLevel");      
      _container.setAttribute("VALUE","4");
   }
   
}


function updateLevel( app, game ){
   var _container;
   
   if( app == "SkyClimber" ){
      _container=document.getElementById('gameSelect');
      if( game == "Original" ){
         var _cell = _container.rows[2].cells[1];
         _cell.innerHTML="<INPUT TYPE=hidden VALUE=none NAME=level>";  
         
         _container = document.getElementById("frmGame");      
         _container.setAttribute("VALUE","Original");
         _container = document.getElementById("frmLevel");      
         _container.setAttribute("VALUE","empty");
      }
      if( game == "WorldTraveler" ){
         var _cell = _container.rows[2].cells[1];
         _cell.innerHTML="<SELECT NAME=level ONCHANGE=\"javascript:setLevelValue( this.options[this.selectedIndex].value );\">"+
                         " <OPTION>Cloud</OPTION>"+
                         " <OPTION>Ice</OPTION>"+
                         " <OPTION>Space</OPTION>"+
                         " <OPTION>Goo</OPTION>"+
                         "</SELECT>";
                         
         _container = document.getElementById("frmGame");      
         _container.setAttribute("VALUE","WorldTraveler");
         _container = document.getElementById("frmLevel");      
         _container.setAttribute("VALUE","Cloud");
      }
      if( game == "Airterial Assault" ){
         var _cell = _container.rows[2].cells[1];
         _cell.innerHTML="<INPUT TYPE=hidden VALUE=none NAME=level>";  
         
         _container = document.getElementById("frmGame");      
         _container.setAttribute("VALUE","Airterial Assault");
         _container = document.getElementById("frmLevel");      
         _container.setAttribute("VALUE","empty");
      }
   }

}


function setLevelValue( value ){
   var _container = document.getElementById("frmLevel");      
   _container.setAttribute("VALUE",value);
}

function setGameValue( value ){
   var _container = document.getElementById("frmGame");      
   _container.setAttribute("VALUE",value);
}

