// Global Variables
var APP_CALENDAR_OBJECT;
// Is Object & Valid
function IS_OBJ(o) {
	return(typeof(o)!="undefined"&&o!=null&&o!=undefined);
}
// Open Image Popup
function APP_IMAGE_VIEWER(idlist) {
	window.open(APP_WEBROOT + 'popup.php?id='+idlist,'appImageViewer','status=0,toolbar=0,menubar=0,menubar=0,directories=0,scrollbars=1,resizable=0,height=500,width=500');
}
// Open Calendar Popu
function APP_CALENDAR_POPUP(formOBJ) {
	APP_CALENDAR_OBJECT = formOBJ;
	window.open(APP_WEBROOT + 'calendar_popup.php','appCalendar','status=0,toolbar=0,menubar=0,menubar=0,directories=0,scrollbars=0,resizable=0,height=260,width=284');
}
// Receive Return
function APP_CALENDAR_PICKDATE(date) {
	if(APP_CALENDAR_OBJECT) APP_CALENDAR_OBJECT.value = date;
}
// Toggle Display Of Element
function toggleDisplay(e,d) {
	o = document.getElementById(e);
	if(IS_OBJ(o)) o.style.display=d;
	if(typeof(HideArray)!="undefined"&&IS_OBJ(HideArray)) {
		// Reverse Display
		if(d=="none") d = "visible"; else d = "hidden";
		for(i=0;i<HideArray.length;i++) {
			H_OBJ = document.getElementById(HideArray[i]);
			if(IS_OBJ(H_OBJ)) H_OBJ.style.visibility = d;
		}
	}
}

