/* [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','1501',jdecode('Home'),jdecode(''),'/1501.html','true',[],''],
	['PAGE','1552',jdecode('Airlines+we+represent+'),jdecode(''),'/1552/index.html','true',[ 
		['PAGE','1573',jdecode('Swiss+International+Airlines'),jdecode(''),'/1552/1573.html','true',[],''],
		['PAGE','1594',jdecode('Brussels+Ailrines+'),jdecode(''),'/1552/1594.html','true',[],''],
		['PAGE','1615',jdecode('Malev+'),jdecode(''),'/1552/1615.html','true',[],''],
		['PAGE','1636',jdecode('low+cost+Airlines'),jdecode(''),'/1552/1636.html','true',[],'']
	],''],
	['PAGE','1657',jdecode('Incoming+Tourism'),jdecode(''),'/1657/index.html','true',[ 
		['PAGE','1678',jdecode('Information+about+the+Holy+land'),jdecode(''),'/1657/1678.html','true',[],''],
		['PAGE','1699',jdecode('Programs+'),jdecode(''),'/1657/1699.html','true',[],'']
	],''],
	['PAGE','10901',jdecode('8Days+Program'),jdecode(''),'/10901.html','false',[],''],
	['PAGE','11701',jdecode('11days+Program'),jdecode(''),'/11701.html','false',[],''],
	['PAGE','17601',jdecode('Holy+Land+Jordan+11+days'),jdecode(''),'/17601.html','false',[],''],
	['PAGE','17901',jdecode('Holy+Land%2FSinai+11+days'),jdecode(''),'/17901.html','false',[],''],
	['PAGE','32701',jdecode('Hotles+in+the+Holy+Land'),jdecode(''),'/32701.html','true',[],''],
	['PAGE','11322',jdecode('Pictures+from+the+Holy+Land'),jdecode(''),'/11322.html','true',[],''],
	['PAGE','1720',jdecode('Palaviation+'),jdecode(''),'/1720.html','true',[],''],
	['PAGE','12001',jdecode('email+us'),jdecode(''),'/12001.html','true',[],''],
	['PAGE','33801',jdecode('Guestbook'),jdecode(''),'/33801.html','true',[],''],
	['PAGE','1762',jdecode('About+us'),jdecode(''),'/1762/index.html','true',[ 
		['PAGE','1783',jdecode('+Our+team'),jdecode(''),'/1762/1783.html','true',[],'']
	],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Bigcity_NYC';
theSitetree.paletteFamily='303050';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17891';
theSitetree.graphicsetId='13161';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='303050';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Bigcity_NYC',
				paletteFamily: 	'303050',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17891',
				graphicsetId: 	'13161',
				contentColor: 	'FFFFFF',
				contentBGColor: '303050',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				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:  '1501',
internalId:  '',
customField: '20091023-051148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1552',
internalId:  '',
customField: '20091014-050354'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-23446307']={
webappId:    '1501',
documentId:  '1501',
internalId:  '23446307',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1573',
internalId:  '',
customField: '20091014-071602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1594',
internalId:  '',
customField: '20091014-074927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1615',
internalId:  '',
customField: '20091014-080113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1636',
internalId:  '',
customField: '20091028-092340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1657',
internalId:  '',
customField: '20091014-092550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1678',
internalId:  '',
customField: '20091015-081850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1699',
internalId:  '',
customField: '20091015-075602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1720',
internalId:  '',
customField: '20091013-090209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20091014-092456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1762',
internalId:  '',
customField: '20091014-044550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1783',
internalId:  '',
customField: '20091014-050650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20091014-083427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20091027-052524'
};
webappMappings['7008']=webappMappings['7008-22000']={
webappId:    '7008',
documentId:  '12001',
internalId:  '22000',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c8f6205c70393901ae1b8a92899352c6']={
webappId:    '7060',
documentId:  '11322',
internalId:  'c8f6205c70393901ae1b8a92899352c6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20091014-090504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11322',
internalId:  '',
customField: '20091014-084023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17601',
internalId:  '',
customField: '20091015-074728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20091015-075418'
};
webappMappings['1002']=webappMappings['1002-33801aendu0invqdz']={
webappId:    '1002',
documentId:  '33801',
internalId:  '33801aendu0invqdz',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20091028-093330'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INVQDZ';
var companyName   = 'Atlas+Tours+%26+Travel+Group+';
var htmlTitle	  = 'atlas+aviation+services+';
var metaKeywords  = '';
var metaContents  = '';
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();
};
