/*
JsEventDefs 1.4.6

Library released under the LGPL:
http://www.opensource.org/licenses/lgpl-license.php

Author:
Chris Moschini
chris AT newtilt.com
chris AT soopahman.com
*/

/* dynamic root */
if(typeof(sRoot) == 'undefined')
	sRoot = '';
	
if(typeof(sCommon) == 'undefined')
	sCommon = '/js/common';
/* /dynamic root */

/* includes */
function include(sJsFile) {
	document.writeln('<script src="' + sRoot + sJsFile + '"></script>');
}
function includes() {
	for(var iInc = 0; iInc < arguments.length; iInc++) {
		include(arguments[iInc]);
	}
}

function includeCss(sCssFile) {
	document.writeln('<link href="' + sRoot + sCssFile + '" rel="stylesheet" />');
}
/* /includes */

/* common files */
if(typeof(EventDefs) == 'object') {
	// common.js has already been included once; this is a problem
	alert('common.js is being included more than once on this page; please remove the extra script src="" tags');
} else {
	includes(
		sCommon + '/js/array.js',
		sCommon + '/js/string.js',
		sCommon + '/js/onload.js',
		sCommon + '/js/functionreflect.js',
		sCommon + '/js/method.js',
		sCommon + '/js/random.js',
		
		sCommon + '/css/cssclasslist.js',
		sCommon + '/css/color.js',

		sCommon + '/dom/attribute.js',
		sCommon + '/dom/pseudoclass.js',
		sCommon + '/dom/simpleselector.js',
		sCommon + '/dom/selector.js',
		sCommon + '/dom/tag.js',

		sCommon + '/event/eventdefs.js',
		sCommon + '/event/eventdef.js',
		sCommon + '/event/binding.js',
		sCommon + '/event/event.js'
	);
}
/* /common files */