/*
 * Copyright 2004, Peter Rowntree. All Rights Reserved.
 * http://www.hdyn.com/wr/common/contact.php?addr=pr
 */
 
//errMsg is the content of the confirm (if allowFallback),
//or the alert (if not)
function openNewURLWindow(url,wName,props,allowFallback,ask,errMsg)
{
   var w = window.open(url,wName,props);
   if(w == null)
   {
      if(allowFallback)
      {
         if(!ask || confirm(errMsg))
         {
            window.location.href=url;
            return window;
         }
      }
      else
         alert(errMsg);
      return null; 
   }
   return w;
}

function tBCore(subpath,src,qStrComponent)
{
   var s=".*"+subpath+"(.*)\\.jpg";
   var regex=new RegExp(s);
   var qStr="?"+qStrComponent+"="+src.replace(regex,"$1");
   var w=openNewURLWindow("big.html"+qStr,"com_reserveatsantafe_1","",true,false,"");
   if(w != null)
      w.focus();
}

function toBig()
{
   var targetOb=document.getElementById('fpBox');
   if(targetOb == null || typeof targetOb.src == "undefined" || targetOb.src == "")
      return;
   tBCore("images/i",targetOb.src,"i");
}

function toBigMore(r,c)
{
   var src=r+""+c;
   tBCore("images/more/",src,"more");
}