var vOrderText;

var gPopupWin

function viewPopupPage(sUrl, sHeight, sWidth, sScrollbars)
{
	viewPopupPage(sUrl, sHeight, sWidth, sScrollbars, 'no');
}

function viewPopupPage(sUrl, sHeight, sWidth, sScrollbars, sToolbars)
{
	viewPopupPage(sUrl, sHeight, sWidth, sScrollbars, sToolbars, 'no', '50', '50');
}

function viewPopupPage(sUrl, sHeight, sWidth, sScrollbars, sToolbars, sMenubar, sTop, sLeft)
{
	if (sHeight == null)
	{
		sHeight = '300';
	}
	if (sWidth == null)
	{
		sWidth = '300';
	}
	if (sScrollbars == null)
	{
		sScrollbars = 'no';
	}
	if (sToolbars == null)
	{
		sToolbars = 'no';
	}
	if (sMenubar == null)
	{
		sMenubar = 'no';
	}
	if (sTop == null)
	{
		sTop = '50';
	}
	if (sLeft == null)
	{
		sLeft = '50';
	}
    var bOpenWindow
	bOpenWindow = 0;
	if (gPopupWin==0)
	{
	   bOpenWindow = 1;
	} else if (gPopupWin.closed) {
	   bOpenWindow = 1;
	   gPopupWin = null;
	}
	if (bOpenWindow == 1)
	{
		if (parseInt(navigator.appVersion) >= 4)
		{
			gPopupWin = open(sUrl,
				'PopupPageWindow',
				'toolbar=' + sToolbars + ',location=no,status=no,directories=no,resizable=yes,width=' + sWidth + ',height=' + sHeight + ',scrollbars=' + sScrollbars + ',menubar=' + sMenubar + ',top=' + sTop + ',left=' + sLeft);
		}
		else
		{
			gPopupWin = open(sUrl,
				'PopupPageWindow',
				'toolbar=' + sToolbars + ',location=no,status=no,directories=no,resizable=yes,width=' + sWidth + ',height=' + sHeight + ',scrollbars=' + sScrollbars + ',menubar=' + sMenubar);
		}
	}
	else
	{
		gPopupWin.location = sUrl
	}
	gPopupWin.focus()

}

//**Patch for top level OPC page**//
if (document.location.href.indexOf("TablePage=8654203") != -1) {
	if (document.location.href.indexOf("/author/") != -1)
	  { document.location.replace("/author/technical-service-home/product-catalog.html");
	  } else { document.location.replace("/technical-service-home/product-catalog.html"); }
}
