/* [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','3601',jdecode('Home'),jdecode(''), jdecode('%2F3601.html'), 'true',[],'',''],
	['PAGE','13201',jdecode('RestaCumme+in+America'),jdecode(''), jdecode('%2F13201.html'), 'true',[],'',''],
	['PAGE','16101',jdecode('washington+dc'),jdecode(''), jdecode('%2F16101.html'), 'true',[],'',''],
	['PAGE','15101',jdecode('montgomery+county+maryland'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'',''],
	['PAGE','15401',jdecode('philadelphia+delaware+valley'),jdecode(''), jdecode('%2F15401.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('filadelfia'),jdecode(''), jdecode('%2F15701.html'), 'true',[],'',''],
	['PAGE','16501',jdecode('new+york'),jdecode(''), jdecode('%2F16501.html'), 'true',[],'',''],
	['PAGE','4222',jdecode('Vacation+Rentals'),jdecode(''), jdecode('%2F4222.html'), 'true',[],'',''],
	['PAGE','13222',jdecode('RestaCumme+in+Italia'),jdecode(''), jdecode('%2F13222.html'), 'true',[],'',''],
	['PAGE','19001',jdecode('rome+tours'),jdecode(''), jdecode('%2F19001.html'), 'true',[],'',''],
	['PAGE','17764',jdecode('pompeii+%26+paestum+tours'),jdecode(''), jdecode('%2F17764.html'), 'true',[],'',''],
	['PAGE','17701',jdecode('cilento'),jdecode(''), jdecode('%2F17701.html'), 'true',[],'',''],
	['PAGE','17722',jdecode('food+%26+wine+%3A+gastronomia'),jdecode(''), jdecode('%2F17722.html'), 'true',[],'',''],
	['PAGE','18001',jdecode('ecotours'),jdecode(''), jdecode('%2F18001.html'), 'true',[],'',''],
	['PAGE','18085',jdecode('archeology+%26+nature'),jdecode(''), jdecode('%2F18085.html'), 'true',[],'',''],
	['PAGE','18022',jdecode('coastal+trails'),jdecode(''), jdecode('%2F18022.html'), 'true',[],'',''],
	['PAGE','18064',jdecode('mountains+by+the+sea'),jdecode(''), jdecode('%2F18064.html'), 'true',[],'',''],
	['PAGE','18043',jdecode('inland+mountains'),jdecode(''), jdecode('%2F18043.html'), 'true',[],'',''],
	['PAGE','17743',jdecode('caiazzo'),jdecode(''), jdecode('%2F17743.html'), 'true',[],'',''],
	['PAGE','18301',jdecode('eno-gastronomia'),jdecode(''), jdecode('%2F18301.html'), 'true',[],'',''],
	['PAGE','18322',jdecode('escursioni'),jdecode(''), jdecode('%2F18322.html'), 'true',[],'',''],
	['PAGE','13601',jdecode('Terms+%3A+Condizioni'),jdecode(''), jdecode('%2F13601.html'), 'true',[],'',''],
	['PAGE','27312',jdecode('Verde+Energy+Plan'),jdecode(''), jdecode('%2F27312.html'), 'true',[],'',''],
	['PAGE','4201',jdecode('About+us'),jdecode(''), jdecode('%2F4201.html'), 'true',[],'',''],
	['PAGE','13401',jdecode('Risorse+%3A+Link'),jdecode(''), jdecode('%2F13401.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='823333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10830';
theSitetree.graphicsetId='11284';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTCPXC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'823333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10830',
				graphicsetId: 	'11284',
				contentColor: 	'333333',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3601',
internalId:  '',
customField: '20110912-102955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20110816-122652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20110818-132545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20110815-135441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4222',
internalId:  '',
customField: '20110912-103930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20110815-135203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110912-103125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20110815-140011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20110912-103557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20110912-103242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20110912-103703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13222',
internalId:  '',
customField: '20110912-105425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20110912-110143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17764',
internalId:  '',
customField: '20110912-105925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20110912-105611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17722',
internalId:  '',
customField: '20110826-114052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17743',
internalId:  '',
customField: '20110816-121225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20110816-120645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18085',
internalId:  '',
customField: '20110816-120742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18022',
internalId:  '',
customField: '20110816-120842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18064',
internalId:  '',
customField: '20110816-120939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18043',
internalId:  '',
customField: '20110816-121043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18322',
internalId:  '',
customField: '20110815-141738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20110816-121357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27312',
internalId:  '',
customField: '20110815-141341'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLN5Q';
var companyName   = 'RestaCumme.+Destination+Management+Company';
var htmlTitle	  = 'Destination+Management+Services+';
var metaKeywords  = 'capri%2C+positano%2C+amalfi%2C+sorrento%2C+rome%2C+New+york%2C+washington+dc%2C+philadelphia%2C+maryland%2C+USA+travel+accommodations+in+new+york%2C+washington+dc+accommodations%2C+philadelphia+tours%2C+Italy+travel+packages%2C+USA+travel+packages%2C+cilento+vacation+rentals%2C+cilento+farmhouses%2C+cilento+villas%2C+cilento+apartments%2CPremium+vacation+rentals+in+italy%2CPersonalized+travel+services+in+cilento%2C+Italy+Group+services%2C+Italy+Scuba+diving%2C+excursions%2Cwedding+travel%2Cslow+food+cilento%2Cgastronomic+excursion%2C+culinary+travel+cilento%2C+cooking+classes%2Cecological+excursion%2C+incentive+travel%2C+senior+travel%2Cfamily+vacations%2Cfamily+excursions%2C+art+tour%2Cvacation+wellness%2Choneymoon+travel%2Citineraries%2Cfarm+holidays%2C+weekend+travel%2Cholidays%2Cboat+tour+cilento%2CPaestum+excursion%2CPompeii+excursion%2CVelia+excursion%2CMediterranean+diet%2C+American+Helicopter+Museum%2C+Brandywine+River+Museum%2C+Brandywine+Battlefield%2C+PA+Veterans+Museum%2C+Trolley+Ride+Downtown+Media%2C+John+Chadds+House%2C+Barns+Brinton+House%2C+Chester+City%2C+1724+Old+Chester+Courthouse%2C+Delaware+County+Historical+Society+Museum%2C+Caleb+Pusey+House%2C+Landingford+Plantation%2C+Norwood%2C+Broomall%2C+Newtown+Square%2C+Morton+Morton+House%2C+Thomas+Massey+House%2C+1842+Octagonal+School+House%2C+1711+Newtown+Square+Friends+Meeting+House%2C+1860+Bartram+Bridge%2C+Crum+Creek%2C+Delaware+county+Wineries%2C+Herr%E2%80%99s+Snack+Factory%2C+Jimmy+John%E2%80%99s+Pipin%E2%80%99+Hot+Sandwich+Shop%2C+West+Chester+pa%2C+The+Shops+at+Brinton+Lakes%2C+Olde+Ridge+Village%2C+US+Hot+Air+Balloon+Team%2C+Sailing+on+the+Delaware+River%2C+IceWorks%2C+PPL+Stadium%2C+canoeing+trips%2C+kayaking%2C+tubing+trip%2C+Brandywine+River%2C+Harrah%E2%80%99s+Chester+Casino+and+Race+Track%2C+Media+Theater%2C+Upper+Darby+Performing+Arts+Center%2C+People%E2%80%99s+Light+and+Theater%2C+Hedgerow+Theater%2C+Darlington+Arts+Center%2C+Rose+Tree+Park%2C+Players+Club+of+Swarthmore%2C+People%E2%80%99s+Light+and+Theatre+Company%2C+Anthony+Wayne+Theater%2C+Garden+Tours%2C+Nemours+Mansion+%26+Gardens%2C+Longwood+Gardens%2C+Tyler+Arboretum%2C+Scott+Arboretum+of+Swarthmore+College%2C+Chanticleer%2C+Linvilla+Orchards%2C+Ridley+Creek+State+Park+affitti+appartamento%2C+affitto+casa%2Cappartamento+turistico%2C+appartamento+vacanza+cilento%2Ccasa+vacanza%2C+bed+breakfast%2C+itinerario+turistico%2C+gita+turistica%2C+pernottamento%2C+residence%2C+agriturismo+cilento%2Cfine+settimana+cilento%2C+escursione+in+cilento%2Cviaggio+di+nozze%2C+slow+food%2C+escursione+gastronomica%2C+viaggio+gastronomico%2C+scuola+cucina%2C+ricette+cilentane%2Cescursione+ecologica%2C+vacanza+terza+eta%E2%80%99%2Cvacanze+famiglia%2C+escursioni+famiglie%2C+itinerario+artistico%2C+vacanza+wellness%2C+luna+di+miele%2C+dieta+mediterranea%2C+gita+in+barca%2C+escursione+pompei%2C+escursione+paestum%2C+escursione+velia';
var metaContents  = 'RestaCumme+provides+destination+management+services+to+assist+you+in+every+facet+of+your+vacation+or+business+trip+in+Italy+and+the+United+States%0D%0A%0D%0A';
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();
};

