//*********************************************************************
//
// Featured Homes HTML
//
// Copyright (c) 2009, MFM Communication Software, Inc.
//
//*********************************************************************
//
// fhMakeHtml.js
// $Id: fhMakeHtml.js,v 1.9 2010/03/17 17:05:36 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:makeFHHtml
// 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 makeFHHtml(num)
{
  var fhHtml = "";
  //fhHtml = '<span class="fhSuburb">' + feathomes[num]['suburb'] + '</span><br />\n';
  //fhHtml += '&#149; ' + feathomes[num]['bedrooms'] + ' Bedrooms<br />\n';
  //fhHtml += '&#149; ' + (parseInt(feathomes[num]['full_baths']) + parseInt(feathomes[num]['part_baths'])) + ' Bathrooms<br />\n';
  //fhHtml += '&#149;  $' + addCommas(feathomes[num]['listprice']) + '<br />\n';
  
  var listprice = addCommas(feathomes[num]['listprice']);
  
  fhHtml = '<tr>\n';
  fhHtml += '  <td align="center">\n';
  fhHtml += '    <a href="/displaylist.asw?listnum=' + feathomes[num]['listnum'] + '&mls=' + feathomes[num]['mls'] + '&rd=' + num + '"><img src="' + feathomes[num]['photo'] + '" width="130" height="90" border="2" hspace="4"></a>\n';
  fhHtml += '  </td>\n';
  fhHtml += '  <td class="smfont">\n';
  fhHtml += '    <b>Located in <font color="red">' + feathomes[num]['suburb'] + '</font></b><br>\n';
  //fhHtml += '    <b>Listing Price:</b> $' + feathomes[num]['listprice'] + '<br>\n';
  fhHtml += '    <b>Listing Price:</b> $' + listprice + '<br>\n';
  fhHtml += '    <b>Beds:</b> ' + feathomes[num]['bedrooms'] + ' &nbsp;&nbsp;&nbsp;<b>Baths:</b>\n';
  fhHtml += '    ' + feathomes[num]['full_baths'] + '-' + feathomes[num]['part_baths'] + '\n';
  fhHtml += '  </td>\n';
  fhHtml += '</tr>\n';
  
  return fhHtml;
}
