/* [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','5201',jdecode('Home'),jdecode(''), jdecode('%2F5201.html'), 'true',[],'',''],
	['PAGE','9243',jdecode('About+Resident+Artists'),jdecode(''), jdecode('%2F9243%2Findex.html'), 'true',[ 
		['PAGE','190193',jdecode('Linda+Burrell'),jdecode(''), jdecode('%2F9243%2F190193.html'), 'true',[],'',''],
		['PAGE','191456',jdecode('Gayle+Blackerby'),jdecode(''), jdecode('%2F9243%2F191456.html'), 'true',[],'',''],
		['PAGE','191477',jdecode('Lynda+Ayers'),jdecode(''), jdecode('%2F9243%2F191477.html'), 'true',[],'',''],
		['PAGE','216393',jdecode('Kim+Young'),jdecode(''), jdecode('%2F9243%2F216393.html'), 'true',[],'',''],
		['PAGE','216414',jdecode('Nancy+Farantatos'),jdecode(''), jdecode('%2F9243%2F216414.html'), 'true',[],'',''],
		['PAGE','262793',jdecode('Kathryn+Wilson'),jdecode(''), jdecode('%2F9243%2F262793.html'), 'true',[],'',''],
		['PAGE','191435',jdecode('Suzanne+Thomas'),jdecode(''), jdecode('%2F9243%2F191435.html'), 'true',[],'','']
	],'',''],
	['PAGE','9222',jdecode('Children%26%23x27%3Bs+Art+Lessons'),jdecode(''), jdecode('%2F9222%2Findex.html'), 'true',[ 
		['PAGE','247693',jdecode('Summer+Workshops'),jdecode(''), jdecode('%2F9222%2F247693.html'), 'false',[],'',''],
		['PAGE','247714',jdecode('Weekly+On-going+Classes'),jdecode(''), jdecode('%2F9222%2F247714.html'), 'true',[],'',''],
		['PAGE','10201',jdecode('Class+Registration+Forms'),jdecode(''), jdecode('%2F9222%2F10201.html'), 'true',[],'',''],
		['PAGE','247793',jdecode('Saturday+Workshops'),jdecode(''), jdecode('%2F9222%2F247793.html'), 'true',[],'','']
	],'',''],
	['PAGE','9201',jdecode('Paint+Party+Info+%26+Pics'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','238493',jdecode('Paint+Party+Register+%26+Pay'),jdecode(''), jdecode('%2F238493.html'), 'true',[],'',''],
	['PAGE','198593',jdecode('Adult+Workshops'),jdecode(''), jdecode('%2F198593.html'), 'false',[],'',''],
	['PAGE','259193',jdecode('Knitting+101+Classes'),jdecode(''), jdecode('%2F259193.html'), 'false',[],'',''],
	['PAGE','5501',jdecode('Monthly+Guest+Gallery+'),jdecode(''), jdecode('%2F5501.html'), 'true',[],'',''],
	['PAGE','10801',jdecode('Fine+Art+Gallery'),jdecode(''), jdecode('%2F10801.html'), 'true',[],'',''],
	['PAGE','196693',jdecode('+Jewelry+Gallery'),jdecode(''), jdecode('%2F196693.html'), 'true',[],'',''],
	['PAGE','8101',jdecode('Contact+Us'),jdecode(''), jdecode('%2F8101.html'), 'true',[],'',''],
	['PAGE','192393',jdecode('Directions+'),jdecode(''), jdecode('%2F192393.html'), 'true',[],'',''],
	['PAGE','9264',jdecode('Guestbook'),jdecode(''), jdecode('%2F9264.html'), 'true',[],'',''],
	['PAGE','198493',jdecode('Community+Gallery'),jdecode(''), jdecode('%2F198493.html'), 'false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='5351C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10894';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'netfirms',
  product: 'WSCSYSSSSLY0XYNE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'5351C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10894',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5351C2',
				e_color: 		'5351C2',
				f_color: 		'5351C2',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20120106-160601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20120124-133734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20111216-120038'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20111126-114820'
};
webappMappings['7008']=webappMappings['7008-154']={
webappId:    '7008',
documentId:  '8101',
internalId:  '154',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20110804-112110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9243',
internalId:  '',
customField: '20101230-101640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20110107-141756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20110105-160358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9264',
internalId:  '',
customField: '20100519-062527'
};
webappMappings['1002']=webappMappings['1002-9264anfi10inx2k8']={
webappId:    '1002',
documentId:  '9264',
internalId:  '9264anfi10inx2k8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190193',
internalId:  '',
customField: '20110108-173514'
};
webappMappings['7060']=webappMappings['7060-00edad35795697c16a67f946dff6f012']={
webappId:    '7060',
documentId:  '10801',
internalId:  '00edad35795697c16a67f946dff6f012',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216414',
internalId:  '',
customField: '20120124-200543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191456',
internalId:  '',
customField: '20110202-170721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216393',
internalId:  '',
customField: '20110108-173625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191435',
internalId:  '',
customField: '20111126-110459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191477',
internalId:  '',
customField: '20110823-110050'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '192393',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192393',
internalId:  '',
customField: '20100524-033322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247793',
internalId:  '',
customField: '20111230-113910'
};
webappMappings['7060']=webappMappings['7060-08caf46757bbe50f83a3933548ea8ef4']={
webappId:    '7060',
documentId:  '196693',
internalId:  '08caf46757bbe50f83a3933548ea8ef4',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '196693',
internalId:  '',
customField: '20101230-202608'
};
webappMappings['7060']=webappMappings['7060-04e652cca16123ee117bc557c36ecf32']={
webappId:    '7060',
documentId:  '198493',
internalId:  '04e652cca16123ee117bc557c36ecf32',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e10e6834d68a9946a3668d0e50791428']={
webappId:    '7060',
documentId:  '198593',
internalId:  'e10e6834d68a9946a3668d0e50791428',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198593',
internalId:  '',
customField: '20100524-104553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198493',
internalId:  '',
customField: '20100524-104353'
};
webappMappings['4001']=webappMappings['4001-17574658']={
webappId:    '4001',
documentId:  '238493',
internalId:  '17574658',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '238493',
internalId:  '',
customField: '20111125-174928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247693',
internalId:  '',
customField: '20110804-111850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247714',
internalId:  '',
customField: '20111216-115806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259193',
internalId:  '',
customField: '20120103-184329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262793',
internalId:  '',
customField: '20111130-150742'
};
webappMappings['7060']=webappMappings['7060-a14c3482e3e72fb9f7b249e7bcc30ba6']={
webappId:    '7060',
documentId:  '9201',
internalId:  'a14c3482e3e72fb9f7b249e7bcc30ba6',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'ANFI10INX2K8';
var companyName   = 'Sunflower+Studio+%26+Gallery';
var htmlTitle	  = 'Sunflower+Studio++-+Wake+Forest%2C+NC';
var metaKeywords  = 'artwork%2C+paintings%2C+jewelry%2C+pastels%2C+acrylic+paintings%2C+watercolor%2C+art+lessons%2C+childrens+art+lessons%2C+hand+forged+jewelry%2C+beaded+handmade+jewelry%2C+prints%2C+cards%2C+oil+paintings%2C+commissions%2C+lessons%2C+adult+art+lessons%2C+wake+forest%2C+nc%2C+custom+jewelry';
var metaContents  = 'Original+works+of+art+in+watercolors%2C+acrylics%2C+pastels+and+oils%2C+as+well+as+local+landmark+paintings+and+hand+forged+and+crafted+precious+metal+and+beaded+jewelry.+The+gallery+offers+a+unique+opportunity+to+meet+and+visit+with+each+artist+as+she+works.+Art+lessons+for+adults+and+children+offered+in+historic+downtown+Wake+Forest%2C+NC.+Call+919-570-0765+with+any+questions.';
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();
};

