/* [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','601',jdecode('home'),jdecode(''),'/601.html','true',[],''],
	['PAGE','6501',jdecode('what%26%23x27%3Bs+new+%26+groovy'),jdecode(''),'/6501.html','true',[],''],
	['PAGE','146443',jdecode('some+tid+bits+about+me'),jdecode(''),'/146443/index.html','true',[ 
		['PAGE','146434',jdecode('bio+.+.+.+of+sorts'),jdecode(''),'/146443/146434.html','true',[],''],
		['PAGE','146422',jdecode('publishing+credits'),jdecode(''),'/146443/146422.html','true',[],''],
		['PAGE','15001',jdecode('blah%2C+blah+.+.+.+blah'),jdecode(''),'/146443/15001.html','true',[],'']
	],''],
	['PAGE','1201',jdecode('upcoming+events'),jdecode(''),'/1201.html','true',[],''],
	['PAGE','130101',jdecode('blog'),jdecode(''),'/130101.html','true',[],''],
	['PAGE','146832',jdecode('skellyopolis+preview'),jdecode(''),'/146832.html','true',[],''],
	['PAGE','146380',jdecode('art'),jdecode(''),'/146380/index.html','true',[ 
		['PAGE','1222',jdecode('gallery+01'),jdecode(''),'/146380/1222.html','true',[],''],
		['PAGE','1243',jdecode('gallery+02'),jdecode(''),'/146380/1243.html','true',[],''],
		['PAGE','19201',jdecode('gallery+03'),jdecode(''),'/146380/19201.html','true',[],''],
		['PAGE','110601',jdecode('gallery+04'),jdecode(''),'/146380/110601.html','true',[],'']
	],''],
	['PAGE','146390',jdecode('black+%26+white+art'),jdecode(''),'/146390/index.html','true',[ 
		['PAGE','1264',jdecode('gallery-01'),jdecode(''),'/146390/1264.html','true',[],'']
	],''],
	['PAGE','146401',jdecode('dimensional+art'),jdecode(''),'/146401/index.html','true',[ 
		['PAGE','144848',jdecode('gallery-01'),jdecode(''),'/146401/144848.html','true',[],'']
	],''],
	['PAGE','146410',jdecode('digital+art'),jdecode(''),'/146410/index.html','true',[ 
		['PAGE','27601',jdecode('gallery-01'),jdecode(''),'/146410/27601.html','true',[],'']
	],''],
	['PAGE','144857',jdecode('from+u'),jdecode(''),'/144857.html','true',[],''],
	['PAGE','1285',jdecode('books'),jdecode(''),'/1285.html','true',[],''],
	['PAGE','21206',jdecode('the+guestbook'),jdecode(''),'/21206.html','true',[],''],
	['PAGE','1327',jdecode('make+contact'),jdecode(''),'/1327.html','true',[],''],
	['PAGE','7601',jdecode('link-age'),jdecode(''),'/7601.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='555454';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'555454',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091228-000348'
};
webappMappings['1002']=webappMappings['1002-21206AHW050IN2H36']={
webappId:    '1002',
documentId:  '21206',
internalId:  '21206AHW050IN2H36',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100107-005659'
};
webappMappings['1501']=webappMappings['1501-812896']={
webappId:    '1501',
documentId:  '601',
internalId:  '812896',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130101',
internalId:  '',
customField: '20080419-001740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20100107-004905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20091003-012808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144848',
internalId:  '',
customField: '20090930-233216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144857',
internalId:  '',
customField: '20090410-014825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1222',
internalId:  '',
customField: '20080810-011020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1243',
internalId:  '',
customField: '20081226-202021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20081226-203255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110601',
internalId:  '',
customField: '20081226-210650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1264',
internalId:  '',
customField: '20090930-232605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20080606-015114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1285',
internalId:  '',
customField: '20081215-165504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21206',
internalId:  '',
customField: '20080419-003241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1327',
internalId:  '',
customField: '20080419-003340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20080825-003113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146832',
internalId:  '',
customField: '20100111-200219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146380',
internalId:  '',
customField: '20090930-233800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146390',
internalId:  '',
customField: '20090930-233654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146401',
internalId:  '',
customField: '20090930-233301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146410',
internalId:  '',
customField: '20090930-233556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146422',
internalId:  '',
customField: '20091001-002033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146434',
internalId:  '',
customField: '20091003-013200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146443',
internalId:  '',
customField: '20091003-151325'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2H36';
var companyName   = '';
var htmlTitle	  = 'www.jimmypickering.com';
var metaKeywords  = 'jimmy+pickering%2C+low+brow%2C+art%2C+painting%2C+childrens+book%2C+illustration%2C+low+brow%2C+pop+surrealism%2C+author%2C+illustrator%2C+designer%2C+theme+park%2C+Jimmy+Pickering%2C+the+disney+gallery%2C+walt+disney+imagineering%2C+imagineer%2C+the+disney+gallery%2C+cal-arts%2C+california+institute+of+the+arts%2C+wdi%2C+skelly%2C+skelly+the+skeleton+girl%2C+disneyland%2C+disney%2C+gay+artist%2C+gay+author%2C+yummy+wine+bar++bistro%2C+skelly++femur%2C+skelly+and+femur%2C+lunar+boy+gallery%2C+artist%2C+universal+studios%2C+universal+creative%2C+jimmy%2C+pickering%2C+lunar+boy+gallery%2C';
var metaContents  = 'jimmy+pickering%2C+low+brow%2C+art%2C+painting%2C+childrens+book%2C+illustration%2C+low+brow%2C+pop+surrealism%2C+author%2C+illustrator%2C+designer%2C+theme+park%2C+Jimmy+Pickering%2C+the+disney+gallery%2C+walt+disney+imagineering%2C+imagineer%2C+the+disney+gallery%2C+cal-arts%2C+california+institute+of+the+arts%2C+wdi%2C+skelly%2C+skelly+the+skeleton+girl%2C+disneyland%2C+disney%2C+sugar%2C+yummy+wine+bar++bistro%2C+skelly++femur%2C+skelly+and+femur%2C+lunar+boy+gallery%2C+artist%2C+universal+studios%2C+universal+creative%2C+jimmy%2C+pickering%2C+lunar+boy+gallery%2C+';
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();
};
