var popupLinkConfig = new Array;



//for ALL links to kimptonhotels.com

popupLinkConfig["kimpton"]    = new Array ( "", "width=1000,height=660,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");



//for ALL links to Netbooker

popupLinkConfig["netbooker"]    = new Array ( "", "width=820,height=710,scrollbars=yes,resizable=yes,status=no,toolbar=yes,location=no,menubar=no");



//for links to all other 3rd party sites

popupLinkConfig["newsite"]    = new Array ( "", "width=1000,height=660,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");



//for links to the Reservator

popupLinkConfig["reservator"]    = new Array ( "", "width=800,height=720,scrollbars=yes,resizable=yes,status=no,toolbar=no,location=no,menubar=no");



//for Air Car Hotel links

popupLinkConfig["aircarhotel"]    = new Array ( "", "width=820,height=595,scrollbars=yes,resizable=yes,status=no,toolbar=yes,location=no,menubar=no");



//for gift certificate link

popupLinkConfig["gift"]    = new Array ( "", "width=770,height=780,scrollbars=yes,resizable=yes,status=no,toolbar=yes,location=no,menubar=no");



//for best rate guarantee

popupLinkConfig["bestrate"]    = new Array ( "", "width=1000,height=660,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");



//for Open Table reservations link

popupLinkConfig["opentable"]    = new Array ( "", "width=792,height=405,scrollbars=yes,resizable=yes,status=no,toolbar=yes,location=no,menubar=no");



//Brandbar links

popupLinkConfig["brandlinksmall"]    = new Array ( "", "width=785,height=500,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=no,menubar=yes");

popupLinkConfig["brandlink"]    = new Array ( "", "width=1000,height=660,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");

popupLinkConfig["brandlinkmedium"]    = new Array ( "", "width=870,height=670,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");



// popupLinkConfig["classname"] = new Array ( "targetname", "width=550,height=350,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");

//popupLinkConfig["popup"]    = new Array ( "", "width=350,height=450,scrollbar=yes,menubar=yes");

//popupLinkConfig["glossary"] = new Array ( "help", "width=550,height=350,resizable=yes");



// ==========================================================================

window.onload = initPage;  

// Note: Make sure that no other javscripts assign a fuction to window.onload

// There can be only one function tied to window.onload at a time.



function initPage() {

  initPopupLinks();

  initDateFields();

  // initDateFields();

  // place here any other code you wish to run when the page loads.

}



function initPopupLinks()

{

  if (!document.getElementsByTagName) return true;

  var pageLinks = document.getElementsByTagName("a");

  for (var i = 0; i < pageLinks.length; i++) 

  {

    if (((pageLinks[i].className != null) && 

         (pageLinks[i].className != "")) ||

        ((pageLinks[i].parentNode.className != null) && 

         (pageLinks[i].parentNode.className != "")))

    {

      var linkClass = " " + pageLinks[i].className + " ";

      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))

      {

        linkClass = " " + pageLinks[i].parentNode.className + " ";

      }

      for (var theKey in popupLinkConfig) 

      {

        if (linkClass.indexOf(" " + theKey + " ") > -1)

        {

          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))

          {

            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;

          }

          pageLinks[i].settings = popupLinkConfig[theKey][1];

          pageLinks[i].onclick = popUp;

        }

      }

    }

  }

  return true;

}



function popUp()

{

  newWin = window.open(this.href, this.target, this.settings);

  newWin.focus();

  return false;

}

