/* [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','2701',jdecode('Home'),jdecode(''),'/2701.html','true',[],'',''],
	['PAGE','2773',jdecode('new'),jdecode(''),'/2773.html','true',[],'',''],
	['PAGE','2794',jdecode('About+us'),jdecode(''),'/2794.html','true',[],'',''],
	['PAGE','26099',jdecode('Limited+Editions'),jdecode(''),'/26099.html','true',[],'',''],
	['PAGE','38123',jdecode('cupcakes'),jdecode(''),'/38123.html','true',[],'',''],
	['PAGE','8401',jdecode('Fish+Glasses'),jdecode(''),'/8401.html','true',[],'',''],
	['PAGE','26975',jdecode('Crazy+Fish'),jdecode(''),'/26975.html','true',[],'',''],
	['PAGE','35123',jdecode('more+Crazy+Fish'),jdecode(''),'/35123.html','true',[],'',''],
	['PAGE','37423',jdecode('Fish+Vase'),jdecode(''),'/37423.html','true',[],'',''],
	['PAGE','11301',jdecode('Sea+Life+and+Nature+'),jdecode(''),'/11301.html','true',[],'',''],
	['PAGE','33623',jdecode('Silver+Regal+Bowl'),jdecode(''),'/33623.html','true',[],'',''],
	['PAGE','36023',jdecode('Silver+Scape+Vase'),jdecode(''),'/36023.html','true',[],'',''],
	['PAGE','16001',jdecode('Lighting+and+Vases'),jdecode(''),'/16001.html','true',[],'',''],
	['PAGE','2815',jdecode('Flowers'),jdecode(''),'/2815/index.html','true',[ 
		['PAGE','2836',jdecode('Wall+Mounted+Flowers'),jdecode(''),'/2815/2836.html','true',[],'',''],
		['PAGE','2857',jdecode('Standing+Flowers'),jdecode(''),'/2815/2857.html','true',[],'',''],
		['PAGE','2878',jdecode('Garden+Sun+Flowers'),jdecode(''),'/2815/2878.html','true',[],'','']
	],'',''],
	['PAGE','35323',jdecode('Cremation+Memorials'),jdecode(''),'/35323.html','true',[],'',''],
	['PAGE','2752',jdecode('Blowing+Glass'),jdecode(''),'/2752.html','true',[],'',''],
	['PAGE','2899',jdecode('Galleries'),jdecode(''),'/2899.html','true',[],'',''],
	['PAGE','15701',jdecode('How+to+find+us'),jdecode(''),'/15701/index.html','true',[ 
		['PAGE','19812',jdecode('How+to+find+us+%28follow+up+page%29'),jdecode(''),'/15701/19812.html','false',[],'','']
	],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='8CBBD8';
theSitetree.keyvisualId='2055';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='301';
theSitetree.graphicsetId='348';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='8CBBD8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'8CBBD8',
				keyvisualId: 	'2055',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'301',
				graphicsetId: 	'348',
				contentColor: 	'000000',
				contentBGColor: '8CBBD8',
				a_color: 		'8CBBD8',
				b_color: 		'338299',
				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:  '2701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-52923']={
webappId:    '1501',
documentId:  '2701',
internalId:  '52923',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36023',
internalId:  '',
customField: '20110607-152410'
};
webappMappings['7060']=webappMappings['7060-5f66a227f90096a2c050c17174932a9e']={
webappId:    '7060',
documentId:  '8401',
internalId:  '5f66a227f90096a2c050c17174932a9e',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-1520589856d597ce4a6f67f31c5394be']={
webappId:    '7060',
documentId:  '11301',
internalId:  '1520589856d597ce4a6f67f31c5394be',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-6fa67e6b66acd7562f427a4ad91e016d']={
webappId:    '7060',
documentId:  '16001',
internalId:  '6fa67e6b66acd7562f427a4ad91e016d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37423',
internalId:  '',
customField: '20110611-185536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26975',
internalId:  '',
customField: '20110706-175604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20100525-152313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2773',
internalId:  '',
customField: '20110606-161414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20090928-184815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2794',
internalId:  '',
customField: '20090515-140529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33623',
internalId:  '',
customField: '20110603-164511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26099',
internalId:  '',
customField: '20110607-153959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20080607-204657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20110606-161315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2815',
internalId:  '',
customField: '20080604-180045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2836',
internalId:  '',
customField: '20080604-181649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2857',
internalId:  '',
customField: '20080606-180808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2878',
internalId:  '',
customField: '20080606-181042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2752',
internalId:  '',
customField: '20091018-185510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2899',
internalId:  '',
customField: '20110607-155256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20080610-153747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19812',
internalId:  '',
customField: '20080605-222505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35323',
internalId:  '',
customField: '20110606-145222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35123',
internalId:  '',
customField: '20110706-175706'
};
webappMappings['7008']=webappMappings['7008-8308']={
webappId:    '7008',
documentId:  '15701',
internalId:  '8308',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38123',
internalId:  '',
customField: '20110706-180536'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXN3';
var companyName   = 'John+Cook+Studios';
var htmlTitle	  = 'John+Cook+Studios';
var metaKeywords  = 'blown+glass%2C+art+glass%2C+vases%2C+glass+flowers%2C+wall+mounted+flowers%2C+lamps%2C+wall+scounces%2C+chandeliers%2C+fish+glasses%2C+glass+fish+ornaments%2C+sand+dollars%2C+starfish%2C+floats%2C+fish+vase%2C+garden+sunflowers%2CJohn+Cook%2Cpaperweights%2C+cremation+memorials%2Ccupcakes';
var metaContents  = 'Hand+blown+glass+made+in+the+costal+beach+town+of+Gearhart%2C+OR.+John+Cook+master+glass+blower+has+been+blowing+glass+more+than+40+years+and+has+designed+works+of+arts+for+many+art+glass+collectors.From+small+glass+ornaments+to+7%27+tall+standing+giant+flowers+John+Cook+gets+inspiration+from+nature+and+creates+whimisical%2Cbeautiful+works+of+art.+Custom+lighting+and+art+work+are+welcomed.';
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();
};

