try
{
	if (window.opener)
		{
		if (window.opener.top.Help)
			{
// document.layers is only supported by NS 4+
			if (document.layers)
				{
				window.opener.top.Help.document.DescriptionLayer.document.write("")
				window.opener.top.Help.document.DescriptionLayer.document.close()
				}
// document.all is only supported by IE 4+
			if (document.all)
				{
				window.opener.top.Help.DescriptionLayer.innerHTML = ""
				}
			}
		}
	else
		{
		if (top.Help)
			{
// document.layers is only supported by NS 4+
			if (document.layers)
				{
				top.Help.document.DescriptionLayer.document.write("")
				top.Help.document.DescriptionLayer.document.close()
				}
// document.all is only supported by IE 4+
			if (document.all)
				{
				top.Help.DescriptionLayer.innerHTML = ""
				}
			}
		}
}
catch(e){}

	function CloseWindow()
	{
		if (window.opener && !window.opener.closed)
		{
			window.opener.focus();
			window.close();
		}
		else
		{
			self.close();
		}
	}
	function CloseWindowWithRefresh()
	{
		try
		{
			if (window.opener && !window.opener.closed)
			{
				window.opener.focus();
				window.opener.location.reload();
				self.close();

			}
			else
			{
				self.close();
			}
		}
		catch (err)
		{
			
			window.close();
		
		}
	}


	function PopUp(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWindow = window.open(program,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWindow.focus();
		}

	function PopUp1(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWindow = window.open(program,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWindow.focus();
		}


	function PopUp2(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWin2 = window.open(program,"newWin2","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWin2.focus();
		}

	function PopUp3(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWin3 = window.open(program,"newWin3","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWin3.focus();
		}
	function CatalogOrderPopUp(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newcatalogorderWindow = window.open(program,"newcatalogorderWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newcatalogorderWindow .focus();
		}

	function PopUpNoScroll(program,m_width,m_height)
		{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWindow = window.open(program,"newWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=no,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWindow.focus();
		}
	function PopUpNoScrollNoResize(program,m_width,m_height)
	{
		leftpos = (screen.width - m_width)/2
		toppos = (screen.height - m_height)/2
		newWindow = window.open(program,"newWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWindow.focus();
	}
	function PopUpRight(program,m_width,m_height)
		{
		leftpos = screen.width - m_width - 10
		toppos = (screen.height - m_height)/2
		newWindow = window.open(program,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+m_width+",height="+m_height+",top="+toppos+",left="+leftpos);
		newWindow.focus();
		}
	function NavURL(Demo,theLink,program)
		{
		if (Demo == "True")
			{
			theLink.href = "javascript:DemoMessage();"
			}
		else
		{
			if (document.forms[0] != undefined)
			{
				if (document.forms[0].hidOrderInProgress != undefined)
				{
					if (document.forms[0].hidOrderInProgress.value == "True")
					{
						theLink.href = "javascript:OrderInProgressMessage();"
					}
					else
					{
						theLink.href = program
					}
				}
				else
				{
					theLink.href = program
				}
			}
			else
			{
				theLink.href = program
			}
		}
	}
	function NavURL2(Demo,theLink,program)
		{
		if (Demo == "True")
			{
			theLink.href = "javascript:DemoMessage();"
			}
		else
			{
			theLink.href = program
			}
		}
	function DemoMessage()
		{
		alert ("Not available during a demo.")
		}
	function OrderInProgressMessage()
		{
		alert ("You must COMPLETE your order first.")
		}
	function ShowTheHelp(theTerm,theDescription)
		{
		status=theDescription.substring(0,80);
		txtDescription = "<b>Term:&nbsp;&nbsp;</b>" + theTerm + "<br><b>Description:&nbsp;&nbsp;</b>" + theDescription
		if (window.opener)
			{
			window.opener.status=theDescription.substring(0,80);
			if (window.opener.top.Help)
				{
// document.layers is only supported by NS 4+
				if (document.layers)
					{
					window.opener.top.Help.document.DescriptionLayer.document.write(txtDescription)
					window.opener.top.Help.document.DescriptionLayer.document.close()
					}
// document.all is only supported by IE 4+
				if (document.all)
					{
					event.srcElement.style.cursor = "help";
					window.opener.top.Help.DescriptionLayer.innerHTML = txtDescription
					}
				}
			}
		else
			{
			if (top.Help)
				{
// document.layers is only supported by NS 4+
				if (document.layers)
					{
					top.Help.document.DescriptionLayer.document.write(txtDescription)
					top.Help.document.DescriptionLayer.document.close()
					}
// document.all is only supported by IE 4+
				if (document.all)
					{
					event.srcElement.style.cursor = "help";
					top.Help.DescriptionLayer.innerHTML = txtDescription
					}
				}
			}
		}
	function ShowTheHelp2(theLink,theDescription)
		{
		if (window.opener)
			{
			window.opener.status=theDescription.substring(0,80);
			}
		else
			{
			status=theDescription.substring(0,80);
			}
		theLink.href = "javascript:DoNothing();"
		}
	function DoNothing()
		{
			return;
		}
	function ShowTheHelp3()
		{
		if (window.opener)
			{
			window.opener.status="";
			}
		else
			{
			status="";
			}
		}
function ContactCustomerServiceForAdjustments()
{
	alert("For credits and adjustments, please call Customer Service.\n\n Thank you!")
}
function ContactCustomerServiceToLowerQuantity()
{
	alert("To lower order quantity or cancel your order, please call Customer Service.\n\n Thank you!")
}
function ConfirmPrompt(msg)
{
	if (confirm(msg))
		return true;
	else
		return false;
}
function AssumeIdentity()
{
	if (confirm("Are you sure you want to assume the identity of another user or exit Assume Identity mode?"))
	{
		self.location.href="assumeidentity.asp";
		return true;
	}
	else
	{
		return false;
	}
}
function blockEnter(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
          ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 13) {
        return false;
    } else {
        return true;
    }
}
function BrowserCheck()
{
	try
	{
		if (!(/MSIE (\d+\.\d+);/.test(navigator.userAgent)))
		{
			alert("Sorry, we do not fully support this browser right now!\n\nPlease download and use the latest versoin of Microsoft Internet Explorer for the best experience.\n\nTechnical Support Team");	
		}
	}
	catch(e){}
}
