/* [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','1801',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','1957',jdecode('Nos+circuits+%26+voyages+avec+guide+priv%C3%A9'),jdecode(''),'/1957/index.html','true',[ 
		['PAGE','20101',jdecode('Circuits+aux+Visayas%2C+les+incontournables+'),jdecode(''),'/1957/20101.html','true',[],'',''],
		['PAGE','46001',jdecode('Circuits+aux+Visayas%2C+cachettes+secr%C3%A8tes+'),jdecode(''),'/1957/46001.html','true',[],'',''],
		['PAGE','20622',jdecode('Circuits+aux+Rizi%C3%A8res+%26+Rando+au+Pinatubo'),jdecode(''),'/1957/20622.html','true',[],'',''],
		['PAGE','20601',jdecode('Circuits+%C3%A0+Palawan'),jdecode(''),'/1957/20601.html','true',[],'','']
	],'',''],
	['PAGE','1915',jdecode('Nos+services'),jdecode(''),'/1915.html','true',[],'',''],
	['PAGE','1936',jdecode('Nos+s%C3%A9jours+baln%C3%A9aires'),jdecode(''),'/1936.html','true',[],'',''],
	['PAGE','1852',jdecode('L%26%23x27%3Besprit+PhilsTropicale'),jdecode(''),'/1852.html','true',[],'',''],
	['PAGE','27401',jdecode('Album+photos+clients+2009%2F10'),jdecode(''),'/27401.html','true',[],'',''],
	['PAGE','25101',jdecode('Album+photos'),jdecode(''),'/25101.html','true',[],'',''],
	['PAGE','1894',jdecode('Les+plus+des+Philippines+%26+Fiche+technique'),jdecode(''),'/1894.html','true',[],'',''],
	['PAGE','43301',jdecode('Conditions+de+vente++Paiement'),jdecode(''),'/43301.html','true',[],'',''],
	['PAGE','9601',jdecode('Nous+contacter'),jdecode(''),'/9601.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Clean';
theSitetree.paletteFamily='B5B5B5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33270';
theSitetree.graphicsetId='14153';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Clean',
				paletteFamily: 	'B5B5B5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33270',
				graphicsetId: 	'14153',
				contentColor: 	'333333',
				contentBGColor: 'FFFFFF',
				a_color: 		'787878',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100719-060532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20100530-153838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100530-111341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20100602-002531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20100605-102025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20100817-072843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20100530-111934'
};
webappMappings['7008']=webappMappings['7008-5136']={
webappId:    '7008',
documentId:  '9601',
internalId:  '5136',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100822-075313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20100602-004551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20100813-234638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20090614-051149'
};
webappMappings['7060']=webappMappings['7060-9442a64745826f6f9fc93b55b4848830']={
webappId:    '7060',
documentId:  '25101',
internalId:  '9442a64745826f6f9fc93b55b4848830',
customField: 'language:fr;country:FR;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27401',
internalId:  '',
customField: '20100812-065631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20100602-003305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20100813-234124'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1801',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1852',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1894',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1957',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '20101',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '20601',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '20622',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1936',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1915',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '46001',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '25101',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '27401',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '43301',
internalId:  '',
customField: 'language:fr;country:FR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9601',
internalId:  '',
customField: 'language:fr;country:FR;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INERHR';
var companyName   = 'Les+%C3%AEles+Philippines+telles+que+vous+les+imaginiez+';
var htmlTitle	  = 'Philippines+Tropicale%2C+votre+agence+de+voyage+personnalis%C3%A9e++aux++Philippines.';
var metaKeywords  = 'Philippines%2C+Cebu%2C+Manille%2C++Bohol%2C+Siquijor%2C++Negros%2C++Palawan%2C++Boracay%2C++Visayas%2C++circuit+aventure%2C+vacances%2C++voyage%2C++baln%C3%A9aire%2C++Asie%2C++4x4%2C++tourisme+responsable%2C+Banaue%2C++Rizi%C3%A8res+en+terrasses%2C+Dumaguete%2C+Tagbilaran%2C+Sumilon%2C+Bantayan%2C+Sipalay%2C+joseph%2C+jo%2C+collines+de+chocolats%2C+el+nido%2C+Busuanga%2C+Coron%2C+Mindoro%2C';
var metaContents  = 'Philippines+Tropical+est+une+agence+qui+organise+des+voyages+aventures+personnalis%C3%A9s+avec+un+go%C3%BBt+prononc%C3%A9+pour+le+hors+des+sentiers+battus.+Notre+team%2C+%C3%A9tabli+%C3%A0+Cebu%2C+con%C3%A7oit%2C+organise+et+accompagne+lui-m%C3%AAme+les+plus+beaux+s%C3%A9jours%2C+aux+Philippines.';
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();
};
