/*************** FORMAT PAGE CREATE NEW ***************/
function formatPagingNew(name){
	return '<DIV ID="' + name + 'PageButtons">\n' + formatPageButtons(name) + '</DIV>\n'
}


/*************** FORMAT PAGE BUTTON ***************/
function formatPageButton(width, href, label){
	if(!href){
		return label;
	} else {
		return '<A HREF="javascript:void(0)" ONCLICK="' + href + '">' + label + '</A>\n';
	}
}

/*************** FORMAT PAGE BUTTONS ***************/
function formatPageButtons(name){
	var pages = _paging[name]
	var width = 80

	var text = ''
	text += formatPageButton(width, (_paging[name].selectedIndex == 0)?"":"backPage('" + name + "')", "Previous")
	text += ' | ';
	text += formatPageButton(width, (_paging[name].selectedIndex == _paging[name].length-1)?"":"nextPage('" + name + "')", "Next")
	return text
}


