// start of script
	function setObject(sObject)
	{
		var oObject;

//	search in parent window
		if (oObject == null || typeof(oObject) != "object")
			oObject = window.parent.document.all.item(sObject);

//	search in parent frames
		if (oObject == null || typeof(oObject) != "object")
		{
			var aParentFrames = window.parent.frames;

			for (p=0; p < aParentFrames.length; p++)
			{
				oObject = window.parent.frames(aParentFrames(p).name).document.all.item(sObject);

				if (oObject != null && typeof(oObject) == "object")
					break;
			}
		}

//	search in top window
		if (oObject == null || typeof(oObject) != "object")
			oObject = window.top.document.all.item(sObject);

//	search in top frames
		if (oObject == null || typeof(oObject) != "object")
		{
			var aTopFrames = window.top.frames;

			for (t=0; t < aTopFrames.length; t++)
			{
				oObject = window.top.frames(aTopFrames(t).name).document.all.item(sObject);

				if (oObject != null && typeof(oObject) == "object")
					break;
			}
		}

		return(oObject);
	}


	function writeToTarget(sSource)
	{
// set the object values
		var oTarget = window.top.document.all.item('w' + event.srcElement.name);
		var oSource = window.top.document.all.item(event.srcElement.name);
	
		if (oTarget != null && oSource != null)
		{
			var sNewText = oTarget.replaceAdjacentText('afterBegin', oSource.value);
		}
	}


// submit form
	function submitForm(sForm)
	{
		if (setObject(sForm) != null)
		{
			var oForm = setObject(sForm);

			oForm.submit();
		}
	}


// open new browser window for help topics
	function openHelpWin(sWidth, sHeight, sTopic)
	{
		var helpWindow;
		var helpLocation = sTopic;

		helpWindow = window.open(helpLocation, "helpWindow","toolbar=0,status=0,scrollbars=1,resizable=0,width=" + sWidth + ",height=" + sHeight + ",top=100,left=100");

		helpWindow.focus();
	}


// functions to toggle options based on where user clicks
	function showObject(sObject)
	{
		if (setObject(sObject) != null)
		{
			var oObject = setObject(sObject);
	
			oObject.style.display = "block";

// reset form if it exists
			if (setObject(sObject + "Form") != null)
			{
				var oForm = setObject(sObject + "Form");

				if (oForm)
					oForm.reset();
			}
		}
	}


	function hideObject(sObject)
	{
		if (setObject(sObject) != null)
		{
			var oObject = setObject(sObject);

			oObject.style.display = "none";
		}
	}


	function toggleButton(sObject)
	{
		if (setObject(sObject) != null)
		{
			var oObject = setObject(sObject);

			if (oObject.type == "checkbox")
			{
				if (oObject.checked == true)
				{
					oObject.checked = false;
				}
				else
				{
					oObject.checked = true;
				}
			}
			else
			{
				oObject.checked = true;
			}
		}
	}


	function toggle2Buttons(sObject1, sObject2)
	{
		var oObject1 = setObject(sObject1);
		var oObject2 = setObject(sObject2);

		if (oObject1 != null && oObject2 != null)
		{
			if (oObject1.checked == true)
			{
				oObject1.checked = false;
				oObject2.checked = true;
			}
			else
			{
				oObject1.checked = true;
				oObject2.checked = false;
			}
		}
	}


	function positionObject(sObject)
	{
		if (setObject(sObject) != null)
		{
			var oObject = setObject(sObject);

			var xpos = 20 + window.top.document.body.scrollLeft;
//			var xpos = ((window.top.document.body.clientWidth + window.top.document.body.scrollLeft) * .5) - (oObject.offsetWidth * .5);
			var ypos = 103 + window.top.document.body.scrollTop;
//			var ypos = (window.top.document.body.clientHeight + window.top.document.body.scrollTop) - (window.top.document.body.clientHeight * .5) - (oObject.offsetHeight * .5);

			oObject.style.pixelLeft = xpos;
			oObject.style.pixelTop = ypos;
		}

		return;
	}
	
	function truncateTextArea(sTextArea, iLimit)
	{
		if (sTextArea.value.length > iLimit)
		{
			sTextArea.value = sTextArea.value.substring(0, iLimit);
		}
		sTextArea.value = sTextArea.value.replace(/[^\d\w\s~!@#%_=:;,/\[\\\^\$\.\|\?\*\+\(\)\-]/g, "");
	}
//  End of script-->
