/* [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','6201',jdecode('Home'),jdecode(''),'/6201.html','true',[],''],
	['PAGE','24493',jdecode('News'),jdecode(''),'/24493.html','true',[],''],
	['PAGE','6252',jdecode('Panel+Processing'),jdecode(''),'/6252.html','true',[],''],
	['PAGE','16993',jdecode('Architectural'),jdecode(''),'/16993.html','true',[],''],
	['PAGE','6522',jdecode('Comerical+Case+'),jdecode(''),'/6522/index.html','true',[ 
		['PAGE','18493',jdecode('St+Paul%26%23x27%3Bs+School'),jdecode(''),'/6522/18493.html','true',[],''],
		['PAGE','19293',jdecode('KB+Home+'),jdecode(''),'/6522/19293.html','true',[],''],
		['PAGE','19314',jdecode('Windward'),jdecode(''),'/6522/19314.html','true',[],'']
	],''],
	['PAGE','18514',jdecode('Builder+Studio'),jdecode(''),'/18514/index.html','true',[ 
		['PAGE','16893',jdecode('KB+Home+'),jdecode(''),'/18514/16893.html','true',[],''],
		['PAGE','17098',jdecode('Windward+'),jdecode(''),'/18514/17098.html','true',[],''],
		['PAGE','21893',jdecode('Smith+Family+'),jdecode(''),'/18514/21893.html','true',[],'']
	],''],
	['PAGE','6273',jdecode('POP+Displays'),jdecode(''),'/6273/index.html','true',[ 
		['PAGE','18535',jdecode('Ceramic+POP'),jdecode(''),'/6273/18535.html','true',[],''],
		['PAGE','18556',jdecode('Carpet+POP'),jdecode(''),'/6273/18556.html','true',[],''],
		['PAGE','24393',jdecode('Blinds+%26+Shutters'),jdecode(''),'/6273/24393.html','true',[],''],
		['PAGE','26193',jdecode('Spirit+POP%26%23x27%3Bs'),jdecode(''),'/6273/26193.html','true',[],'']
	],''],
	['PAGE','16914',jdecode('Retail'),jdecode(''),'/16914/index.html','true',[ 
		['PAGE','17056',jdecode('Beverly+Shoes'),jdecode(''),'/16914/17056.html','true',[],''],
		['PAGE','17077',jdecode('Hand+%26+Stone'),jdecode(''),'/16914/17077.html','true',[],'']
	],''],
	['PAGE','6294',jdecode('About+us'),jdecode(''),'/6294.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='C239A1';
theSitetree.keyvisualId='8817';
theSitetree.keyvisualName='KV_03.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12652';
theSitetree.contentColor='CCCCCC';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Holz',
				paletteFamily: 	'C239A1',
				keyvisualId: 	'8817',
				keyvisualName: 	'KV_03.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12652',
				contentColor: 	'CCCCCC',
				contentBGColor: '262626',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'C039A3',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100522-190306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6252',
internalId:  '',
customField: '20081209-203537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6273',
internalId:  '',
customField: '20100522-185944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100522-190512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6294',
internalId:  '',
customField: '20100705-190058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16993',
internalId:  '',
customField: '20100522-184724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16893',
internalId:  '',
customField: '20081207-180943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16914',
internalId:  '',
customField: '20100705-190002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17056',
internalId:  '',
customField: '20081207-182900'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17077',
internalId:  '',
customField: '20081207-192142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17098',
internalId:  '',
customField: '20081207-170257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18493',
internalId:  '',
customField: '20081207-161003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18514',
internalId:  '',
customField: '20081207-163938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19293',
internalId:  '',
customField: '20081207-173919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18535',
internalId:  '',
customField: '20081205-211906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18556',
internalId:  '',
customField: '20081205-213117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19314',
internalId:  '',
customField: '20081207-162924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21893',
internalId:  '',
customField: '20081207-184203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24493',
internalId:  '',
customField: '20081209-201440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24393',
internalId:  '',
customField: '20081209-145919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26193',
internalId:  '',
customField: '20100522-190140'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2IKR';
var companyName   = 'DYNAMIC+DISPLAYS+INC.';
var htmlTitle	  = '';
var metaKeywords  = 'point+of+purchase%2C+POP%2C+displays%2C+carpet+displays%2C+ceramic+tile+displays%2C+case+work%2C+casework%2C+panel+processing%2C+closet+parts%2C+kitchen+cabinet+parts%2C+kitchen+cabinets%2C+closet+systems%2C+California+closets%2C+unique+plywood+parts%2C+retail+showrooms%2C+commercial+casework%2C+commercial+case+work%2C+weeke+machining+center%2C+BP120%2C+vanity+cabinets%2C+bathroom+cabinets%2C++plywood+cabinets%2C+garage+cabinets%2C+garage+cabinet+parts%2C+entertainment+centers%2C+entertainment+center+parts';
var metaContents  = 'point+of+purchase%2C+POP%2C+displays%2C+carpet+displays%2C+ceramic+tile+displays%2C+case+work%2C+casework%2C+panel+processing';
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();
};

