/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','594',jdecode('Products'),jdecode(''),'/594/index.html','true',[ 
		['PAGE','615',jdecode('Real+Estate+Products'),jdecode(''),'/594/615.html','true',[],'',''],
		['PAGE','636',jdecode('Election+Products'),jdecode(''),'/594/636.html','true',[],'',''],
		['PAGE','657',jdecode('Contractor+Products'),jdecode(''),'/594/657.html','true',[],'',''],
		['PAGE','678',jdecode('Banners'),jdecode(''),'/594/678.html','true',[],'',''],
		['PAGE','699',jdecode('Magnetic+Signs'),jdecode(''),'/594/699.html','true',[],'',''],
		['PAGE','3901',jdecode('Labor+Signs'),jdecode(''),'/594/3901.html','true',[],'',''],
		['PAGE','3922',jdecode('A-Frames'),jdecode(''),'/594/3922.html','true',[],'',''],
		['PAGE','3943',jdecode('Towing+Signs'),jdecode(''),'/594/3943.html','true',[],'',''],
		['PAGE','25433',jdecode('Decals'),jdecode(''),'/594/25433.html','true',[],'',''],
		['PAGE','25442',jdecode('Vinyl+Lettering'),jdecode(''),'/594/25442.html','true',[],'','']
	],'',''],
	['PAGE','25679',jdecode('Pricing'),jdecode(''),'/25679/index.html','false',[ 
		['PAGE','25688',jdecode('Stock+Riders%2FDecals'),jdecode(''),'/25679/25688.html','true',[],'',''],
		['PAGE','25697',jdecode('Name+Riders'),jdecode(''),'/25679/25697.html','true',[],'',''],
		['PAGE','26317',jdecode('For+Sale+Signs'),jdecode(''),'/25679/26317.html','true',[],'',''],
		['PAGE','25706',jdecode('Sign+Stakes'),jdecode(''),'/25679/25706.html','true',[],'',''],
		['PAGE','25715',jdecode('A-Frames'),jdecode(''),'/25679/25715.html','true',[],'',''],
		['PAGE','25724',jdecode('Brochure+Boxes'),jdecode(''),'/25679/25724.html','true',[],'',''],
		['PAGE','27073',jdecode('Election+Signs'),jdecode(''),'/25679/27073.html','true',[],'','']
	],'',''],
	['PAGE','46201',jdecode('Monthly+Specials'),jdecode(''),'/46201.html','true',[],'',''],
	['PAGE','741',jdecode('Contact'),jdecode(''),'/741/index.html','true',[ 
		['PAGE','44701',jdecode('E-mail+Us'),jdecode(''),'/741/44701.html','true',[],'',''],
		['PAGE','783',jdecode('Directions'),jdecode(''),'/741/783.html','true',[],'',''],
		['PAGE','3001',jdecode('Map'),jdecode(''),'/741/3001.html','true',[],'','']
	],'',''],
	['PAGE','2906',jdecode('Guestbook'),jdecode(''),'/2906.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Kingston';
theSitetree.paletteFamily='042287';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11146';
theSitetree.graphicsetId='11955';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='88BAEE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kingston',
				paletteFamily: 	'042287',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11146',
				graphicsetId: 	'11955',
				contentColor: 	'000000',
				contentBGColor: '88BAEE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20090408-174020'
};
webappMappings['1002']=webappMappings['1002-2906AHW050INE289']={
webappId:    '1002',
documentId:  '2906',
internalId:  '2906AHW050INE289',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3001',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-1221269']={
webappId:    '1501',
documentId:  '501',
internalId:  '1221269',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100715-112318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20090506-184725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20090521-160127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090422-191824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100901-161449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26317',
internalId:  '',
customField: '20100901-125144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20090508-184516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20090413-133350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20090422-192011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20090422-192034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20100901-155614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20100901-154118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3922',
internalId:  '',
customField: '20090422-192233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3943',
internalId:  '',
customField: '20100901-152240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25433',
internalId:  '',
customField: '20100901-153828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25442',
internalId:  '',
customField: '20100901-151745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2906',
internalId:  '',
customField: '20071226-192613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25679',
internalId:  '',
customField: '20090416-175503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25688',
internalId:  '',
customField: '20090422-191501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25697',
internalId:  '',
customField: '20100901-113537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25706',
internalId:  '',
customField: '20100903-142649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25715',
internalId:  '',
customField: '20100901-114032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25724',
internalId:  '',
customField: '20090422-191738'
};
webappMappings['7008']=webappMappings['7008-3199']={
webappId:    '7008',
documentId:  '44701',
internalId:  '3199',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27073',
internalId:  '',
customField: '20100714-164940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20090508-175604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46201',
internalId:  '',
customField: '20100902-112038'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE289';
var companyName   = 'Wilmes+Company+Inc.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%28650%29+755-5141';
var htmlTitle	  = 'Wilmes+Company%2C+Inc.';
var metaKeywords  = 'signs%2C+screen+printing%2C+magnetics%2C+banners%2C+vinyl+lettering%2C+decals%2C+election+signs%2C+real+estate+signs';
var metaContents  = 'Family+owned+and+operated+since+1933.+E-mail+us+at%3A+signs%40wilmes.com5978+Mission+St.%2C+San+Francisco+CA+94112.+Quality+Signs%2C+Great+Prices';
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();
};
