home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 36 / CDE36_B / CDE36_B.mdf / Hearts / wthearts.exe / hearts / scripts / suite.js < prev   
Encoding:
JavaScript  |  2000-03-24  |  873 b   |  32 lines

  1. /**
  2.  * setup(): INIT FUNCTION: called when the page loads:
  3.  */
  4. function setup(aceIsHigh)
  5. {
  6.     if ( StartStage( document.game, document.scene ) )
  7.         updateSettings( aceIsHigh == true );
  8. }
  9.  
  10. function updateSettings( aceIsHigh )
  11. {
  12.     aceIsHigh = aceIsHigh == true;
  13.     var applet = document.game == null ? opener ? opener.document.game : null : document.game;
  14.     if ( applet != null ) {
  15.         applet.setAnimation    ( GetCookie("animate") );
  16.         applet.setTextures    ( GetCookie("textures") );
  17.         applet.setAudio        ( GetCookie("audio") );
  18.         applet.setCheat        ( GetCookie("cheat") );
  19.         applet.setSkill        ( GetCookie("skill") );
  20.         applet.setThink        ( GetCookie("think") );
  21.         applet.setFirst        ( GetCookie("first") );
  22.         applet.setSort        ( GetCookie("sort"), aceIsHigh );
  23.     }
  24. }
  25. function loadPage( url, name, options )
  26. {
  27.     if ( !options )
  28.         window.open( url, name );
  29.     else
  30.         window.open( url, name, options );
  31. }
  32.