//debug.js
//debug functionality
//provides facilities for error logging and transmission
//These functions have a global scope.  Will be converted to an object in the future.
//DEBUG_MODE is a boolean indicating that debugging is enabled.
//DEBUG_TEXT is a string; all current debug information
//DEBUG_TARGET is a pointer to an html element used for display of debugging information
//DEBUG_ADDRESS is a string; email address of the recipient of debug emails


DEBUG_TARGET = null;
dprintf = function(msg)
{
  if(arguments.length>2){
    if(arguments[2]=='logWarning')
      console.warn(msg);
    else
      if(arguments[2]=='logError')
        console.error(msg);
      else
        console.log(msg);
  }
  else
    console.log(msg);
};

