/* [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','32',jdecode('Sicily+Tour+Home+Page'),jdecode(''), jdecode('%2F32.html'), 'true',[],'',''],
	['PAGE','53',jdecode('About+us+and+our+approach'),jdecode(''), jdecode('%2F53.html'), 'true',[],'',''],
	['PAGE','62',jdecode('Group+itineraries'),jdecode(''), jdecode('%2F62.html'), 'true',[],'',''],
	['PAGE','71',jdecode('Plan+your+own+visit'),jdecode(''), jdecode('%2F71.html'), 'true',[],'',''],
	['PAGE','1646',jdecode('A+flavor+of+our+festivals'),jdecode(''), jdecode('%2F1646.html'), 'true',[],'',''],
	['PAGE','98',jdecode('Testimonials+and+references'),jdecode(''), jdecode('%2F98.html'), 'true',[],'',''],
	['PAGE','13601',jdecode('TripAdvisor+traveler+reviews'),jdecode(''), jdecode('%2F13601.html'), 'true',[],'',''],
	['PAGE','80',jdecode('Prices+%26+Payment'),jdecode(''), jdecode('%2F80.html'), 'true',[],'',''],
	['PAGE','89',jdecode('Contact+us'),jdecode(''), jdecode('%2F89.html'), 'true',[],'',''],
	['PAGE','107',jdecode('Privacy+policy'),jdecode(''), jdecode('%2F107.html'), 'true',[],'',''],
	['PAGE','1966',jdecode('Useful+links'),jdecode(''), jdecode('%2F1966.html'), 'true',[],'',''],
	['PAGE','1975',jdecode('Transportation+advice'),jdecode(''), jdecode('%2F1975.html'), 'true',[],'',''],
	['PAGE','1769',jdecode('*****'),jdecode(''), jdecode('%2F1769%2Findex.html'), 'true',[ 
		['PAGE','5701',jdecode('Sicily+Highlights+Tour+itinerary'),jdecode(''), jdecode('%2F1769%2F5701.html'), 'true',[],'',''],
		['PAGE','6301',jdecode('Easter+Festivals+of+Sicily+itinerary'),jdecode(''), jdecode('%2F1769%2F6301.html'), 'true',[],'',''],
		['PAGE','1872',jdecode('Cruisin%26%23x27%3B+the+cuisine+itinerary'),jdecode(''), jdecode('%2F1769%2F1872.html'), 'true',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Favor';
theSitetree.paletteFamily='8FD381';
theSitetree.keyvisualId='7331';
theSitetree.keyvisualName='kv_7331.jpg';
theSitetree.fontsetId='16469';
theSitetree.graphicsetId='12162';
theSitetree.contentColor='323232';
theSitetree.contentBGColor='E9FCE4';
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: 			'Favor',
				paletteFamily: 	'8FD381',
				keyvisualId: 	'7331',
				keyvisualName: 	'kv_7331.jpg',
				fontsetId: 		'16469',
				graphicsetId: 	'12162',
				contentColor: 	'323232',
				contentBGColor: 'E9FCE4',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80',
internalId:  '',
customField: '20110505-142442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20120104-163032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20110712-091729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20120105-124342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20101031-104025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1646',
internalId:  '',
customField: '20080410-172314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89',
internalId:  '',
customField: '20110427-113340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98',
internalId:  '',
customField: '20110818-000139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107',
internalId:  '',
customField: '20080320-015329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1966',
internalId:  '',
customField: '20110103-153640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1975',
internalId:  '',
customField: '20080614-041105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1769',
internalId:  '',
customField: '20080802-060811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20120104-192431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20110505-103556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1872',
internalId:  '',
customField: '20110531-140757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20110427-112512'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVMRF';
var companyName   = 'S+I+C+I+L+Y++++T+O+U+R';
var htmlTitle	  = 'SICILY++TOUR';
var metaKeywords  = '%C3%82%C2%9Dancient+Greeks%2C+cooking+lessons%2C+group+tour%2C+individual+tour%2C+personalized+tour%2C+Aeolian+Islands%2C+biking+in+Sicily%2C+Castello+Maniace%2C+Classes+in+Sicilian%2C+Ear+of+Dionysus%2C+Egadi+Islands%2C+Frederick+II%2C+Greek+temple%2C+Greek+theater%2C+Greek+theatre%2C+Il+Postino%2C+Italian+language%2C+Jewish+culture+in+Sicily%2C+Jews+in+Sicily%2C+La+Martorana%2C+Learning+Italian%2C+Learning+Sicilian%2C+restaurants%2C+Mazara+del+Vallo%2C+Megara+Hyblaea%2C+Monreale+Cathedral%2C+Norman+Palace%2C+Osteria+da+Mariano%2C+Piazza+Armerina%2C+Piazza+Duomo%2C+%3ARifugio+Sapienza%2C%2C+San+Cataldo%2C+Sicilian+Baroque%2C+Sicilian+Language%2C+Sicilian+Vespers%2C+Sicily+tour%2C+Sicily+tours%2C+The+Leopard%2C+tours+of+Sicily%2C+Villa+Romana+del+Casale%2C+Aeneas%2C+Aeneid%2C+Aeolian%2C+Agrigento%2C+Akragas%2C+Alcantara%2C+Archimedes%2C+architecture%2C+Arethusa%2C+Armerina%2C+birds%2C+bicycle%2C+biking%2C+biscotti%2C+Bronte%2C+cannoli%2C+Casale%2C+Catania%2C+Cefalu%2C+Cicero%2C+Constanza%2C+cuisine%2C+Cyclops%2C+Davies%2C+Demeter%2C+Dion%2C+Dionysius%2C+Dionysus%2C+Donnafugata%2C+Eloro%2C+Enna%2C+Erice%2C+Etna%2C+Eurialo%2C+Euryalo%2C+excursion%2C+family%2C+Fonte%2C+Gangi%2C+Gattopardo%2C+genealogy%2C+Giardini-Naxos%2C+Godfather%2C+Gorgon%2C+Grecian%2C+Greek%2C++heritage%2C+hiking.%2C+history%2C+Homer%2C+Italian%2C+Douglas+Kenning%2C+Kesselring%2C+Douglas+Kuenning%2C+Lipari%2C+Mafia%2C+Malta%2C+Maniace%2C+Marlena%2C+Marsala%2C+Medusa%2C+Messina%2C+Modica%2C+Monreale%2C+Montgomery%2C+Motya%2C+Mozia%2C+myth%2C+mythology%2C+NAS%2C+nature%2C+Naxos%2C+Norman%2C+Noto%2C+Odysseus%2C+Odyssey%2C+Ortigia%2C+Palazzolo%2C+Palermo%2C+Pantalica%2C+Patton%2C+Persephone%2C+Plato%2C+Pyrrhus%2C+Ragusa%2C+ricotta%2C+Roman%2C+seafood%2C+Segesta%2C+Selinunte%2C+Selinus%2C+Sicilia%2C+Sicilian%2C+Sicily%2C+Sigonella%2C+Siracusa%2C+Syracuse%2C+Tancredi%2C+Taormina%2C+temple%2C+theater%2C+Tour%2C+tour%2C+Tourism%2C+tourist%2C+tours%2C+Trapani%2C+travel%2C+Tyndari%2C+Valetta%2C+Villa%2C+wildlife%2C+WWII';
var metaContents  = 'Guided+Tours+of+Sicily%2C+group+and+personalized.+All+of+Sicily+is+ours%3A+stories+of+the+ancient+Greeks%2C+Romans%2C+Arabs%2C+and+Normans+to+WW+II+and+modern+Sicily.++Also%2C+cooking+classes.+cuisine+tours%2C+family+genealogy%2C+nature+hikes%2C+Mafia+tours%2C+film+tours.';
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();
};

