/* [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','601',jdecode('HOME'),jdecode(''),'/601.html','true',[],''],
	['PAGE','6243',jdecode('WEDDINGS'),jdecode(''),'/6243.html','true',[],''],
	['PAGE','55501',jdecode('Espa%C3%B1ol+'),jdecode(''),'/55501.html','true',[],''],
	['PAGE','6264',jdecode('EVENTS'),jdecode(''),'/6264/index.html','true',[ 
		['PAGE','36201',jdecode('Portraits%2F+Groups'),jdecode(''),'/6264/36201.html','true',[],''],
		['PAGE','36222',jdecode('Corporate'),jdecode(''),'/6264/36222.html','true',[],''],
		['PAGE','36243',jdecode('Commercial'),jdecode(''),'/6264/36243.html','true',[],''],
		['PAGE','36285',jdecode('Social+Events'),jdecode(''),'/6264/36285.html','true',[],''],
		['PAGE','36306',jdecode('Photo+Ops'),jdecode(''),'/6264/36306.html','true',[],''],
		['PAGE','40201',jdecode('Photoshop'),jdecode(''),'/6264/40201.html','true',[],''],
		['PAGE','45401',jdecode('Location+Prints'),jdecode(''),'/6264/45401.html','true',[],''],
		['PAGE','36701',jdecode('Personal'),jdecode(''),'/6264/36701.html','true',[],'']
	],''],
	['PAGE','36264',jdecode('CAMPS%2FYMCA'),jdecode(''),'/36264.html','true',[],''],
	['PAGE','57601',jdecode('Wine+Series'),jdecode(''),'/57601.html','false',[],''],
	['PAGE','6285',jdecode('Art+Collections'),jdecode(''),'/6285/index.html','true',[ 
		['PAGE','14001',jdecode('Fine+Art+%281%29'),jdecode(''),'/6285/14001.html','true',[],''],
		['PAGE','14022',jdecode('Fine+Art+%282%29'),jdecode(''),'/6285/14022.html','true',[],''],
		['PAGE','14043',jdecode('Fine+Art+%283%29'),jdecode(''),'/6285/14043.html','true',[],'']
	],''],
	['PAGE','6348',jdecode('CONTACT'),jdecode(''),'/6348.html','true',[],''],
	['PAGE','14064',jdecode('Favorites'),jdecode(''),'/14064.html','true',[],''],
	['PAGE','32801',jdecode('GUESTBOOK'),jdecode(''),'/32801.html','true',[],''],
	['PAGE','48101',jdecode('Family'),jdecode(''),'/48101.html','false',[],''],
	['PAGE','58901',jdecode('Burn+Reunion'),jdecode(''),'/58901.html','false',[],''],
	['PAGE','64301',jdecode('Ashley+%26+Jim'),jdecode(''),'/64301.html','false',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'4A587F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20081107-181735'
};
webappMappings['1501']=webappMappings['1501-2353353']={
webappId:    '1501',
documentId:  '601',
internalId:  '2353353',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20090120-114533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090713-122730'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20090506-142248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6264',
internalId:  '',
customField: '20090204-150230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6285',
internalId:  '',
customField: '20090128-001009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20081007-204915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20081007-204915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20081007-204916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6348',
internalId:  '',
customField: '20090114-181848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14064',
internalId:  '',
customField: '20090302-132025'
};
webappMappings['7008']=webappMappings['7008-286']={
webappId:    '7008',
documentId:  '32801',
internalId:  '286',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36222',
internalId:  '',
customField: '20090101-110253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36243',
internalId:  '',
customField: '20090101-110311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36264',
internalId:  '',
customField: '20090127-224928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36285',
internalId:  '',
customField: '20090101-110327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36306',
internalId:  '',
customField: '20090101-110351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20081231-175734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20081231-175420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45401',
internalId:  '',
customField: '20081231-175537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20090519-090907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20090114-200239'
};
webappMappings['7060']=webappMappings['7060-e90728fd021a2739d97ab43079c8a69f']={
webappId:    '7060',
documentId:  '48101',
internalId:  'e90728fd021a2739d97ab43079c8a69f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20090705-194525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20090713-124043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20091007-115150'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INV8SV';
var companyName   = 'Photography+by+Robert+East';
var htmlTitle	  = 'Photography+by+Robert+East';
var metaKeywords  = 'East+Photography%2C+Robert+East%2C+Commercial+Photography%2C++Event+Photography%2C++Wedding+Photography%2C++Atlanta+Wedding+Photography%2C++Atlanta+Weddings%2C++Fine+Art+Photography%2C++Nature+Photography%2C++Atlanta+Event+Photography%2C+Kennesaw+Weddings%2C+Marietta+Weddings%2C+Acworth+Weddings++++';
var metaContents  = 'meta+name%3Dverify-v1+content%3DSCU5ev0HOOUwyyMxLSkuhO3gbCBCUkDwFKipsclx0sI%3D+East+Photography%2C+Robert+East%2C+Commercial+Photography%2C++Event+Photography%2C++Wedding+Photography%2C++Atlanta+Wedding+Photography%2C++Atlanta+Weddings%2C++Fine+Art+Photography%2C++Nature+Photography%2C++Atlanta+Event+Photography%2C+Kennesaw+Weddings%2C+Marietta+Weddings%2C+Acworth+Weddings+++++++';
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();
};

