/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','16601',jdecode('Galleries'),jdecode(''),'/16601.html','true',[],''],
	['PAGE','27801',jdecode('Video+Production'),jdecode(''),'/27801/index.html','true',[ 
		['PAGE','27822',jdecode('Memorial+Tributes'),jdecode(''),'/27801/27822.html','true',[],''],
		['PAGE','27843',jdecode('Slideshows'),jdecode(''),'/27801/27843.html','true',[],''],
		['PAGE','27864',jdecode('Events'),jdecode(''),'/27801/27864.html','true',[],''],
		['PAGE','27885',jdecode('Commercials+and+Corporate'),jdecode(''),'/27801/27885.html','true',[],''],
		['PAGE','33301',jdecode('Scotland+Tour+Video'),jdecode(''),'/27801/33301.html','true',[],'']
	],''],
	['PAGE','25901',jdecode('Optimist+Youth+Football'),jdecode(''),'/25901.html','true',[],''],
	['PAGE','6985',jdecode('Weddings'),jdecode(''),'/6985/index.html','true',[ 
		['PAGE','18201',jdecode('Need+a+minister%3F'),jdecode(''),'/6985/18201.html','true',[],'']
	],''],
	['PAGE','699',jdecode('Contact'),jdecode(''),'/699.html','true',[],''],
	['PAGE','762',jdecode('About+us'),jdecode(''),'/762.html','true',[],''],
	['PAGE','7706',jdecode('Guestbook'),jdecode(''),'/7706/index.html','true',[ 
		['PAGE','7701',jdecode('Read+Guestbook'),jdecode(''),'/7706/7701.html','true',[],'']
	],''],
	['PAGE','24601',jdecode('Map'),jdecode(''),'/24601.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='A3CAFE';
theSitetree.keyvisualId='781';
theSitetree.keyvisualName='blumen.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='161';
theSitetree.contentColor='A3CAFE';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'A3CAFE',
				keyvisualId: 	'781',
				keyvisualName: 	'blumen.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'161',
				contentColor: 	'A3CAFE',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'A3CAFE',
				b_color: 		'87A7D2',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20071025-114934'
};
webappMappings['1002']=webappMappings['1002-7706AHW050INE7IO']={
webappId:    '1002',
documentId:  '7706',
internalId:  '7706AHW050INE7IO',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '24601',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100211-211349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20080130-223626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27822',
internalId:  '',
customField: '20080110-171359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27843',
internalId:  '',
customField: '20080110-173521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27864',
internalId:  '',
customField: '20080110-174701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27885',
internalId:  '',
customField: '20080110-181007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20080111-102645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20071026-160238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6985',
internalId:  '',
customField: '20071127-161135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20081003-203157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20091219-174011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20071122-095150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7706',
internalId:  '',
customField: '20070410-003024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20070405-084818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20070912-055604'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INE7IO';
var companyName   = 'Photography+by+Robert+Burns';
var htmlTitle	  = 'Photography+by+Robert+Burns';
var metaKeywords  = 'Photography%2C+photographs%2C+photos%2C+stock+images%2C+pictures%2C+outdoor%2C+landscapes%2C+National+Parks%2C+Arches%2C+Zion%2C+Grand+Canyon%2C+Yellowstone%2C+Bryce%2C+Canyonlands%2C+Capital+Reef%2C+SNRA%2C+Sawtooth+range%2C+mountains%2C+mtns%2C+wildlife%2C+buffalo%2C+mose%2C+elk%2C+deer%2C+antelope%2C+fox%2C+wildflowers%2C+flowers%2C+rainbows%2C+lakes%2C+waterfalls%2C+canyons%2C+syringa%2C+sandhill+cranes%2C+Boise%2C+Nampa%2C+Meridian%2C+Treasure+Valley%2C+Idaho%2C+Scotland%2C+castles%2C+portrait%2C+studio';
var metaContents  = 'Photographs%2C+stock+images%2C+scenic+landscapes%2C+wildlife%2C+scenery+of+Idaho%2C+National+Parks%2C+castles%2C+and+Scotland.+Portrait+photography%2C+wedding+photographer%2C+graduation+photos%2C+minister+services%2C+studio%2C+in+Boise+area.';
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();
};
