/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],''],
	['PAGE','19922',jdecode('S.+African+Safaris+++'),jdecode(''),'/19922.html','true',[],''],
	['PAGE','973',jdecode('S.+African+Tented+Safaris'),jdecode(''),'/973.html','true',[],''],
	['PAGE','1078',jdecode('Amazon+Adventure+'),jdecode(''),'/1078.html','true',[],''],
	['PAGE','1162',jdecode('Antarctica+Expedition'),jdecode(''),'/1162.html','true',[],''],
	['PAGE','994',jdecode('Argentina+'),jdecode(''),'/994.html','true',[],''],
	['PAGE','8322',jdecode('Brazil+%26+Iguacu+Falls+'),jdecode(''),'/8322.html','true',[],''],
	['PAGE','8301',jdecode('Chile+%26+Easter+Island'),jdecode(''),'/8301.html','true',[],''],
	['PAGE','19901',jdecode('Costa+Rica++'),jdecode(''),'/19901.html','true',[],''],
	['PAGE','11222',jdecode('Egypt+%26+Nile'),jdecode(''),'/11222.html','true',[],''],
	['PAGE','12101',jdecode('Family+Vacations+'),jdecode(''),'/12101.html','true',[],''],
	['PAGE','1120',jdecode('Galapagos+Islands'),jdecode(''),'/1120.html','true',[],''],
	['PAGE','952',jdecode('Galapagos-MachuPicchu'),jdecode(''),'/952.html','true',[],''],
	['PAGE','1183',jdecode('Machu+Picchu%2C+Peru'),jdecode(''),'/1183.html','true',[],''],
	['PAGE','11201',jdecode('Sports+%26+Treks+'),jdecode(''),'/11201.html','true',[],''],
	['PAGE','1141',jdecode('Honeymoon'),jdecode(''),'/1141.html','true',[],''],
	['PAGE','19943',jdecode('Special+Offers'),jdecode(''),'/19943.html','true',[],''],
	['PAGE','1015',jdecode('Testimonials+'),jdecode(''),'/1015.html','true',[],''],
	['PAGE','1036',jdecode('Contact+%26+About+US+'),jdecode(''),'/1036/index.html','true',[ 
		['PAGE','43001',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/1036/43001.html','false',[],'']
	],''],
	['PAGE','1057',jdecode('Terms+%26+Conditions'),jdecode(''),'/1057.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='3C5284';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10466';
theSitetree.graphicsetId='10913';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3C5284';
var theTemplate={
				name: 			'Stars',
				paletteFamily: 	'3C5284',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10466',
				graphicsetId: 	'10913',
				contentColor: 	'FFFFFF',
				contentBGColor: '3C5284',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'3C5284',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050inx29t6bf6b30cc5f12377']={
webappId:    '1001',
documentId:  '1036',
internalId:  'ahw050inx29t6bf6b30cc5f12377',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx29t6bf6b30cc5f12377']={
webappId:    '1001',
documentId:  '43001',
internalId:  'ahw050inx29t6bf6b30cc5f12377',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20090406-154358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19922',
internalId:  '',
customField: '20090406-153448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20090406-155627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20090329-065026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1162',
internalId:  '',
customField: '20090113-072437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20090122-213804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20090221-054917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20090406-154935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090208-080004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20090221-063048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20090122-215019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1120',
internalId:  '',
customField: '20090205-212130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20090406-154735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1183',
internalId:  '',
customField: '20090113-073421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20090208-082736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19943',
internalId:  '',
customField: '20090329-071652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1141',
internalId:  '',
customField: '20090122-215358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20090113-073752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20090329-071238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20061026-110455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20090122-215706'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX29T';
var companyName   = 'Magellan+Expeditions+';
var htmlTitle	  = 'Magellan+Expeditions';
var metaKeywords  = 'Galapagos+Islands%2C+Galapagos+Cruises%2C+Galapagos+National+Park%2C+Adventure+Cruises%2C+Galapagos+Machu+Picchu%2C+Adventure+Travel%2C+Adventure+Cruises%2C+Antarctica+Cruises%2C+Easter+Island%2C+Robinson+Crusoe+Island%2C+Amazon+river+Camps%2C+Amazon+Camps%2C+Chilean+Fjords+Cruises%2C+Costa+Rica%2C+Costa+Rica+National+Parks%2C+Adventures+Costa+Rica%2C+Patagonia+Cruises%2C+Inca+Trail+Machu+Picchu%2C+Peru%2C+Machu+Picchu%2C+Machu+Picchu+Inca+Trail%2C+Chile%2C+Ecuador%2C+Birdwatching%2C+South+America+Cruises%2C+Belize+Scuba+Diving%2C+Belize%2C+Culture%2CWildlife%2C+Nature%2C+Snorkeling%2C+Natural+History%2C+Archaeology%2C+Expedition+Cruises%2C+Trekking%2C+Robinson+Crusoe+Island%2C+Brazil%2C+Rio+de+Janeiro%2C+Manaus%2C+Iguassu+Falls%2C+Iguazu+Falls%2C+Eco+Lodges%2C+Hiking';
var metaContents  = 'Galapagos+Islands%2C+Galapagos+Cruises%2C+Galapagos+National+Park%2C+Galapagos+and+Machu+Picchu%2C+Galapagos+Yachts%2C+Adventure+Cruises%2C+Adventure+Travel%2C+Antarctica+Cruises%2C+Easter+Island%2C+Amazon+River+Cruises%2C+Amazon+River%2C+Chilean+Fjords+Cruises%2C+Costa+Rica%2C+Patagonia+Cruises%2C+Torres+del+Paine%2C+Inca+Trail+to+Machu+Picchu%2C+Peru%2C+Machu+Picchu%2C+Machu+Picchu+Inca+Trail%2C+Chile%2C+Ecuador%2C+Birdwatching%2C+South+America+Cruises%2C+Belize+Scuba+Diving%2C+Belize%2C+Culture+Trekking%2C+Robinson+Crusoe+Island%2C+Expedition+Cruises%2C+Iguassu+Falls%2C+Iguazu+Falls%2C+Brazil%2C+Rio+de+Janeiro%2C+Eco+Lodges%2C+Hiking';
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();
};
