/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','4901',jdecode('Home'),jdecode(''), jdecode('%2F4901.html'), 'true',[],'',''],
	['PAGE','27301',jdecode('Home+Exterior'),jdecode(''), jdecode('%2F27301.html'), 'true',[],'',''],
	['PAGE','28001',jdecode('Holidays%21'),jdecode(''), jdecode('%2F28001.html'), 'true',[],'',''],
	['PAGE','5990',jdecode('Great+Room'),jdecode(''), jdecode('%2F5990.html'), 'true',[],'',''],
	['PAGE','5969',jdecode('Kitchen'),jdecode(''), jdecode('%2F5969.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('Dining+Room'),jdecode(''), jdecode('%2F15701.html'), 'true',[],'',''],
	['PAGE','5948',jdecode('Game%2FTV+Room'),jdecode(''), jdecode('%2F5948.html'), 'true',[],'',''],
	['PAGE','5843',jdecode('Bedrooms'),jdecode(''), jdecode('%2F5843%2Findex.html'), 'true',[ 
		['PAGE','5864',jdecode('Master+%231'),jdecode(''), jdecode('%2F5843%2F5864.html'), 'true',[],'',''],
		['PAGE','5885',jdecode('Master+%232'),jdecode(''), jdecode('%2F5843%2F5885.html'), 'true',[],'',''],
		['PAGE','5906',jdecode('Bedroom+%233'),jdecode(''), jdecode('%2F5843%2F5906.html'), 'true',[],'',''],
		['PAGE','5927',jdecode('Bedroom+%234'),jdecode(''), jdecode('%2F5843%2F5927.html'), 'true',[],'','']
	],'',''],
	['PAGE','5822',jdecode('Home+-+Floor+Plan'),jdecode(''), jdecode('%2F5822.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('Amentities'),jdecode(''), jdecode('%2F12101.html'), 'true',[],'',''],
	['PAGE','5701',jdecode('OG+Resort'),jdecode(''), jdecode('%2F5701%2Findex.html'), 'true',[ 
		['PAGE','6201',jdecode('The+Pavilion'),jdecode(''), jdecode('%2F5701%2F6201.html'), 'true',[],'',''],
		['PAGE','5801',jdecode('Golf'),jdecode(''), jdecode('%2F5701%2F5801.html'), 'true',[],'',''],
		['PAGE','35301',jdecode('Shuttle+Schedule'),jdecode(''), jdecode('%2F5701%2F35301.html'), 'true',[],'','']
	],'',''],
	['PAGE','20501',jdecode('Ski+Resorts'),jdecode(''), jdecode('%2F20501%2Findex.html'), 'true',[ 
		['PAGE','6011',jdecode('Northstar-At-Tahoe'),jdecode(''), jdecode('%2F20501%2F6011.html'), 'true',[],'',''],
		['PAGE','20522',jdecode('Squaw+Valley+USA'),jdecode(''), jdecode('%2F20501%2F20522.html'), 'true',[],'',''],
		['PAGE','20543',jdecode('Alpine+Meadows'),jdecode(''), jdecode('%2F20501%2F20543.html'), 'true',[],'','']
	],'',''],
	['PAGE','24401',jdecode('Activities'),jdecode(''), jdecode('%2F24401.html'), 'true',[],'',''],
	['PAGE','11201',jdecode('Directions'),jdecode(''), jdecode('%2F11201%2Findex.html'), 'true',[ 
		['PAGE','18801',jdecode('Tahoe+Map'),jdecode(''), jdecode('%2F11201%2F18801.html'), 'true',[],'',''],
		['PAGE','19601',jdecode('Old+Greenwood+Map'),jdecode(''), jdecode('%2F11201%2F19601.html'), 'true',[],'','']
	],'',''],
	['PAGE','11501',jdecode('Lodge+Brochures'),jdecode(''), jdecode('%2F11501.html'), 'true',[],'',''],
	['PAGE','18301',jdecode('Guest+Comments'),jdecode(''), jdecode('%2F18301.html'), 'true',[],'',''],
	['PAGE','14001',jdecode('Contact+Us'),jdecode(''), jdecode('%2F14001.html'), 'true',[],'',''],
	['PAGE','6222',jdecode('Lodging+Rates'),jdecode(''), jdecode('%2F6222.html'), 'true',[],'',''],
	['PAGE','37301',jdecode('Specials'),jdecode(''), jdecode('%2F37301.html'), 'true',[],'',''],
	['ITEM','32701',jdecode('BOOK+NOW'),jdecode(''), jdecode('http%3A%2F%2Foldgreenwoodlodge.com%2F26101.html'), 'true',[],'',''],
	['PAGE','6243',jdecode('Availability'),jdecode(''), jdecode('%2F6243.html'), 'false',[],'',''],
	['PAGE','5501',jdecode('Photos'),jdecode(''), jdecode('%2F5501.html'), 'false',[],'',''],
	['PAGE','6264',jdecode('Weather'),jdecode(''), jdecode('%2F6264.html'), 'false',[],'',''],
	['PAGE','30501',jdecode('Calendar'),jdecode(''), jdecode('%2F30501.html'), 'false',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='F0F1D8';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10350';
theSitetree.graphicsetId='10473';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'cutout',
				paletteFamily: 	'F0F1D8',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10350',
				graphicsetId: 	'10473',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-71b9d811fd0e31d742a351382201a743']={
webappId:    '7060',
documentId:  '5501',
internalId:  '71b9d811fd0e31d742a351382201a743',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20110730-184842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20101114-121210'
};
webappMappings['7080']=webappMappings['7080-1068']={
webappId:    '7080',
documentId:  '6264',
internalId:  '1068',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6264',
internalId:  '',
customField: '20101115-013150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5822',
internalId:  '',
customField: '20101121-223432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5843',
internalId:  '',
customField: '20101116-184206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5864',
internalId:  '',
customField: '20101116-190540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5885',
internalId:  '',
customField: '20101115-152907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5906',
internalId:  '',
customField: '20101115-154237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5927',
internalId:  '',
customField: '20101123-234240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5948',
internalId:  '',
customField: '20101211-194500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5969',
internalId:  '',
customField: '20101127-220206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5990',
internalId:  '',
customField: '20101125-160039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20101116-152629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20101228-193433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20110815-224355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6011',
internalId:  '',
customField: '20101122-164008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6222',
internalId:  '',
customField: '20111124-200841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20101126-151137'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20111124-201000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20101115-132648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20101228-193351'
};
webappMappings['7008']=webappMappings['7008-21148']={
webappId:    '7008',
documentId:  '14001',
internalId:  '21148',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-10028114']={
webappId:    '1501',
documentId:  '4901',
internalId:  '10028114',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20101215-125959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20101211-194253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20110222-225249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20101228-193811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20101121-220331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20101228-193548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20522',
internalId:  '',
customField: '20101123-224552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20543',
internalId:  '',
customField: '20101123-223742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20101201-181642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20101228-192946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20101129-000947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20101211-193618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20101129-160821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37301',
internalId:  '',
customField: '20111125-194734'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I71ZD9';
var companyName   = 'The+Lodge+at+Old+Greenwood+Resort+-+Lake+Tahoe%2C+CA';
var htmlTitle	  = 'The+Lodge+at+Old+Greenwood+Resort+-+Lake+Tahoe%2C+Truckee+CA';
var metaKeywords  = 'Old+Greenwood+Rental%2C+Resort%2C+lodge+at+fairway+drive%2C+Lake+Tahoe%2C+Truckee%2C+CA%2C+Golf%2C++Northstar+Skiing';
var metaContents  = 'Luxury+Resort+Rental+Home+-+Clean%2C+Bright+%26+Cheery+-++Lake+Tahoe+-++Northstar+Skiing+-+New+Home+-+New+Furniture';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

