/* [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','2612',jdecode('Home'),jdecode(''),'/2612.html','true',[],''],
	['PAGE','16996',jdecode('About+Frank'),jdecode(''),'/16996.html','true',[],''],
	['PAGE','15612',jdecode('Seascapes'),jdecode(''),'/15612.html','true',[],''],
	['PAGE','16912',jdecode('Landscapes'),jdecode(''),'/16912.html','true',[],''],
	['PAGE','16933',jdecode('Still+Life'),jdecode(''),'/16933.html','true',[],''],
	['PAGE','30112',jdecode('Wildlife'),jdecode(''),'/30112.html','true',[],''],
	['PAGE','85812',jdecode('Watercolor+'),jdecode(''),'/85812.html','true',[],''],
	['PAGE','99880',jdecode('New+Oils'),jdecode(''),'/99880.html','true',[],''],
	['PAGE','14512',jdecode('California'),jdecode(''),'/14512.html','true',[],''],
	['PAGE','2663',jdecode('Small+Paintings'),jdecode(''),'/2663.html','true',[],''],
	['PAGE','2768',jdecode('Murals'),jdecode(''),'/2768.html','true',[],''],
	['PAGE','105454',jdecode('How+to+Hire+Me+'),jdecode(''),'/105454.html','true',[],''],
	['PAGE','2852',jdecode('Night+Illusions'),jdecode(''),'/2852.html','true',[],''],
	['PAGE','99889',jdecode('Glow+Murals'),jdecode(''),'/99889.html','true',[],''],
	['PAGE','16954',jdecode('Art+Galleries'),jdecode(''),'/16954.html','true',[],''],
	['PAGE','2894',jdecode('Press+%26+News'),jdecode(''),'/2894.html','true',[],''],
	['PAGE','2915',jdecode('Exhibitions'),jdecode(''),'/2915.html','true',[],''],
	['PAGE','16975',jdecode('Contact+Info'),jdecode(''),'/16975/index.html','true',[ 
		['PAGE','56412',jdecode('Contact+Info+%28follow+up+page%29'),jdecode(''),'/16975/56412.html','false',[],'']
	],''],
	['PAGE','2789',jdecode('Art+Links'),jdecode(''),'/2789.html','true',[],''],
	['PAGE','102560',jdecode('Guest+Book+'),jdecode(''),'/102560.html','true',[],''],
	['PAGE','17038',jdecode('Artist%26%23x27%3Bs+Thoughts'),jdecode(''),'/17038.html','true',[],''],
	['PAGE','103852',jdecode('Commissions'),jdecode(''),'/103852.html','true',[],''],
	['PAGE','105547',jdecode('Photo+Album'),jdecode(''),'/105547.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2612',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3ef2b803a87478d079e']={
webappId:    '1001',
documentId:  '16975',
internalId:  'ahw050inx3ef2b803a87478d079e',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3ef2b803a87478d079e']={
webappId:    '1001',
documentId:  '56412',
internalId:  'ahw050inx3ef2b803a87478d079e',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2612',
internalId:  '',
customField: '20100212-182550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15612',
internalId:  '',
customField: '20100212-182744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16912',
internalId:  '',
customField: '20100212-182845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16933',
internalId:  '',
customField: '20091229-190912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30112',
internalId:  '',
customField: '20100212-183056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85812',
internalId:  '',
customField: '20100221-092652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99880',
internalId:  '',
customField: '20100212-183617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14512',
internalId:  '',
customField: '20100221-092959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2663',
internalId:  '',
customField: '20100101-160510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2768',
internalId:  '',
customField: '20100121-192215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20100212-102510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99889',
internalId:  '',
customField: '20100123-161331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16954',
internalId:  '',
customField: '20091207-105902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20100221-092123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20090610-183449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16975',
internalId:  '',
customField: '20091207-191439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56412',
internalId:  '',
customField: '20070210-155352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2789',
internalId:  '',
customField: '20100211-215210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16996',
internalId:  '',
customField: '20100212-184013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102560',
internalId:  '',
customField: '20090306-102509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17038',
internalId:  '',
customField: '20100212-103843'
};
webappMappings['1002']=webappMappings['1002-102560ahw050inx3ef']={
webappId:    '1002',
documentId:  '102560',
internalId:  '102560ahw050inx3ef',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-fc2035fce084abd0b685f46f32e9a843']={
webappId:    '7060',
documentId:  '103852',
internalId:  'fc2035fce084abd0b685f46f32e9a843',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103852',
internalId:  '',
customField: '20091219-183408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105454',
internalId:  '',
customField: '20100123-162347'
};
webappMappings['7060']=webappMappings['7060-df99cdd06fdd24cbf24b7e7bf79e76ee']={
webappId:    '7060',
documentId:  '105547',
internalId:  'df99cdd06fdd24cbf24b7e7bf79e76ee',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105547',
internalId:  '',
customField: '20091220-125535'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3EF';
var companyName   = 'Frank+Wilson+Fine+Art';
var htmlTitle	  = '+Frank+Wilson+Fine+Art%3B+Paintings%2C+Murals%2C+Illusions';
var metaKeywords  = 'Frank+Wilson%2C+Frank+S.+Wilson%2C+artist%2C+muralist%2C+paintings%2C+murals%2C+oil+paintings%2C+watercolors%2C+landscapes%2C+seascapes%2C+still-life%2C+Starscapes%2C+StarscapesFX%2C+glow+murals%2C+illusions%2C+commissioned+art%2C+gouache%2C+gouache+paintings%2C+realism%2C+impressionism%2C+wilderness+paintings%2C+nocturnal+paintings%2C+glow+in+the+dark';
var metaContents  = 'Frank+Wilson%2C+Official+Web+Site+of+professional+artist+Frank+Wilson.+Oil+paintings%2C+murals%2C+watercolors%2C+fine+art%2C+landscapes%2C+seascapes%2C+still-life%2C+murals%2C+wall+murals%2C+ceiling+murals%2C+illusions%2C+StarscapesFX%2C+Stargazing+Ceilings%2C+Cosmic+Art%2C+glow+in+the+dark+murals%2Cand+commissioned+art.+';
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();
};
