	function WritePagination(mypage,maxpages)
{
	if (maxpages > 1 && mypage <= maxpages)
	{
	    
	    var str = " "; 
		strObj = new String(str); 
		var i=0; 
		for (i=0; i<strObj.length; ++i) 
		//document.write(String.fromCharCode(strObj.charCodeAt(i)-3)); 
		 
		var counterstart = mypage - (202-i); 
		
		//if (mypage%10) 
		counterstart = mypage - (mypage%10) + 1; 
 		if (counterstart>maxpages)
			counterstart=counterstart-10;
		
		var counterend = counterstart + 9; 
		if (counterend > maxpages) counterend = maxpages; 
		
		//if (counterstart != 1) 
		//	document.write( GetGotoPageUrlString(1,"First")+"&nbsp;:&nbsp;"+GetGotoPageUrlString(counterstart - 1,"Previous")+"&nbsp;<b>[</b>"); 
		//else 
			document.write("<b>[</b>");  
 		
/*		if (counterstart != 1) 
			document.write("<table border='0' align='center'><tr valign='center'><td align='center'>" + GetGotoPageUrlString(1,"First")+"&nbsp;:&nbsp;"+GetGotoPageUrlString(counterstart - 1,"Previous")+"&nbsp;<b>[</b>"); 
		else 
			document.write("<table border='0' align='center'><tr valign='center'><td align='center'><b>[</b>");  
*/
		
		var pad="";
		var counter	= counterstart;
		for(;counter<=counterend;counter++)
		{
			if (counter != mypage) document.write("&nbsp;" + GetGotoPageUrlString(counter,pad + counter));
			else document.write("&nbsp;<b>" + pad + counter + "</b>");
		}
		document.write("&nbsp;<b>]</b>");
		//if (counterend != maxpages) document.write("&nbsp;" + GetGotoPageUrlString (counterend + 1,"Next") + "&nbsp;:&nbsp;" + GetGotoPageUrlString(maxpages,"Last"))
		//document.write("</td></tr></table>");		
	}
}
function GetGotoPageUrlString (nPageNumber,sUrlText)
{
	return "<a href='JavaScript:GotoPage(" + nPageNumber + ");' style='TEXT-DECORATION: none;'>" + sUrlText 
	+ "</a>";
}
			function GotoPage(nPageNumber)
		{
			document.forms.frmNav.page.value = nPageNumber;
			document.forms.frmNav.submit();
		}
	function rowRollover(myId, isInRow,rowClass) {
      // myId is our own integer id, not the DOM id
      // isInRow is 1 for onmouseover, 0 for onmouseout
      var row = document.getElementById('tr_' + myId);
	 
	  if (isInRow == 1)
	  		 row.className ='rowselected';
	  else
	  	row.className = rowClass;
	 //alert(row.className);
    }