/* [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 theSitetree=[ 
	['PAGE','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],''],
	['PAGE','2052',jdecode('Attractions'),jdecode(''),'/2052.html','true',[],''],
	['PAGE','2073',jdecode('Enquiries'),jdecode(''),'/2073.html','true',[],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Notice';
theSitetree.paletteFamily='445EBE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10488';
theSitetree.graphicsetId='11046';
theSitetree.contentColor='505050';
theSitetree.contentBGColor='EADFCE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Notice',
				paletteFamily: 	'445EBE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10488',
				graphicsetId: 	'11046',
				contentColor: 	'505050',
				contentBGColor: 'EADFCE',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'F9F9F9',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'B61F1F',
				e_color: 		'B61F1F',
				f_color: 		'B61F1F',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-1487']={
webappId:    '7008',
documentId:  '2073',
internalId:  '1487',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100518-081728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20090914-114319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20090914-113807'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2001',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2052',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2073',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cm4all.netfirms.com';
var accountId     = 'ANFI10INXHCU';
var companyName   = 'LAURA%27S+VILLAS';
var htmlTitle	  = 'Laura%27s+Villas+at+Regal+Palms+Orlando+Florida%2C+Close+to+Disney+and+Major+Attractions';
var metaKeywords  = 'Florida+vacation+homes%2C+Vacation+homes%2C+Vacation+rentals%2C+vacation+home+rental%2C++Florida+Disney+Rental%2C+Orlando+vacation+homes%2C+Regal+Palms+Resort+amp%3B+Spa+Attractions%2C+Regal+Palms+Resort+amp%3B+Spa+Reservations%2C+Regal+Palms+florida%2C+villa%2C+villas%2C+holiday+villa%2C+disney%2C+disney+delight%2C+regal+palms%2C+regal%2C+resort%2C+Regal+Palms+Resort%2C+Florida%2C+rental%2C+townhouse%2C+vacation%2C+Orlando%2C+Regal+Resort%2C+Regal+Palms+Resort+near+Walt+Disney%2C+disney+vacation%2C+Regal+Palms+Resort+and+Spa%2C+Florida+rental+near+disney%2C+Orlando+Florida%2C+highland+reserve%2C+highland+reserve+golf+club%2C+golf%2C+golf+club%2C+Florida+Golf+Course%2C+florida+golf+resort%2C+disney+world%2C+disney+vacation%2C+lodging%2C+disney+lodging%2C+orlando+lodging%2C+disney+vacation+lodging%2C+Regal+Palms+Resort+amp%3B+Spa%2C+Regal+Palms+Resort+amp%3B+Spa+Orlando%2C+Regal+Palms+Resort+amp%3B+Spa+in+Orlando%2C+Regal+Palms+Resort+amp%3B+Spa+Villa+Reservations%2C+Regal+Palms+Resort+amp%3B+Spa+Reservation%2C+Regal+Palms+Resort+amp%3B+Spa+Discount%2C+Regal+Palms+Resort+amp%3B+Spa+Villa+Rates%2C+Regal+Palms+Resort+amp%3B+Spa+Information%2C+vacation+rental%2C+vacation+rentals+by+owner%2C+vacation+home%2C+vacation+home+rental%2C+Davenport%2C+FL';
var metaContents  = 'Regal+Palms+is+a+perfect+environment+for+guests+looking+for+an+Orlando+vacation+with+a+home+away+from+home+feel.++Located+just+15+minutes+SW+of+Disney+World.+The+resort+has+its+own+waterpark%2C+slide%2C+lazy+river%2C+arcade%2C+gym%2C+restaurant+%28in%2Foutdoor%29%2C+sports+bar+w%2Fentertainment.';
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();
};
