function NewPopPage(sLink, sPageId, nWidth, nHeight)
{
	var nLeft = (window.screen.width / 2) - (nWidth / 2 + 10);
	var nTop = (window.screen.height / 2) - (nHeight / 2 + 5) - 20;
	var winNew = window.open(sLink, sPageId, "width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop + ",screenX=" + nLeft + ",screenY=" + nTop + ",scrollbars=yes");
	//winNew.focus();
}

function NewPopPage2(sLink, sPageId, nWidth, nHeight)
{
	var nLeft = (window.screen.width / 2) - (nWidth / 2 + 10);
	var nTop = (window.screen.height / 2) - (nHeight / 2 + 5) - 20;
    var winNew = window.open(sLink, sPageId, "width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop + ",screenX=" + nLeft + ",screenY=" + nTop+",scrollbars=no");
	//winNew.focus();
}

function NewPopPage3(sLink, sPageId, nWidth, nHeight)
{
	var nLeft = (window.screen.width / 2) - (nWidth / 2 + 10);;
	var nTop = (window.screen.height / 2) - (nHeight / 2 + 50);
	var winNew = window.open(sLink, sPageId, "width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop + ",scrollbars=yes");
	//winNew.focus();
}
function NewPopFullScreen(sLink, sPageId)
{
	var nWidth  = window.screen.width - 10;
	var nHeight = window.screen.height -50;
	var winNew = window.open(sLink, sPageId, "width=" + nWidth + ",height=" + nHeight + ",left=0,top=0,scrollbars=auto");
	winNew.focus();
}

function ReSearch()
{
	document.all.btnSearch.click();
}

function DialogCarrier(DialogURL,w,h)
{
	
	var d = showModalDialog(DialogURL, document.all.txtCarrierId.value, "dialogWidth:" + w + "; dialogHeight:" + h + "; status:0");
	if (d != null)
	{
		if ( d != false )
		{
			//alert(d);
			document.all.txtCarrierId.value = d;
			return true;
		}
	}
	return false;

}


