// Establish type of browser, prepare for tabbed navigation etc.

var ie = 0;
var n = document.layers ? 1 : 0
var N6 = (document.getElementById && !document.all) ? true : false;

if (N6)
{
  ie = 0;  
  n = 1;
}

if(!n)
{
  ie = document.all ? 1 : 0
}

function checkIE()
{
  ie = 0;
  n = document.layers ? 1 : 0;
  var N6 = (document.getElementById && !document.all) ? true : false;
  if (N6)
  {
    ie = 0;  
    n = 1;
  }
  if(!n) {
    ie = document.all ? 1 : 0;
  }
  return(ie);
}

var oChange;

function makeObj(obj, nest)
{
  nest = !nest ? '' : 'document.'+nest+'.';
  if (N6)
  {
    var myobj = document.getElementById(obj);
    this.style = myobj.style;
    this.style.top = gettop(myobj);
  }
  else
  {
    this.css = n ? eval(nest+'document.'+obj) : eval('document.all.'+obj+'.style');
    this.top = oldgettop;
  }
  return this;
}

function oldgettop()
{
  var getleft = n ? eval(this.css.top) : eval(this.css.pixelTop);
  return getleft;
}

function gettop(theobj)
{
  var getleft;
  if(N6)
  {
    getleft = theobj.style.top; 
  }
  else
  {
    getleft = n ? eval(theobj.css.top) : eval(theobj.css.top);
  }
  return getleft;
}

 function save_hotel(hotl_id)
 {
   var url = "/xbook/servlet/SaveHotel?hotl_id=" + hotl_id;
   var win = window.open(url,'SaveHotel','height=250,width=350,scrollbars=no,toolbar=no');
   win.focus();
 }


// Init stuff for top tabbed bar.
function init()
{
  // No longer used. Used to do the changeActive/divContainer
  // stuff for highlighting different tabs. Kept in case there
  // are still web pages which call it. By the way, this function
  // should probably not have been called init(), which is too
  // general a name. init_tb() or something to indicate it's
  // purpose would have been better. We learn from our mistakes.
}
function changeActive()
{
  // Similar story. Not used any more but still called from
  // Splurge pages. So we'll keep an empyty version until
  // the Splurge pages have time to catch up.
}
//Specials Pop Up

var doPopUpX = (screen.width/2)-150;
var doPopUpY = (screen.height/2)-200;
var pos = "left="+doPopUpX+",top="+doPopUpY;

function doPopUp(){
doPopUpWindow = window.open("/promotions/specials-pop.htm","George","location=no,directories=no,toolbar=no,menubar=no,status=yes,scrollbars=no,resizable=no,dependent=yes,width=420,height=340,"+pos);
}

function doPopUpltd(){
doPopUpWindow = window.open("/promotions/specials-pop-limited.htm","Paul","location=no,directories=no,toolbar=no,menubar=no,status=yes,scrollbars=no,resizable=no,dependent=yes,width=420,height=395,"+pos);
}