/* [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(''),'/5201.html','true',[],'',''],
	['PAGE','5252',jdecode('About+me'),jdecode(''),'/5252.html','true',[],'',''],
	['PAGE','5801',jdecode('Picture+gallerys'),jdecode(''),'/5801/index.html','true',[ 
		['PAGE','14801',jdecode('Jan+2010+Gallery'),jdecode(''),'/5801/14801.html','true',[],'',''],
		['PAGE','12001',jdecode('Sept+09+Firings+gallery'),jdecode(''),'/5801/12001.html','true',[],'',''],
		['PAGE','8801',jdecode('Gallery+2'),jdecode(''),'/5801/8801.html','false',[],'',''],
		['PAGE','10101',jdecode('Gallery+3'),jdecode(''),'/5801/10101.html','false',[],'',''],
		['PAGE','11001',jdecode('Gallery+4'),jdecode(''),'/5801/11001.html','false',[],'','']
	],'',''],
	['PAGE','5822',jdecode('Waste+veg+oil+firing%2FUPDATED+JAN2010'),jdecode(''),'/5822.html','true',[],'',''],
	['PAGE','5843',jdecode('Guest+book'),jdecode(''),'/5843.html','true',[],'',''],
	['PAGE','5864',jdecode('Contact+me'),jdecode(''),'/5864.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10554';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10554',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100620-081843'
};
webappMappings['1002']=webappMappings['1002-5843ahw050inl7ya']={
webappId:    '1002',
documentId:  '5843',
internalId:  '5843ahw050inl7ya',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-3304']={
webappId:    '7008',
documentId:  '5864',
internalId:  '3304',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5252',
internalId:  '',
customField: '20100126-172014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100712-101531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5822',
internalId:  '',
customField: '20100617-121947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5843',
internalId:  '',
customField: '20090515-210530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5864',
internalId:  '',
customField: '20090515-210830'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090804-112656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20090804-112914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20090804-113018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20090917-191527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20100130-211636'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INL7YA';
var companyName   = 'Jon+Faulkner+Pottery';
var htmlTitle	  = 'Jon+Faulkner+Pottery';
var metaKeywords  = 'Jon+was+born+in+the+UK+and+had+an+early+start+in+ceramics+at+the+age+of+15+at+Crich+Pottery+in+Derbyshire.++By+age+17+Jon+was+a+full+time+thrower+for+Chatsworth+Ceramics+and+a+year+later+was+offered+a+position+at+Dartington+Pottery+in+Devon.++Dartington+was+Jons+favourite+source+of+inspiration+being+exposed+to+international+artists%2C+kiln+building%2C+wood+and+salt+firing+among+many+other+aspects+of+ceramics.+In+1993+Jon+came+to+Bermuda+to+work+as+a+production+thrower+for+Island+Pottery.++Shortly+after+he+started+Bermuda+Ceramics+in+Somerset+which+subsequently+expanded+and+moved+to+its+current+location+under+the+name+Bermuda+Clayworks.++Jon+sold+his+interest+in+the+business+but+remained+onsite+and+established+his+own+studio+-+Jon+Faulkner+Pottery+-++to+focus+on+developing+his+skills+and+creativity+-+starting+with+Raku+and+then+salt+glazed+ceramics.++Jon+works+primarily+in+stoneware+and+porcelain+and+has+a+following+of+collectors+of+his+unique+work.+His+series+of+slanted+salt+glazed+tableware+have+been+thrown+on+the+wheel%2C+then+cut+and+reassembled+on+an+angle+-+provoking+much+conversation+and+intrigue.+Jon+also+creates+his+own+glazes+rather+than+using+commercially+prepared+ones.++He+currently+produces+a+porcelain+line+finished+with+a+deep+chocolate+Japanese+tenmoku+glaze+that+are+accented+with+his+hand+made+laminated+Bermuda+Cedar+and+white+beech+handles.++His+current+project+is+a+large+onsite+brick+arch+kiln+which+is+fired+using+environmental+biofuel+-++recycled+waste+vegetable+oil.++Jons+creativity+is+boundless+and+his+passion+for+his+art+clearly+shows+in+his+work.';
var metaContents  = 'Jon+Faulkner+Pottery%2C+handmade+contemporary+salt+glazed+stoneware+fired+with+wvo%2C+waste+vegetable+oil+in+the+pottery+kiln+reaching+temperatures+of+2300+degrees';
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();
};
