// JavaScript Document

function hov(loc,cls) {
   if(loc.className)
      loc.className=cls;
}

function f_pageCount(a_dwname, a_rowCountPerPage, a_rowCount, a_top, a_left){
//*********************************************************
// Procedure:  f_pageCount(a_dwname, a_rowCountPerPage, a_rowCount)
// Author:  Marvin P. Haagsma, Systems Analyst, AGLC
// Date:  4 Aug 2005
// Purpose: Displays the Page # of ## in a location specified.
// Returns: NONE 
			  // make sure the datawindow exists to avoid javascript errors! 
			  // Set the DIV tag position appropriately for your application! 
			  //alert("rowcount per page" + a_rowCountPerPage)
			  //alert(a_dwname.name);
			  //<div id="page#of#" style="position:absolute; top:225px; left:185; text-align:center; font-size:11; font-weight: bold; margin: 2px 1px 3px 11px" ><!-- page#of# -->
			//<!-- Display the PageCount above the results datawindow -->
			//if ( typeof( window[ 'dw_orgsearch' ] ) != "undefined" ) {
				//f_pageCount(dw_orgsearch, lv_rowCountPerPage, lv_rowCount);
				//}

			//</div><!-- page#of# -->	
//*********************************************************
  //alert("top" + a_top + ", left " + a_left);
			 if (a_dwname){
				if (a_rowCount > 0 && a_rowCountPerPage > 0 ) {
					var totalpage = parseInt(a_rowCount / a_rowCountPerPage)
					if (a_rowCount % a_rowCountPerPage > 0) {totalpage++;}
					var currentPage = parseInt(a_dwname.firstRow / a_rowCountPerPage ) + 1;
					if (a_dwname.firstRow % a_rowCountPerPage > 0) {currentPage++;}
					document.write('<div id="page#of#" style="position:absolute; top:' + a_top + '; left:' + a_left +'; text-align:center; font-size:11; font-weight: bold; margin: 2px 1px 3px 11px" ><!-- page#of# -->');
					document.write('<BR><BR>  Page ');
					document.write(currentPage);
					document.write(' of ');
					document.write(totalpage);
					document.write("&nbsp;&nbsp;&nbsp;");
					document.write("</div><!-- page#of# -->	");
				}
			}else{
			//document.write("a_dwname does not exist ");
			}
	}


 