/* [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','20201',jdecode('Home'),jdecode(''),'/20201.html','true',[],''],
	['PAGE','37201',jdecode('Photos'),jdecode(''),'/37201/index.html','true',[ 
		['PAGE','37501',jdecode('Guitars+Made'),jdecode(''),'/37201/37501.html','true',[],''],
		['PAGE','37522',jdecode('Guitars+Repaired'),jdecode(''),'/37201/37522.html','true',[],''],
		['PAGE','37543',jdecode('Hobbies'),jdecode(''),'/37201/37543.html','true',[],'']
	],''],
	['PAGE','49599',jdecode('Pricing'),jdecode(''),'/49599/index.html','true',[ 
		['PAGE','51299',jdecode('Instruments'),jdecode(''),'/49599/51299.html','true',[],''],
		['PAGE','51320',jdecode('Body+Types'),jdecode(''),'/49599/51320.html','true',[],''],
		['PAGE','51341',jdecode('Necks'),jdecode(''),'/49599/51341.html','true',[],''],
		['PAGE','51362',jdecode('Finishes'),jdecode(''),'/49599/51362.html','true',[],''],
		['PAGE','51383',jdecode('Bindings'),jdecode(''),'/49599/51383.html','true',[],''],
		['PAGE','51404',jdecode('Repairs'),jdecode(''),'/49599/51404.html','true',[],'']
	],''],
	['PAGE','37701',jdecode('Entertainment'),jdecode(''),'/37701/index.html','true',[ 
		['PAGE','51425',jdecode('Clubs'),jdecode(''),'/37701/51425.html','true',[],''],
		['PAGE','51446',jdecode('Shows'),jdecode(''),'/37701/51446.html','true',[],'']
	],''],
	['PAGE','51467',jdecode('Work+Shop'),jdecode(''),'/51467.html','true',[],''],
	['PAGE','21564',jdecode('Links'),jdecode(''),'/21564.html','true',[],''],
	['PAGE','21585',jdecode('Contact'),jdecode(''),'/21585.html','true',[],''],
	['PAGE','21801',jdecode('Sponsor'),jdecode(''),'/21801.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333F65',
				b_color: 		'040507',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20090306-112126'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '20201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20090217-074437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21585',
internalId:  '',
customField: '20090212-074604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21564',
internalId:  '',
customField: '20090306-123842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20090126-084402'
};
webappMappings['1501']=webappMappings['1501-12438680']={
webappId:    '1501',
documentId:  '20201',
internalId:  '12438680',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37201',
internalId:  '',
customField: '20090217-073915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37522',
internalId:  '',
customField: '20090212-073754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20090208-070758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37543',
internalId:  '',
customField: '20090112-125657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51362',
internalId:  '',
customField: '20090207-135338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51383',
internalId:  '',
customField: '20090207-135402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49599',
internalId:  '',
customField: '20090210-092903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51299',
internalId:  '',
customField: '20090208-081108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51425',
internalId:  '',
customField: '20090208-065942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51320',
internalId:  '',
customField: '20090207-133327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51341',
internalId:  '',
customField: '20090207-133327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51404',
internalId:  '',
customField: '20090207-133327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51446',
internalId:  '',
customField: '20090207-133327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51467',
internalId:  '',
customField: '20090207-133327'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPEP8';
var companyName   = 'Laccone+Custom+Guitars';
var htmlTitle	  = 'Laccone+Custom+Guitars';
var metaKeywords  = '';
var metaContents  = '';
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();
};
