/* [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','25944',jdecode('DO+NOT+EDIT'),jdecode(''), jdecode('%2F25944.html'), 'false',[],'',''],
	['PAGE','2101',jdecode('Welcome'),jdecode(''), jdecode('%2F2101%2Findex.html'), 'true',[ 
		['PAGE','138044',jdecode('Exhibitions'),jdecode(''), jdecode('%2F2101%2F138044.html'), 'true',[],'','']
	],'',''],
	['PAGE','25223',jdecode('Flowers+%26+Plants'),jdecode(''), jdecode('%2F25223.html'), 'true',[],'',''],
	['PAGE','41823',jdecode('Butterflies+%26+Insects'),jdecode(''), jdecode('%2F41823.html'), 'true',[],'',''],
	['PAGE','46223',jdecode('Animals'),jdecode(''), jdecode('%2F46223.html'), 'true',[],'',''],
	['PAGE','42444',jdecode('Sunsets'),jdecode(''), jdecode('%2F42444.html'), 'true',[],'',''],
	['PAGE','25923',jdecode('New+Jersey'),jdecode(''), jdecode('%2F25923.html'), 'true',[],'',''],
	['PAGE','50923',jdecode('Historic+Places'),jdecode(''), jdecode('%2F50923.html'), 'true',[],'',''],
	['PAGE','105244',jdecode('Canal+House'),jdecode(''), jdecode('%2F105244.html'), 'true',[],'',''],
	['PAGE','114944',jdecode('Waterways'),jdecode(''), jdecode('%2F114944.html'), 'true',[],'',''],
	['PAGE','122444',jdecode('Gardens'),jdecode(''), jdecode('%2F122444.html'), 'true',[],'',''],
	['PAGE','123444',jdecode('Landscapes'),jdecode(''), jdecode('%2F123444.html'), 'true',[],'',''],
	['PAGE','123465',jdecode('Other+Images'),jdecode(''), jdecode('%2F123465.html'), 'true',[],'',''],
	['PAGE','46123',jdecode('Photographic+Art'),jdecode(''), jdecode('%2F46123.html'), 'true',[],'',''],
	['PAGE','55823',jdecode('Awards'),jdecode(''), jdecode('%2F55823%2Findex.html'), 'true',[ 
		['PAGE','4833',jdecode('Page+2'),jdecode(''), jdecode('%2F55823%2F4833.html'), 'true',[],'','']
	],'',''],
	['PAGE','4875',jdecode('About'),jdecode(''), jdecode('%2F4875.html'), 'true',[],'',''],
	['PAGE','14470',jdecode('Contact'),jdecode(''), jdecode('%2F14470.html'), 'true',[],'',''],
	['PAGE','20523',jdecode('Guestbook'),jdecode(''), jdecode('%2F20523.html'), 'true',[],'',''],
	['PAGE','83744',jdecode('BLOG+RRV+NEWSLETTER'),jdecode(''), jdecode('%2F83744.html'), 'true',[],'',''],
	['PAGE','14449',jdecode('Links'),jdecode(''), jdecode('%2F14449.html'), 'true',[],'',''],
	['PAGE','150344',jdecode('Gallery+24%2F7+Booklet+'),jdecode(''), jdecode('%2F150344.html'), 'false',[],'',''],
	['PAGE','83244',jdecode('BLOG+SLIDESHOW'),jdecode(''), jdecode('%2F83244.html'), 'false',[],'',''],
	['PAGE','132244',jdecode('Featured+Story'),jdecode(''), jdecode('%2F132244.html'), 'false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='450202';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10615';
theSitetree.graphicsetId='10810';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='450202';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'verizon',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delta',
				paletteFamily: 	'450202',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10615',
				graphicsetId: 	'10810',
				contentColor: 	'FFFFFF',
				contentBGColor: '450202',
				a_color: 		'910F0F',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20120208-171005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122444',
internalId:  '',
customField: '20120125-174115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4833',
internalId:  '',
customField: '20120203-091140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4875',
internalId:  '',
customField: '20120122-112759'
};
webappMappings['7060']=webappMappings['7060-cf2d7674f89cca355452ac0bf9edae36']={
webappId:    '7060',
documentId:  '83244',
internalId:  'cf2d7674f89cca355452ac0bf9edae36',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138044',
internalId:  '',
customField: '20120127-153557'
};
webappMappings['7008']=webappMappings['7008-2667']={
webappId:    '7008',
documentId:  '14470',
internalId:  '2667',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50923',
internalId:  '',
customField: '20120124-130537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114944',
internalId:  '',
customField: '20120208-113757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14449',
internalId:  '',
customField: '20120117-205759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14470',
internalId:  '',
customField: '20120117-205620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25944',
internalId:  '',
customField: '20090703-201521'
};
webappMappings['1002']=webappMappings['1002-20523ahw050inl4iv']={
webappId:    '1002',
documentId:  '20523',
internalId:  '20523ahw050inl4iv',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25923',
internalId:  '',
customField: '20120124-125640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25223',
internalId:  '',
customField: '20120208-100229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83744',
internalId:  '',
customField: '20120124-134642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20523',
internalId:  '',
customField: '20120214-085444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123444',
internalId:  '',
customField: '20120203-175343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123465',
internalId:  '',
customField: '20120212-194045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132244',
internalId:  '',
customField: '20120108-155249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105244',
internalId:  '',
customField: '20120124-130713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42444',
internalId:  '',
customField: '20120124-125410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41823',
internalId:  '',
customField: '20120208-181457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46123',
internalId:  '',
customField: '20120204-094120'
};
webappMappings['1501']=webappMappings['1501-10488346']={
webappId:    '1501',
documentId:  '2101',
internalId:  '10488346',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46223',
internalId:  '',
customField: '20120124-125237'
};
webappMappings['7050']=webappMappings['7050-845']={
webappId:    '7050',
documentId:  '83744',
internalId:  '845',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-c2a2350ae84776e227b079a6194dee91']={
webappId:    '7060',
documentId:  '150344',
internalId:  'c2a2350ae84776e227b079a6194dee91',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55823',
internalId:  '',
customField: '20120217-140740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83244',
internalId:  '',
customField: '20111211-094038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150344',
internalId:  '',
customField: '20120217-141250'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INL4IV';
var companyName   = 'ViviansVille';
var htmlTitle	  = 'ViviansVille';
var metaKeywords  = 'photography%2C+photographer%2C+photographers%2C+nature%2C+flowers%2C+pictures%2C+New+Jersey%2C+Franklin+Township%2C+NJ%2C+Vivian+Bedoya%2C+Vivian+S.+Bedoya%2C+viviansville%2C+ViviansVille%2C+fine+arts+photography%2C+Somerset+county%2C+Somerset%2C+Gallery+24%2F7%2C+public+arts+project%2C+traffic+control+boxes%2C+Gallery+24%2F7+Public+Arts+Project%2C+artful+traffic+control+boxes%2C+Grounds+For+Sculpture%2C+Visual+Arts+Center+of+NJ%2C+smoke+trails%2C+arts';
var metaContents  = 'Fine+arts+photography+by+Vivian+S.+Bedoya';
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();
};

