function dispLoc(inHref, hideRequest) 
// Given a string of <a href...>text</a><a href...>text</a> - breaks it apart and displays locations
// hideRequest is an optional parameter that can be set with Reserves
{
//   document.write('<td>');
   var convHref = inHref.replace(/<br>/ig,'');
   if (convHref != '') {
      var aList = convHref.split(/<\/a>/i);
      var isEABook = false, firstLink = '';

      // display only the first 4 locations
      var maxList = 4;
      if (aList.length < maxList) 
      {
         maxList = aList.length;
      }
     
      var outStr = '';
      var writeHead = true;
      for (var i = 0; i < maxList; i++)
      {
         if (writeHead) {
            document.write('<tr><td></td><td align=\"left\"><table style=\"padding: 0px 2px 0px 0px\">');
            writeHead = false;
         }
         var collection = '', location = '', callNumber = ''
         var outURL = getUrlFromHref(aList[i] + '</a>');

         if ((outURL != '') && (firstLink == ''))
         // Need a link to use for display list of holdings
         {
            firstLink = outURL;
            var inSub = queryString('sub_library', firstLink);
            firstLink = firstLink.replace(inSub, '');
         }

         var urlText = getDescFromHref(aList[i] + '</a>');

         outStr += splitLocStr(outURL, urlText,'&nbsp;')
      }
      isEABook = outStr.match(/ebooks|eaudiobooks|web resources|electronic video|emusic/i);
      if (!isEABook)
      {
         document.write('<tr><td colspan="3">Click on College/Campus for Availability');
         if (hideRequest) {
            document.write('.');
         } else {
	    document.write(' or to Request item.');
	 }
	 document.write('</td></tr>');

      }
      document.write(outStr);
      if ((aList.length > 4) && (firstLink != ''))
      {
         if (isEABook) {
            document.write('<tr><td colspan="3">Click on Title for full list of College/Campus Holdings</td></tr>');
         } else {
            document.write('<tr><td colspan="3"><a href="' + firstLink + '" title="Full List of Holdings">Full List of Holdings</a></td></tr>');
         }
      }
      if (!writeHead) {
        document.write('</table></td></tr>');
      }
      
   }   
} // end function dispLoc
