home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 July / PCpro_2004_07.ISO / docs / maxblast / maxblast3_files / thing_002.js < prev    next >
Encoding:
Text File  |  2004-03-07  |  1.6 KB  |  59 lines

  1. var JS_PATH = "http://www.maxtor.com/en/scripts/thing/";
  2. var USE_THING_THING = true;
  3. var USE_THING_FLIP = true;
  4. window.hasScripts = true;
  5.  
  6. /********************************************************************************
  7.  
  8.     use files
  9.  
  10. ********************************************************************************/
  11. function use( what ){
  12.     what = what.toLowerCase();
  13.     if( ! usedFiles[what] )
  14.         document.write( '<script language="javascript" src="' + JS_PATH + what + '.js"></script>\n' );
  15.  
  16.     usedFiles[ what ] = true;
  17. }
  18. var usedFiles = new Array();
  19. use( "thing.browser" );
  20. if( USE_THING_THING ) {use( "thing.point" ); use( "thing.thing" );}
  21. if( USE_THING_FLIP ) use( "thing.flip" );
  22.  
  23.  
  24. /********************************************************************************
  25.  
  26.     init
  27.  
  28. ********************************************************************************/
  29. function init(fcn){
  30.     if( ! window.initFunctions )
  31.         window.initFunctions = new Array();
  32.     if( typeof(fcn) == "string")
  33.         window.initFunctions[ window.initFunctions.length ] = fcn;
  34.     else
  35.         for( var i=0; i<window.initFunctions.length; i++ ){
  36.             eval(window.initFunctions[i]);
  37.         }
  38. }
  39. onload=init;
  40.  
  41. /********************************************************************************
  42.  
  43.     debug info
  44.  
  45. ********************************************************************************/
  46. function puke( it, showValues, showEmpty ){
  47.     var s = '';
  48.     for( var i in it ){
  49.         if( typeof(it[i]) != 'function' )
  50.             if( showEmpty || it[i] ){
  51.                 s += '\n' + i + ' ';
  52.                 if( showValues ) s += it[i];
  53.             }
  54.     }
  55.     alert(s);
  56. }
  57.  
  58.  
  59.