//<![CDATA[
	var lxprintSource = '';
	var lxprintCounter = 0;
	var lxprintTimer;

	function lxprintContent(reportFile, reportPane, reportControl)
	{
		lxwinPrint = window.open(reportFile,'mywin','left=20,top=20,width=700,height=700,toolbar=1,resizable=1,scrollbars=yes');
		lxprintSource = document.getElementById(reportPane).innerHTML;
		lxprintCounter = 10;
		lxwaitForTarget(reportControl);
	}
	
	function lxwaitForTarget(reportControl) { 
		lxprintCounter--; 
		if (!lxwinPrint.document.getElementById(reportControl))
		{
			//DO NOTHING
			if (lxprintCounter > 0)
			{
				eval('lxprintTimer=setTimeout("lxwaitForTarget(\'' + reportControl + '\')", 1000); ');
			}
			else
			{
				alert('Unable to load report. Please try again later.');
			}
		}
		else
		{
			lxdoneTarget(reportControl);
		}
	} 
	function lxdoneTarget(reportControl)
	{
		lxwinPrint.document.getElementById(reportControl).innerHTML = lxprintSource;
		lxwinPrint.print();
	}	
	
	//UTILITY FUNCTIONS
	function lxExpander(srcText, parentId, tagType, attributeName, autoHide, showAll)
	{
		var parentObj = document.getElementById(parentId);
		if (parentObj)
		{
			var childTags = parentObj.getElementsByTagName(tagType);
			for (var i = 0; i < childTags.length; i++)
			{
				if (childTags[i].getAttribute(attributeName))
				{
					if (childTags[i].getAttribute(attributeName) == srcText || showAll == true)
							if (childTags[i].style.display == 'block')
								childTags[i].style.display='none';
							else
								childTags[i].style.display = 'block';
					else if (autoHide == true)
							childTags[i].style.display = 'none';
				}
			}
		}
	}
	
	function lxSetValue(objectName,Value,checkValue)
	{
		var obj = document.getElementById(objectName);
		if (Value != checkValue && obj)
		{
			obj.value = Value;
		}
	}
	
	function lxComboSelect(objectName,currentValue)
	{
		var objDrop = document.getElementById(objectName);
		for (i=0;i<objDrop.options.length;i++)
		{
			if (objDrop.options[i].value == currentValue)
			objDrop.options[i].selected = true;
			else
			objDrop.options[i].selected = false;
		}
	}		
//]]>