var SCRIPT_BASE = 'scripts/';
var doclang = document.getElementsByTagName("HTML")[0].lang;

extend = function(destination, source) {
  for (property in source) 
  {
    destination[property] = source[property];
  }
  return destination;
}

extend(Array.prototype,{
	indexOf: function(item) {
		for (var n = 0, l = this.length; n < l; n++) {
			if (this[n] == item) {
				return n;
			}
		}
		return -1;
	}
});

function assert(condition, message) {
	if (!condition) {
		alert(message);
	}
}

var WWLib = {
	version: "1.0",
	_included: [],
	include: function(src) {
		if (this._included.indexOf(src) < 0) {
			this._included.push(src);
			document.write('<sc' + 'ript src="' + SCRIPT_BASE + src + '" type="text/javascript"></script>');
		}
	}
}

WWLib.include("core_dom.js");
WWLib.include("core_event.js");