//------------------------------------------------------------------------------
function setupCalendar(input_fld, trigger_id)
{
 Calendar.setup(
    {
      inputField  : input_fld,
      ifFormat    : "%Y-%m-%d",
      button      : trigger_id
    }
  );
}
//------------------------------------------------------------------------------
function navigatePaging(url, page, totalPages)
{
	if(!isNumeric(page))
	{
		alert('Please enter only numbers'); page.focus(); return false;
	}
	pageId	=	trimAll(page.value);
	if(pageId > totalPages || pageId < 1)
	{
		alert('Invalid Page'); page.focus(); return false;
	}
	window.location	=	url+pageId+"/";
	return false;
}
//------------------------------------------------------------------------------
function goBack(url)
{
	if(url == "")
		history.go(-1);
	else
		window.location	=	url;
}
//------------------------------------------------------------------------------
function goToPage(url)
{
	window.location	=	url;
}
//------------------------------------------------------------------------------
function delAlert(url)
{
	if(confirm("Are you sure to delete?"))
	{
		window.location	=	url;
	}
	else
	{
		return false;
	}
}
//------------------------------------------------------------------------------
function controlTabs(noOfTabs, curTab, className, source)
{
	for(i=1;i<=noOfTabs;i++)
	{
		obj	=	document.getElementById("tab_"+i);
		obj.className	=	'';
	}
	obj	=	document.getElementById("tab_"+curTab);
	obj.className	=	className;
	window.frames['pix_admin'].location.href	=	source;
}
//------------------------------------------------------------------------------