// Event Binding Code
if (null == versionID) var versionID = new Array(); versionID[versionID.length] = ("Event Binding: v1.0\n");

function nl_onLoad() {
  if (null == document.nl_config) { alert("General initialisation failed!  Please contact webteam@netlanguages.com."); return; }
  if (null == document.nl_config.onload) { alert("ONLOAD initialisation failed!  Please contact webteam@netlanguages.com."); return; }
  eval (document.nl_config.onload);
  document.nl_config.loaded = true;
}
function nl_onUnload() {
  if (null == document.nl_config) { alert("General initialisation failed!  Please contact webteam@netlanguages.com."); return; }
  if (null == document.nl_config.onunload) { alert("ONUNLOAD initialisation failed!  Please contact webteam@netlanguages.com."); return; }
  eval (document.nl_config.onunload);
}
function nl_wrap(nl_code) {
  if (null == document.nl_config) { alert("General initialisation failed!  Please contact webteam@netlanguages.com."); return; }
  if (! document.nl_config.loaded) { alert("Please wait until the page has finished loading before doing the exercises!"); return; }
  eval(nl_code);
}
function _addEvent(ev,code) {
  if (ev.toLowerCase() == "onload") this.onload += code + ";\n ";
  else if (ev.toLowerCase() == "onunload") this.onunload += code;
  else alert("Event '"+ev+"' not supported\nCould not bind '"+code+"'.");
}

document.nl_config = new Object();
document.nl_config.loaded=false; document.nl_config.onload="";
document.nl_config.onunload=""; document.nl_config.add = _addEvent;
window.onload=nl_onLoad;
window.onunload=nl_onUnload;
// End of Event Binding Code
