function ChangePage(x,sBlock)
{
	var intCurPage, intMaxPage, intNewPage
	//x = document.newPage.CurPage.value;
	intCurPage = document.all(sBlock + "CurPage").innerHTML;
	intMaxPage = document.all(sBlock + "MaxPage").innerHTML;

	if (intCurPage==' ' || intCurPage=='')
		{intNewPage==0} 
	if (x=='next')
	  {intNewPage = parseInt(intCurPage) + 1}
	else if (x=='last')
	  {intNewPage = intMaxPage;}
	else if (x=='first')
	  {intNewPage = 1;}
	else
	  {intNewPage = parseInt(intCurPage) - 1}
	
	if ((intNewPage > intMaxPage) || (intNewPage<1)) 
	  {
	  	window.alert('<%= PROMPT_NO_MORE_PAGES %>');
	   	return;
	  }
	//Hide HideAll(strBlock);		
	document.all('p'+sBlock+intCurPage).style.display='none'
	
	document.all(sBlock + "CurPage").innerHTML = intNewPage;
	intCurPage = "p" + sBlock + intNewPage;
	document.all(intCurPage).style.display=''
}

function SortPage(sFrmName,sColName,iMode,sListName)
{
	var oForm = document.forms(sFrmName);
	if (oForm != null)
		{
		if (oForm.action.indexOf('?') == -1)
 			{oForm.action = oForm.action + '?listsort=' + sColName + '&listname=' + sListName;}
		else
		  {oForm.action = oForm.action + '&listsort=' + sColName + '&listname=' + sListName;}
		oForm.mode.value = iMode;
		oForm.submit();;
		}
	else
		{alert('No form provided for list view!');}
}
