function BrowsePage( strControllerURL ){
	this.ControllerURL = strControllerURL;
	this.Init();
};

BrowsePage.prototype.objPostProperties = function( objPostProperties ){
	this.PostProperties = objPostProperties;
};

BrowsePage.prototype = new PageControllerClass;
BrowsePage.prototype.Init = function(register){
	var objSelf = this;
	var arrSortLinks = $('th.sortable');
	objSearchForm = $('#searchform');
	this.SetBusy( true );

	if( $('#dob').length > 0 ) { 
		$('#dob').datepicker({
			appendText:'(mm/dd/yyyy)',
			dateFormat: 'mm/dd/yy',
			showOn:'both',
			buttonImage:'/assets/icons/16-calendar-add.png',
			buttonImageOnly:true,
			yearRange: '1920:2020'
		});
	};
	
	$('div.pagination a').click(
		function( objEvent ){
			var $this = $(this);
			var pageHrefAarr = $this.attr('href').split("/");
			var page = pageHrefAarr[pageHrefAarr.length-1];
			$('#page').val(page);
			$('#searchform').submit();
			objEvent.preventDefault();
			return(false);
		}
	);

	jQuery.each(arrSortLinks, objSelf.makeLinks);

	this.SetBusy( false );
};

BrowsePage.prototype.makeLinks = function( i , jElem ){
	var elem = $(jElem);
	var id = elem.attr('id');
	elem.attr('id','');
	elem.html('<a href="#" id="'+id+'">' +elem.text()+ '</a>');
	$('#'+id).click(
		function( objEvent ){
			var $this = $(this);
			$('#orderby').val(elem.attr('title'));
			$('#searchform').submit();
		}
	);
};


