﻿/*
toolUtils.js

Author: Brenton unger

Notes:

	Put your utility functions in here for re-use across pages. Keep them light and tight!

*/

function toggleVisibility(control)
{
	if(control)
	{
		if(control.style)
		{
			if(control.style.display == '')
				control.style.display = 'none';
			else
				control.style.display = "";
		}
	}
}

//BU 4/23/2007 Moved these from toolMasks.js for use in capturing the enter key event
function returnKeyCode(bool)
{
	if(bool)
	{
		return true;
	}
	else
	{
		window.event.keyCode = null;
		return false;
	}
}

function pressed()
{
	return window.event.keyCode;
}

//disables the enter key...
function catchEnterKey()
{
	return returnKeyCode(!(pressed() == 13));
}