/* [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','2201',jdecode('Home'),jdecode(''), jdecode('%2F2201.html'), 'true',[],'',''],
	['PAGE','65912',jdecode('Executive+Portraits'),jdecode(''), jdecode('%2F65912.html'), 'true',[],'',''],
	['PAGE','96612',jdecode('Product+Photography'),jdecode(''), jdecode('%2F96612.html'), 'true',[],'',''],
	['PAGE','96633',jdecode('Real+Estate'),jdecode(''), jdecode('%2F96633.html'), 'true',[],'',''],
	['PAGE','100712',jdecode('Commercial'),jdecode(''), jdecode('%2F100712.html'), 'true',[],'',''],
	['PAGE','76312',jdecode('Event+Photography'),jdecode(''), jdecode('%2F76312.html'), 'true',[],'',''],
	['PAGE','44012',jdecode('Weddings'),jdecode(''), jdecode('%2F44012.html'), 'false',[],'',''],
	['PAGE','49512',jdecode('Family+Portraits'),jdecode(''), jdecode('%2F49512.html'), 'true',[],'',''],
	['PAGE','26001',jdecode('Your+Photos'),jdecode(''), jdecode('%2F26001.html'), 'true',[],'',''],
	['PAGE','23301',jdecode('Galleries'),jdecode(''), jdecode('%2F23301.html'), 'true',[],'',''],
	['PAGE','86612',jdecode('Videos'),jdecode(''), jdecode('%2F86612.html'), 'true',[],'',''],
	['PAGE','23322',jdecode('News+and+Press+Releases'),jdecode(''), jdecode('%2F23322.html'), 'true',[],'',''],
	['PAGE','109012',jdecode('Community+Work'),jdecode(''), jdecode('%2F109012.html'), 'true',[],'',''],
	['PAGE','28601',jdecode('Client+Comments'),jdecode(''), jdecode('%2F28601.html'), 'true',[],'',''],
	['PAGE','46712',jdecode('Legal+and+Copyright'),jdecode(''), jdecode('%2F46712.html'), 'false',[],'',''],
	['PAGE','46812',jdecode('Make+Up'),jdecode(''), jdecode('%2F46812.html'), 'false',[],'',''],
	['PAGE','2252',jdecode('Services'),jdecode(''), jdecode('%2F2252.html'), 'false',[],'',''],
	['PAGE','53512',jdecode('FNL'),jdecode(''), jdecode('%2F53512.html'), 'false',[],'',''],
	['PAGE','70212',jdecode('Fine+Art+Prints'),jdecode(''), jdecode('%2F70212.html'), 'false',[],'',''],
	['PAGE','79212',jdecode('Coupons+and+Specials'),jdecode(''), jdecode('%2F79212.html'), 'false',[],'',''],
	['PAGE','48212',jdecode('Panoramas'),jdecode(''), jdecode('%2F48212.html'), 'false',[],'',''],
	['PAGE','40212',jdecode('Facebook+and+Blog'),jdecode(''), jdecode('%2F40212.html'), 'false',[],'',''],
	['PAGE','79812',jdecode('Teaching+and+Education'),jdecode(''), jdecode('%2F79812.html'), 'false',[],'',''],
	['PAGE','82512',jdecode('Podcasts'),jdecode(''), jdecode('%2F82512.html'), 'false',[],'',''],
	['PAGE','30501',jdecode('Portrait+Help'),jdecode(''), jdecode('%2F30501.html'), 'false',[],'',''],
	['PAGE','70312',jdecode('Payment+Options'),jdecode(''), jdecode('%2F70312.html'), 'false',[],'',''],
	['PAGE','2273',jdecode('Contact'),jdecode(''), jdecode('%2F2273.html'), 'true',[],'',''],
	['PAGE','78112',jdecode('Email+SWORD'),jdecode(''), jdecode('%2F78112.html'), 'true',[],'',''],
	['PAGE','65933',jdecode('About+Sword+Photography+LLC'),jdecode(''), jdecode('%2F65933.html'), 'true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11139';
theSitetree.keyvisualName='kv_11139.jpg';
theSitetree.fontsetId='32065';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC21T'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11139',
				keyvisualName: 	'kv_11139.jpg',
				fontsetId: 		'32065',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				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:  '2201',
internalId:  '',
customField: '20111111-140744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20110209-101456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20111104-074635'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-ba75f15b46451fa8a37fcd2a7d337d46']={
webappId:    '7060',
documentId:  '23301',
internalId:  'ba75f15b46451fa8a37fcd2a7d337d46',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23301',
internalId:  '',
customField: '20110211-085518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23322',
internalId:  '',
customField: '20111104-122515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20111017-115015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20110429-075837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20100508-093820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40212',
internalId:  '',
customField: '20101118-200809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44012',
internalId:  '',
customField: '20110224-101714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46812',
internalId:  '',
customField: '20110222-083917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46712',
internalId:  '',
customField: '20110208-142827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48212',
internalId:  '',
customField: '20100625-124701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49512',
internalId:  '',
customField: '20111114-083304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53512',
internalId:  '',
customField: '20101110-124243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65933',
internalId:  '',
customField: '20111108-120643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65912',
internalId:  '',
customField: '20111108-144558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70212',
internalId:  '',
customField: '20110224-100942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70312',
internalId:  '',
customField: '20110223-143508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76312',
internalId:  '',
customField: '20111104-130811'
};
webappMappings['7008']=webappMappings['7008-4429']={
webappId:    '7008',
documentId:  '78112',
internalId:  '4429',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78112',
internalId:  '',
customField: '20110223-144311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79212',
internalId:  '',
customField: '20110311-092650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79812',
internalId:  '',
customField: '20110311-094312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82512',
internalId:  '',
customField: '20110311-091321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86612',
internalId:  '',
customField: '20111021-123643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96612',
internalId:  '',
customField: '20111104-123136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96633',
internalId:  '',
customField: '20111101-083306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100712',
internalId:  '',
customField: '20111114-082054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109012',
internalId:  '',
customField: '20111114-081924'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INZ2OM';
var companyName   = '919-500-8902+++++++++++++++++++++++++++SWORD+Photography+LLC';
var htmlTitle	  = 'Sword+Photography+LLC+-+Sharp+Professional+Images';
var metaKeywords  = 'Sword%2C+photography%2C+photo%2C+photos%2C+business%2C+commercial%2C+executive%2C+directory%2C+advertisement%2C+advertisements%2C+adverts%2C+advert%2C+web%2C+ready%2C+portrait%2C+portraits%2C+business+portrait%2C+business+events%2C+product%2C+product+launch%2C+corporate%2C+brochure%2C+catalog%2C+family%2C+family+photos%2C+events%2C+products%2C+prospectus%2C+Raleigh%2C+NC%2C+headshot%2C+headshots+Raleigh%2C+headshots+triangle%2C+business+portrait%2C+business+portrait%2C+business+portrait%2C+business+portraits%2C+digital+photography+NC%2C+passport%2C+visa%2C+amazing%2C+professional%2C+VA%2C+Dulles%2C+Chamber%2C+weddings%2C+bridal%2C+engagement%2C+portrait%2C+portraits%2C+family+portraits%2C+children%2C+children+photos%2C+Richard+J+Martin%2C+falls+river%2C+RTP%2C+triangle%2C+Durham%2C+919%2C+8902%2C+919+500+8902';
var metaContents  = 'Sword+Photography+-+Sharp+photography+for+commercial%2C+family%2C+weddings+and+events+in+Raleigh%2C+NC.+Email%3A+Richard%40SwordPhotography.com';
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();
};

