/*

©2007 Majesco Entertainment
Author: James Becker
Date: 12th November 2007

*/

isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

// Function to stack load events on window.onload
function addLoadEvent(func) {
	var curOnLoad = window.onload;
	
	if(typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			curOnLoad();
			func();
		}
	}
}

function insertAfter(parent, node, referenceNode) {
	parent.insertBefore(node, referenceNode.nextSibling);
}

function wait(msecs) {
	var start = new Date().getTime();
	var cur = start
	while(cur - start < msecs) {
		cur = new Date().getTime();
	} 
}

function checkForInput(obj,strMessage) {
	if(obj.value == "") {
		alert(strMessage);
		return false;
	} else {
		return true;
	}
}