/* [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','2501',jdecode('Home'),jdecode(''),'/2501.html','true',[],'',''],
	['PAGE','38401',jdecode('Personal+Photos'),jdecode(''),'/38401.html','true',[],'',''],
	['PAGE','28706',jdecode('Great+Travel+Destinations'),jdecode(''),'/28706/index.html','true',[ 
		['PAGE','28727',jdecode('Europe'),jdecode(''),'/28706/28727.html','true',[],'',''],
		['PAGE','28748',jdecode('Alaska'),jdecode(''),'/28706/28748.html','true',[],'',''],
		['PAGE','43601',jdecode('Holy+Land'),jdecode(''),'/28706/43601.html','true',[],'','']
	],'',''],
	['PAGE','39901',jdecode('Space+Shuttle'),jdecode(''),'/39901.html','true',[],'',''],
	['PAGE','3585',jdecode('Tips+and+Tricks'),jdecode(''),'/3585.html','true',[],'',''],
	['PAGE','19801',jdecode('Email+Communications'),jdecode(''),'/19801.html','true',[],'',''],
	['PAGE','3627',jdecode('About+Me'),jdecode(''),'/3627.html','true',[],'',''],
	['PAGE','33501',jdecode('Guest+Book'),jdecode(''),'/33501.html','true',[],'',''],
	['PAGE','33522',jdecode('Weather'),jdecode(''),'/33522.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Corporate';
theSitetree.paletteFamily='5F8AA9';
theSitetree.keyvisualId='11072';
theSitetree.keyvisualName='kv_11072.jpg';
theSitetree.fontsetId='31953';
theSitetree.graphicsetId='13792';
theSitetree.contentColor='888D92';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Corporate',
				paletteFamily: 	'5F8AA9',
				keyvisualId: 	'11072',
				keyvisualName: 	'kv_11072.jpg',
				fontsetId: 		'31953',
				graphicsetId: 	'13792',
				contentColor: 	'888D92',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20080916-094006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20090825-180018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38401',
internalId:  '',
customField: '20100823-204407'
};
webappMappings['1002']=webappMappings['1002-33501aendu0in2k91']={
webappId:    '1002',
documentId:  '33501',
internalId:  '33501aendu0in2k91',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20080427-103444'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28748',
internalId:  '',
customField: '20090908-200935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3585',
internalId:  '',
customField: '20080405-113335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3627',
internalId:  '',
customField: '20080405-114351'
};
webappMappings['7008']=webappMappings['7008-2414']={
webappId:    '7008',
documentId:  '19801',
internalId:  '2414',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28706',
internalId:  '',
customField: '20080907-223442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28727',
internalId:  '',
customField: '20090623-224710'
};
webappMappings['7080']=webappMappings['7080-207']={
webappId:    '7080',
documentId:  '33522',
internalId:  '207',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20080907-222211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33522',
internalId:  '',
customField: '20080907-222309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20100311-220606'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2K91';
var companyName   = 'Tartaro+Travels';
var htmlTitle	  = 'Tartaro+Photography';
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();
};

