var isW3C = (document.getElementById) ? true : false;
var isAll = (document.all) ? true : false;
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
function getObjectRef(doc,id) {
	if (isW3C) {
		if (obRef = doc.getElementById(id)) return obRef;
	} else if (isAll) {
		if (obRef = doc.all[id]) return obRef;
	}
	return false;
	//return (isW3C) ? doc.getElementById(id) : ((isAll) ? doc.all[id] : false);
}
function getStyle(obj,prop) {
	if (!obj) { return false; }
	if (typeof obj == "string") { obj = getObjectRef(this.doc,obj); }
	var value = null;
	if (prop == "opacity" && obj.filters) {
		value = 1;
		try {
			value = obj.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100;
		} catch(e) {
			try {
				value = obj.filters.item("alpha").opacity/100;
			} catch(e) {
				value = 1.0;
			}
		}
	} else if (obj.style[prop]) {
		value = obj.style[prop];
	} else if (obj.currentStyle && obj.currentStyle[prop]) {
		value = obj.currentStyle[prop];
	} else if (document.defaultView && document.defaultView.getComputedStyle) {
		var thecss = document.defaultView.getComputedStyle(obj,null);
		if (thecss !== null) {
			value = thecss.getPropertyValue(prop);
		}
	}
	return value;
};
function park_showHide(obj,force) {
	if (typeof obj == "string") obj = getObjectRef(document,obj);
	var disp = getStyle(obj,"display");
	if (force) {
		if (isMSIE) {
			if (obj.nodeName == "TR" && force == "table-row") {
				force = "block";
			} else if (obj.nodeName == "TBODY" && force == "table-row-group") {
				force = "block";
			}
		}
		obj.style.display = force;
	} else if (typeof disp == "undefined" || (disp != "none" && disp != "")) {
		obj.style.display = "none";
	} else {
		switch(obj.nodeName) {
			case "TABLE":
				obj.style.display = "table";
				break;
			case "TBODY":
				if (isMSIE) {
					obj.style.display = "block";
				} else {
					obj.style.display = "table-row-group";
				}
				break;
			case "TR":
				if (isMSIE) {
					obj.style.display = "block";
				} else {
					obj.style.display = "table-row";
				}
				break;
			case "A":
			case "SPAN":
			case "IMG":
			case "INPUT":
				obj.style.display = "inline";
				break;
			default:
				obj.style.display = "block";
		}
	}
	return false;
}
function imageUploader() {
	var url = "http://www.parkschool.net/scripts/omni/uploader.cfm";
	if (arguments.length > 1) {
		var height = arguments[1];
		var width = arguments[2];
	} else {
		var height = 400;
		var width = 500;
	}
	if (arguments.length == 4) {
		window.open(url,'New','top=80,left=80,width='+width+',height='+height+','+arguments[3]);
	} else {
		window.open(url,'New','top=80,left=80,width='+width+',height='+height+',toolbar=no,menubar=no,scrollbars=yes');
	}
	return false;
}