function fieldFocus(obj,focusState) {
	if (focusState) { // turn on
		newClass = obj.className+' fieldFocused';
		obj.className = newClass;
	} else { // turn off
		newClass = obj.className;
		newClass = newClass.replace(' fieldFocused','');
		newClass = newClass.replace('fieldFocused','');
		obj.className = newClass;
	}
}
function funcFrame(funcType,funcParams) {
	funcFrameObj = window.frames.functionFrame;
	funcFrameObj.document.location.replace('./funcFrame.php?funcType='+funcType+'&'+funcParams);
}
function funcFrameVisible() {
	funcFrameObj = document.getElementById('functionFrame');
	funcFrameObj.style.height = '400';
	funcFrameObj.style.width = '900';
	funcFrameObj.style.border = '1px solid black';
}
function popSearch() {
	var searchString = prompt('Enter the phrase to search for. Use % for wildcard searches.','');
	if (searchString != null) { // entry made
		if (!searchString) { // empty; retry prompt
			popSearch();
		} else {
			document.location.href = './index.php?ticketScope=all&ticketStatus=all&searchString='+searchString;
		}
	}
}
function switchTab(targetTab) {
	tabButtonPrefix = 'tabButton_';
	tabContentPrefix = 'indexTab_';
	for (var i=0;i<tabItems.length;i++) {
		buttonObj = document.getElementById(tabButtonPrefix+tabItems[i]);
		buttonObj.className = 'tab';
		tabObj = document.getElementById(tabContentPrefix+tabItems[i]);
		tabObj.className = 'indexTabHidden';
	}
	// turn on selected item
	targetButton = document.getElementById(tabButtonPrefix+targetTab);
	targetButton.className = 'tabSelected';
	targetTab = document.getElementById(tabContentPrefix+targetTab);
	targetTab.className = 'indexTabContent';
}
function toolTip(tipText) {
	tipBox = document.getElementById('toolTip');
	if (tipText) {
		tipX = event.clientX;
		tipY = event.clientY + 20;
		tipBox.innerHTML = tipText;
		tipBox.style.left = tipX;
		tipBox.style.top = tipY;
		tipBox.style.visibility = 'visible';
	} else {
		tipBox.style.visibility = 'hidden';
	}
}