





function ConfirmLink(pmessage,purl)
{
	if (window.confirm(pmessage) == true)
	{
		window.location.href = purl;
	}
}



function IsInternalRequest(pPrimary,pSecondary)
{
	var rv = false;
	var thisUrl = document.URL;
//  	alert(thisUrl + " - " + pPrimary + " - " + pSecondary);
	
	if (pPrimary != "")
	{	
		if (thisUrl.indexOf(pPrimary) != -1)
			rv = true;
	}
	
	if (pSecondary != "")
	{	
		if (thisUrl.indexOf(pSecondary) != -1)
			rv = true;
	}
// 	if (rv)
// 		alert("true");
// 	else
// 		alert("false");
	return rv;
}


function OpenDialog(purl,pname,pwidth,pheight)
{
	psize = "";
	if (pwidth > 0 && pheight > 0)
		psize = "height="+ pheight +",width="+ pwidth +",";

 	pleft = ((screen.width-pwidth)/2);
 	ptop = ((screen.height-pheight)/2);
 	window.open(purl,pname,psize + "top="+ ptop +",left="+ pleft +",resizable=yes,scrollbars=yes,status=yes,location=no,toolbar=no,menubar=no",true);
}



function Reload()
{
	if (frameLevel == 0)
		window.location.href = pagePath;
	else
	{
		if (parent)
			parent.Reload();
	}
}

function ReloadRoot()
{
	if (frameLevel == 0)
		window.location.href = pageRoot;
	else
	{
		if (parent)
			parent.ReloadRoot();
	}
}

function ReloadByPar(par)
{
	if (frameLevel == 0)
		window.location.href = pageRoot + par;
	else
	{
		if (parent)
			parent.ReloadByPar(par);
	}
}


function OpenDialogOneLine(purl,pname,pwidth,pheight)
{
 	window.open(purl,pname,"height="+ pheight +",width="+ pwidth +"," + "top="+ ((screen.height-pheight)/2) +",left="+ ((screen.width-pwidth)/2) +",resizable=yes,scrollbars=yes,status=yes,location=no,toolbar=no,menubar=no",true);
}
