
var consoleText="";
var consoleActive=false;

function initConsole(){
  $('logwin').style.left=(sWidth-380)+"px";
  $('logwin').style.top=(sHeight-400)+"px";
  updateConsole();
  consoleActive=true;
}


function updateConsole(){
  if (!consoleActive) return;
  if (typeof $('logout')=='undefined') return;
  $('logout').innerHTML=consoleText;
}

function lerror(errormsg){
  consoleText='<span class="logerror">error: '+errormsg+'</span><br/>'+consoleText;
  updateConsole();
}
function lwarn(warnmsg){
  consoleText='<span class="logwarn">warning: '+warnmsg+'</span><br/>'+consoleText;
  updateConsole();
}
function linfo(infomsg){
  consoleText='<span class="loginfo">info: '+infomsg+'</span><br/>'+consoleText;
  updateConsole();
}

