		//used by admin group on delete button (ManageRequest.aspx)
		function ConfirmDeleteDocument() {
		if (confirm("You have chosen to delete this request.\nAre you sure you want to continue?")) {
          document.getElementById("DeleteButton").click()
          }
		}
		//used on ManageRequest.aspx & on Feedback.aspx to limit size of textareas/multilined textboxes
		function textCounter(field, maxlimit) {
		if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		}
		
		// used on admin\RequestView.aspx to change number of listings per page
		function ChangePAROListings(NoPerPage) {
		//determine if there is an existing sorting order
		tmp = window.location.search;
		whereIS = tmp.indexOf("sort=");
		sort="";
		if (whereIS >0) {
		whereIS = whereIS + 5; //5 represents the 5 chars of "sort="
		sort = tmp.substring(whereIS,whereIS+3);
		sort = "sort=" + sort + "&"
		}
		//determine the number of listing selected
		NoPerPage = "listing=" + NoPerPage;
		//redirect to the new url with sorting & listing
		window.location = "RequestView.aspx?" + sort + NoPerPage
		}
		
		
		//generic call to popup a window with 
		function winpopup(url,name,properties,w,h)
		{
		//w = width of window to center
		//h = height
		//var properties= 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,';
		
		var winl = (screen.width-w)/2;
		var wint = ((screen.height-h)/2)-(30);
		    properties +='height='+h+',';
		   properties +='width='+w+',';
		   properties +='top='+wint+',';
		    properties +='left='+winl+',';

		    newwindow=window.open(url,name,properties)
            if (window.focus) {newwindow.focus()}
		        return false;
		}
