
function jg_setDisabled(obj)
{
	obj.style.visibility = obj.disabled ? "hidden" : "visible";
}

function j_refreshme(result)
{
	document.location.reload();
}

function j_IPPageOnload()
{
	var Status = document.getElementById('pnlStatus');
	if (Status!=null && Status.innerText && Status.innerText.length>1)
	{
		alert(Status.innerText);
		Status.innerText = "";
	}
}

function j_showDoc(code, searchText)
{
	try
	{
		window.external.NavigateAndFind(location.href.split("/Zoek")[0] + "/Document/" + code + ".aspx", searchText, "contentIframe");
		return false;
	}
	catch (e)
	{
		return true;
	}
}

function jn_ClearHistoryPP()
{
	if (parent.document.all.hidHistory != null) 
		parent.document.all.hidHistory.value = '';
	if (parent.document.all.hidNavInfo != null) 
		parent.document.all.hidNavInfo.value = '';
	if (parent.document.all.hidNavLabel != null) 
		parent.document.all.hidNavLabel.value = '';
}

function jn_LoadHistoryPP()
{
	var NavLabel	= parent.document.all.hidNavLabel;
	var NavInfo		= parent.document.all.hidNavInfo;
	var NavHistory	= parent.document.all.hidHistory;
	
	var NavCell		= document.all.htcHistory;
	var anchorText;

	if (NavLabel!=null && NavInfo!=null && NavCell!=null && NavHistory!=null)
	{
		var LabelCells	= NavLabel.value.split(" -> ");
		var InfoCells	= NavInfo.value.split(" -> ");
		var Hrefs		= NavHistory.value.split("#");
		var	title		= "";
		
		NavCell.innerHTML = Hrefs.length > 0 ? "" : "&nbsp;";
		
		if (Hrefs.length > 0)
		{
			try
			{
				title = parent.document.all.contentIframe.contentWindow.document.title;
			} catch (e) {}
		
			anchorText		= LabelCells[0];
			if (typeof(anchorText)=='undefined') anchorText = '';
			if (anchorText.length > 40)
				anchorText	= anchorText.substring(0, 38) + "...";
			NavCell.innerHTML += "<a  onclick=\"j_RollBackHistory(" + 0 + ")\" href=\"" + Hrefs[0] + "\" title=\"" + LabelCells[0] + "\">" + anchorText + "</a>"
		
			for (var i=1;i<Hrefs.length;i++)
			{
				anchorText		= InfoCells[i - 1];
				if (typeof(anchorText)=='undefined') anchorText = '';
				if (anchorText.length > 40)
					anchorText	= anchorText.substring(0, 38) + "...";
				
				NavCell.innerHTML += " &raquo; <a  onclick=\"j_RollBackHistory(" + i + ")\" href=\"" + Hrefs[i] + "\" title=\"" + LabelCells[i] + " van " + InfoCells[i - 1] + "\">" + anchorText + "</a>"
			}

			anchorText		= InfoCells[Hrefs.length - 1];
			if (typeof(anchorText)=='undefined') anchorText = '';
			if (anchorText.length > 40)
				anchorText	= anchorText.substring(0, 38) + "...";
			NavCell.innerHTML += " &raquo; <B title=\"" + title + " van " + InfoCells[Hrefs.length - 1] + "\">" + anchorText + "</B>";
		}
	}
}