var ns = (document.layers) ? 1:0var ns6 = (window.innerHeight && !document.layers) ? 1:0var ie = (document.getElementById && !window.innerHeight) ? 1:0;var mz = (document.getElementById && window.innerHeight) ? 1:0;var op = (mz && !document.getElementsByTagNameNS) ? 1:0;var mac = (navigator.platform.indexOf('Mac') > -1) ? 1:0var ispc = (!mac) ? 1:0function toggle(elm) {	//alert(elm);	div = (document.all) ? elm.parentElement:elm.parentNode;		sib = div.nextSibling;	while(sib.tagName != "DIV") {		sib = sib.nextSibling;	}		if (sib.style.display == "none") {		sib.style.display="block";		div.className = "divider"	}	else {		sib.style.display="none";		div.className = "dividerClosed"	}		document.body.className = document.body.className;	}function togglestatus(elm) {	//alert(elm);	div = (document.all) ? elm.parentElement:elm.parentNode;		sib = div.nextSibling;	while(sib.tagName != "DIV") {		sib = sib.nextSibling;	}		if (sib.style.display == "none") {		sib.style.display="block";		div.className = "statusbar"	}	else {		sib.style.display="none";		div.className = "statusbarClosed"	}	}function movetoTopDevice(elm) {		div = getParent(elm, "DIV");		par = getParent(div, "DIV");				graphs = document.getElementById("graphcontainer");		list = graphs.getElementsByTagName("DIV");				if (par!=list[0]) {		par.className = "translucent";		setTimeout("swapDevice(graphs, par, list[0])",300);			}	}	function swapDevice(graphs, div,target) {		graphs.insertBefore(div,target);		par.className = "";		// send to the server via ajax;		//fix Opera rendering bug	document.body.className = document.body.className;	}function prepField(input) {	if (input.value == "" || input.value == " " || input.value == "Find...") {		input.value = "";	}}function acceptField(input) {	if (input.value == "" || input.value == " " || input.value == "Find...") {		input.value = "Find...";	}}tabs = new Array("people","groups","schedules","locations","devices","attendance","activity","operators","setup","siteinfo","notifications","changelog");if (!img_root) img_root = "img/";	for (i=0; i< tabs.length; i++) {		eval(tabs[i]+"on = new Image();");	eval(tabs[i]+"on.src = '"+img_root+"b_"+tabs[i]+"_hover.gif';");		eval(tabs[i]+"off = new Image();");	eval(tabs[i]+"off.src = '"+img_root+"b_"+tabs[i]+"_off.gif';");		}function imgOn(img) {	if (document.images)	document[img].src = eval(img+"on.src");}function imgOff(img) {	if (document.images)	document[img].src = eval(img+"off.src");}var confirmed = false;function removeLine(elm,uqid) {		if (!confirmed)	isdel = confirm("Remove this item?");			if (isdel || confirmed) {				confirmed = true;		myrow = getParent(elm,"TR");				for (i=0; i<myrow.childNodes.length; i++) {		//myrow.childNodes[i].style.textDecoration = "underline";		myrow.childNodes[i].className = "translucent";		}				par = getParent(myrow,"TBODY");				time=100;		if (!mac) time*=2;				setTimeout("doDelete(par,myrow)",time);				if (uqid!=false)		updateServer(uqid,"inactive");		// eventually send a call to the database to flag this item				}}function doDelete(par,myrow) {	par.removeChild(myrow);	alternateRowColors(par.id);}function openWin(module, url, width, height) { 	//url = false;	windowName = "remote_"+module;	params = "toolbar=0,";		if (mac) params += "location=0,";	else params += "location=1,";		params += "directories=0,";	params += "status=0,";	params += "menubar=1,";	params += "scrollbars=1,";	params += "resizable=1,"; 	params += "width="+width+",";	params += "height="+height;		switch (module) {		case "recent":	win_recent = window.open(url, windowName, params);		if (!win_recent) alert('Disable pop-up blocker to see new module');	win_recent.opener.name = "opener";	win_recent.focus();	break;		case "report":	win_report = window.open(url, windowName, params);		if (!win_report) alert('Disable pop-up blocker to see new module');	win_report.opener.name = "opener";	win_report.focus();	break;		case "access":	win_access = window.open(url, windowName, params);		if (!win_access) alert('Disable pop-up blocker to see new module');	win_access.opener.name = "opener";	win_access.focus();	break;		case "hardware":	win_hardware = window.open(url, windowName, params);		if (!win_hardware) alert('Disable pop-up blocker to see new module');	win_hardware.opener.name = "opener";	win_hardware.focus();	break;		case "notify":	win_notify = window.open(url, windowName, params);		if (!win_notify) alert('Disable pop-up blocker to see new module');	win_notify.opener.name = "opener";	win_notify.focus();	break;				}}var win_recent = win_report = win_access = win_hardware = win_notify = false;function resetSidebar() {	for (var i=0; i<modules.length; i++) {		modules[i].remote = false;				shell = "wrapper_" + modules[i].id;				if (shell!=null)		document.getElementById(shell).style.display = "block";				switch (modules[i].id) {					case "recent":				if (win_recent)				win_recent.close();			break;		case "report":				if (win_report)				win_report.close();			break;		case "access":				if (win_access)				win_access.close();			break;		case "hardware":				if (win_hardware)				win_hardware.close();			break;		case "notify":				if (win_notify)				win_notify.close();			break;					}	}}function addChannel(elm) {	div = getParent(elm);		selects = div.getElementsByTagName("DIV");		for (i=0; i<selects.length; i++) {		if (i==selects.length-1) {			elm.style.display="none";		}				if (selects[i].style.display!="block") {			selects[i].style.display="block";			break;		}	}}