/***************************************************************\
| |\  /|                                                We Put  |
| | >< Hypercosm         javascript_utils.js            3d      |
| |/  \|                                                To Work |
|***************************************************************|
|                                                               |
|        This file contains some generalized javascript         |
|        utilities that add basic features to the language.     |
|                                                               |
|***************************************************************|
|                Copyright (c) 2008 Hypercosm, LLC.             |
\***************************************************************/


function isDefined(variable) {
  return eval('(typeof(' + variable + ') != "undefined");');
}    // isDefined


// This function binds a method to a particular
// object for executing at a later time
//
function getClosure(objectName, methodName, parameters) {
  function execute() {
    objectName[methodName](parameters);
  }
  return execute;
}    // getClosure
