/*
usage: 
if (!isDefined("window", "myVarName")){
	alert("myVarName is undefined");
}
*/
function isDefined(object, variable) {
	return (typeof(eval(object)[variable]) != 'undefined');
}

function isArray(a) {
    return isObject(a) && a.constructor == Array;
}
function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}
function isFunction(a) {
    return typeof a == 'function';
}

function isClass(element, sClass) { 
	sClassName = element.className;
	re = new RegExp(sClass + "( *|,?|,? *| *,? *| *,?|$)")//changed regex from "( |$|,|, | ,| , )"
	if (!sClassName) return false;
	return re.test(sClassName); 
}