//*********************************************************************
//
// Featured Homes HTML
//
// Copyright (c) 2009, MFM Software, Inc.
//
//*********************************************************************
//
// fhMakeHtml.js
// $Id: efhMakeHtml.js,v 1.3 2009/12/23 15:46:02 lbettag Exp $
//
// This function creates the HTML for each featured home block and
// is intended to be over ridden
//
//*********************************************************************
//
// Tell jsjam.pl to not change these identifier and function names
//
// jsjam-keep:makeEFHHtml
// jsjam-keep:feathomes
// jsjam-keep: addCommas
//
//*********************************************************************

// This is the over ride function
// If I was being really rigorous, I could
// probably use a div as a template,
// clone it & replace elements in the cell

function makeEFHHtml(num)
{
  var fhHtml = "";

  if (num <= efhList.length)
  {
    fhHtml += '<a href="displaylist.asw?listnum=' + feathomes[num]['listnum'] + '&mls=' + feathomes[num]['mls'] + '" target="_top">';
    fhHtml += '<img class="efhthumb" src="' + feathomes[num]['photo_thumb'] + '"></a><br />';
    fhHtml += ' <span class="fhSuburb">' + feathomes[num]['suburb'] + '</span><br />\n';
    fhHtml += feathomes[num]['bedrooms'] + ' Beds, \n';
    fhHtml += (parseInt(feathomes[num]['full_baths']) + parseInt(feathomes[num]['part_baths'])) + ' Baths<br />\n';
    fhHtml += '$' + addCommas(feathomes[num]['listprice']) + '<br />\n';
    
    if (seen[num] == false)
    {
      efhcounter(feathomes[num],'')
      seen[num] = true;
    }
  }
  
  return fhHtml;
}
