// common functions for the real estate site

function showtocX()
{
//-- example
//  showTOCColumns(justify, numcol, fontsize, fontname, tocArr, inpercent, h, w, bgcolor, bgimg, 
//			border, yes_image, yes_text, spacing, yes_link)      

   showTOCColumns(1, 1, 0, null, tocArr, false, 0, 0, "", "", 
			1, false, true, 0, true)
}

function showTocBottom()
{
//   showTOCTextHorizontal(justify, breakat, fontsize, tocArr)
   showTOCTextHorizontal(2, 6, 2, tocArr)
}

function showtocpics()
{
   showTOCColumns(1, 1, 0, null, tocArr, false, 0, 0, "", "", 
			3, true, true, 0, true)

}


function displayRight(panoObj, startid)
{
   document.write("<b>Panoramic (move around the room)</b><br>")
   showPanoButtons(panoObj, true)
   showPano(panoObj, startid, false)
   loadPanoImages(panoObj)
}

function createPanoObj(name, num_x, num_y, cont_x, cont_y, start_x, start_y, width, height, alt, img_src_arr)
{
  var panoObj = new clickPanoramaObj(name, num_x, num_y, cont_x, cont_y, start_x, start_y, width, height, alt)
  var str
  var x_idx
  var y_idx
  var img_idx = 0

  if (num_y < 1)
    num_y = 1

  for (y_idx = 0; y_idx < num_y; y_idx++)
  {
    for (x_idx = 0; x_idx < num_x; x_idx++)
    {
      if (img_idx < img_src_arr.length)
        addPanoImage(panoObj, img_src_arr[img_idx++])
    }
  }

  return panoObj
}

