
      

// START reservationutils.js

var lf = {};

lf["-ARL"]  = "971" ;   //   Arlington - ALL:
lf["-AXV"]  = "1007" ;   //   Alexandria - ALL:
lf["-ASE"]  = "106" ;   //    Aspen - ALL:
lf["-ATL"]  = "5065" ;   //   Atlanta - ALL:
lf["-BLT"]  = "5075" ;   //    Baltimore - ALL:
lf["-BOS"]  = "113" ;   //    Boston - ALL:
lf["-BOS"]  = "117" ;   //    Cambridge - ALL:
lf["-CHI"]  = "119" ;   //    Chicago - ALL:
lf["-CUP"]  = "125" ;   //    Silicon Valley - ALL:
lf["-DAL"]  = "744" ;   //    Dallas - ALL:
lf["-DEN"]  = "127" ;   //    Denver - ALL:
lf["-FSW"]  = "171" ;   //    SF Fish. Wharf - ALL:
lf["-LOS"]  = "2774" ;   //   Los Angeles - ALL:
lf["-MIA"]  = "123" ;   //    Miami - ALL:   
lf["-NYC"]  = "131" ;   //    New York - ALL:                  
//lf["-MSY"]  = "129" ;   //    New Orleans - ALL:
lf["-PDX"]  = "133" ;   //    Portland - ALL:
lf["-PHL"]  = "5458" ;   //   Philadelphia - ALL:
lf["-SAN"]  = "138" ;   //    San Diego - ALL:
lf["-PHX"]  = "669" ;   //    Scottsdale - ALL:
lf["-SEA"]  = "156" ;   //    Seattle - ALL:
lf["-SFO"]  = "140" ;   //    San Francisco - ALL:
lf["-SLC"]  = "136" ;   //    Salt Lake City - ALL:
lf["-VER"]  = "4607" ;   //    Vero Beach, FL - ALL:
lf["-DCA"]  = "162" ;   //    Washington D.C. - ALL:
//lf["-WHIS"] = "169" ;   //    BC Whistler - ALL:
lf["-YVR"]  = "160" ;   //    BC Vancouver - ALL:
lf["ALG"]   = "120" ;   //   - Hotel Allegro
lf["ALM"]   = "2514" ;   //   - Hotel Monaco Alexandria
lf["ALX"]   = "159" ;   //   - Hotel Alexis
lf["ARG"]   = "141" ;   //   - Argonaut Hotel
lf["ARP"]   = "1987" ;   //   - Hotel Palomar Arlington
lf["ASP"]   = "107" ;   //   - Sky Hotel
lf["ATP"]   = "5066" ;   //  - Hotel Palomar Atlanta
lf["BUR"]   = "121" ;   //   - Hotel Burnham
lf["CLO"]   = "651" ;   //   - FireSky Resort & Spa
lf["CHP"]   = "5505" ;   //   - Hotel Palomar Chicago
lf["CMN"]   = "122" ;   //   - Hotel Monaco Chicago
lf["CYP"]   = "126" ;   //   - Cypress Hotel
lf["DCM"]   = "166" ;   //   - Hotel Monaco DC
lf["DCP"]   = "530" ;   //   - Hotel Palomar Washington DC
lf["DLP"]   = "745" ;   //   - Hotel Palomar Dallas
lf["DMN"]   = "128" ;   //   - Hotel Monaco Denver
lf["EPC"]   = "4235" ;   //   - EPIC Hotel
lf["FAS"]   = "134" ;   //   - Hotel Monaco Portland
lf["GRG"]   = "163" ;   //   - Hotel George
lf["HCT"]   = "144" ;   //   - Harbor Court Hotel
lf["HEL"]   = "164" ;   //   - Helix Hotel
lf["INK"]   = "5413" ;   //   - INK48
lf["LRN"]   = "4731" ;  //   - Lorien Hotel & Spa
lf["LUM"]   = "1670" ;  //   - Hotel Lumen
lf["LWP"]   = "2775" ;  //   - Hotel Palomar Westwood
lf["MAD"]   = "165" ;   //   - Madera Hotel
//lf["MAY"]   = "124" ;   //   - Mayfair Hotel & Spa
lf["MLW"]   = "118" ;   //   - Hotel Marlowe
//lf["MNT"]   = "148" ;   //   - Monticello Inn
lf["MNB"]   = "5076" ;   //   - Hotel Monaco Baltimore
lf["MON"]   = "145" ;   //   - Hotel Monaco San Francisco
lf["MRR"]   = "1008" ;   //  - Morrison House
lf["MSE"]   = "678" ;   //   - The Muse Hotel
lf["NNZ"]   = "770" ;   //   - Nine Zero Hotel
//lf["NOM"]   = "130" ;   //   - Hotel Monaco New Orleans
lf["ONX"]   = "116" ;   //   - Onyx Hotel
lf["PAL"]   = "146" ;   //   - Hotel Palomar San Francisco
lf["PHP"]   = "5459" ;   //  - Hotel Palomar Philadelphia
lf["PPH"]   = "161" ;   //   - Pacific Palisades Hotel
lf["PRS"]   = "149" ;   //   - Prescott Hotel
lf["RGE"]   = "167" ;   //   - Hotel Rouge
lf["SER"]   = "150" ;   //   - Hotel Serrano
lf["SFD"]   = "151" ;   //   - Sir Francis Drake Hotel
lf["SLM"]   = "137" ;   //   - Hotel Monaco Salt Lake City
lf["SMN"]   = "157" ;   //   - Hotel Monaco Seattle
lf["SOL"]   = "139" ;   //   - Hotel Solamar
lf["SPA"]   = "132" ;   //   - 70 Park Avenue Hotel 
//lf["SUM"]   = "170" ;   //   - Summit Lodge
lf["TPZ"]   = "168" ;   //   - Hotel Topaz
lf["TRI"]   = "147" ;   //   - Hotel Triton
//lf["VFL"]   = "152" ;   //   - Villa Florence
lf["VPK"]   = "158" ;   //   - Hotel Vintage Park
lf["VPZ"]   = "135" ;   //   - Hotel Vintage Plaza
//lf["VHT"]   = "3699" ;   //   - VU hotel
lf["VRB"]   = "4608" ;   //   - Vero Beach Hotel & Spa
//lf["DUP"]   = "255" ;   //   - Dupont Circle Hotel
                 
function hashCheckKey(key)
		{
    var value = "100";
    for (var i in lf) 
    	{
      if (i == key && lf[i] != null) 
        {
        value = lf[i];
        break;
        }
    	}
    return value;
		}
			
	
function getFID()
	{
		if( typeof(FGID) !="undefined"  )    
			{
	//		alert("heres FGID: " + FGID);
			
			//Check if number greater than 0
	     myRegExp = /[0-9]+/g
      if(myRegExp.test(FGID)) 
    		{
    		if ( FGID != "0") //ok, got a logged in user, now check type
    			 { 
    			 if ( checkValidUserType() ) 			return FGID;
    		   else return "";
    		   }	
			  }	 
			}  
			return "";
	}    	
	
	
	function checkValidUserType()
		{
		if( typeof(FGTYPE) !="undefined"  )    
			{
	//		alert("heres FGTYPE: " + FGTYPE);
			//FGTYPE is a copy of profiletype from session..
			if ( FGTYPE == "NotEnrolled" )  	return false;
			else                    		    	return true;
			
			}	 
		else
			{
			return false;
			}
		}	

	

function GoPropertySpecial(propertyCode , specialCode )
		{
    
		//FID NEEDS TO BE SET IN ASPX PAGE
		
		var newurl1 = "https://kimpton.ibe.netbooker.com/web/FrontController.nb4?" + 
		"module"                 + "=" +     "PropertySearch"             + "&" +           
		"operation"              + "=" +     "SinglePropertySearch"       + "&" +           
		"execute"                + "=" +     "yes"                        + "&" +           
		"propertyCodeType"       + "=" +     "RV"                         + "&" +           
		"chainCode"              + "=" +     "KC"                         + "&" +           
		"instanceId"             + "=" +     "31"                         + "&" +           
		"propertyCode"           + "=" +     propertyCode                 + "&" +           
		//"adults"               + "=" +     adults                       + "&" +           
		//"children"             + "=" +     children                     + "&" +           
		//"numberOfRooms"        + "=" +     "1"                          + "&" +           
		//"promotionCode"        + "=" +     ""                           + "&" +           
		//"rateCode"             + "=" +     ""                           + "&" +           
		//"corporateId"          + "=" +     ""                           + "&" +           
		//"travelAgentId"        + "=" +     ""                           + "&" +           
		//"arriveDate"           + "=" +     startDay                     + "&" +           
		//"arriveMonth"          + "=" +     startMonth                   + "&" +           
		//"arriveYear"           + "=" +     startYear                    + "&" +           
		//"departDate"           + "=" +     departDay                    + "&" +           
		//"departMonth"          + "=" +     departMonth                  + "&" +           
		//"departYear"           + "=" +     departYear                   + "&" +           
//		"specialRate"            + "=" +     specialCode                  + "&" +           
		//"numberofnights"       + "=" +     numNights                    + "&" +           
		"lookAndFeelId"          + "=" +     hashCheckKey(propertyCode)   + "&" +   
		"frequentGuestId"        + "=" +     getFID()                         ;

  window.open(newurl1,"Reservations","toolbar=no,width=795,height=705,status=no,scrollbars=yes,directories=no,resizable=yes,menubar=no");

	
		}
		
// DATE CODE

 var monthName = new Array ("January", "February", "March", "April", "May",
"June", "July", "August", "September", "October", "November", "December");
 var dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday");
 var calendarCtrlStrings = new Array ("","","Close");
 
 
function Launch(page) { OpenWin = this.open(page, "KirupaStyle", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=800,height=600"); } 
function Launch_hotel(page) { OpenWin = this.open(page, "KirupaStyle", "toolbar=yes,menubar=yes,location=no,scrollbars=yes,resizable=yes,width=820,height=600"); } 
