/* [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','6601',jdecode('Home'),jdecode(''), jdecode('%2F6601.html'), 'true',[],'',''],
	['PAGE','6652',jdecode('History'),jdecode(''), jdecode('%2F6652.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('Featured+Products'),jdecode(''), jdecode('%2F12101%2Findex.html'), 'true',[ 
		['PAGE','26601',jdecode('Overhead+Lamps%2FBulbs'),jdecode(''), jdecode('%2F12101%2F26601.html'), 'true',[],'',''],
		['PAGE','36701',jdecode('Portable+Projector'),jdecode(''), jdecode('%2F12101%2F36701.html'), 'true',[],'',''],
		['PAGE','12222',jdecode('Laminators+'),jdecode(''), jdecode('%2F12101%2F12222.html'), 'true',[],'',''],
		['PAGE','19401',jdecode('Rolls%2FPouches'),jdecode(''), jdecode('%2F12101%2F19401.html'), 'true',[],'',''],
		['PAGE','12201',jdecode('Stage%2FStudio+'),jdecode(''), jdecode('%2F12101%2F12201.html'), 'true',[],'',''],
		['PAGE','23001',jdecode('4+Ft+Fluorescents'),jdecode(''), jdecode('%2F12101%2F23001.html'), 'true',[],'',''],
		['PAGE','12122',jdecode('Home%2FShop%2FGarage'),jdecode(''), jdecode('%2F12101%2F12122.html'), 'true',[],'',''],
		['PAGE','21401',jdecode('By+The+Case'),jdecode(''), jdecode('%2F12101%2F21401.html'), 'true',[],'','']
	],'',''],
	['PAGE','39501',jdecode('Lamination+Special'),jdecode(''), jdecode('%2F39501.html'), 'true',[],'',''],
	['PAGE','6901',jdecode('LCD+Lamp+Ordering'),jdecode(''), jdecode('%2F6901.html'), 'true',[],'',''],
	['PAGE','11901',jdecode('Product+Ordering+'),jdecode(''), jdecode('%2F11901.html'), 'true',[],'',''],
	['PAGE','35601',jdecode('Buy+Idaho'),jdecode(''), jdecode('%2F35601.html'), 'true',[],'',''],
	['PAGE','30501',jdecode('D+%26+B+Brite+Lites+Blog'),jdecode(''), jdecode('%2F30501.html'), 'true',[],'',''],
	['PAGE','19422',jdecode('Guestbook'),jdecode(''), jdecode('%2F19422.html'), 'true',[],'',''],
	['ITEM','42201',jdecode('Facebook'),jdecode(''), jdecode('%3Cdiv+style%3D%22width%3A300px%3B+height%3A250px%22%3E%3Ca+href%3D%22http%3A%2F%2Fwww.facebook.com%2FSmallBusinessSaturday%22%3E%3Cimg+src%3D%22http%3A%2F%2Fcdn.vitrue.com%2Fvitrue%2Famex%2Fimages%2FembedAd.png%22%2F%3E%3C%2Fa%3E%3C%2Fdiv%3E'), 'true',[],'','_blank']];
var siteelementCount=18;
theSitetree.topTemplateName='Folder';
theSitetree.paletteFamily='A5C14F';
theSitetree.keyvisualId='11088';
theSitetree.keyvisualName='kv_11088.jpg';
theSitetree.fontsetId='31973';
theSitetree.graphicsetId='13809';
theSitetree.contentColor='54524D';
theSitetree.contentBGColor='A5C14F';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Folder',
				paletteFamily: 	'A5C14F',
				keyvisualId: 	'11088',
				keyvisualName: 	'kv_11088.jpg',
				fontsetId: 		'31973',
				graphicsetId: 	'13809',
				contentColor: 	'54524D',
				contentBGColor: 'A5C14F',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20110829-175235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6652',
internalId:  '',
customField: '20090608-183243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20090611-135444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20090612-193256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20090616-182704'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12122',
internalId:  '',
customField: '20090611-164317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20101005-222036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20091205-112259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12222',
internalId:  '',
customField: '20090611-134951'
};
webappMappings['4001']=webappMappings['4001-17645544']={
webappId:    '4001',
documentId:  '11901',
internalId:  '17645544',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20090612-191139'
};
webappMappings['7050']=webappMappings['7050-9671']={
webappId:    '7050',
documentId:  '30501',
internalId:  '9671',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20090609-121045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20091207-201710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19422',
internalId:  '',
customField: '20091118-172951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20100311-142854'
};
webappMappings['1501']=webappMappings['1501-18058291']={
webappId:    '1501',
documentId:  '6601',
internalId:  '18058291',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20091118-170638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20090923-195653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20110829-174258'
};
webappMappings['1002']=webappMappings['1002-19422aendu0in3mlu']={
webappId:    '1002',
documentId:  '19422',
internalId:  '19422aendu0in3mlu',
customField: 'icq=false'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN3MLU';
var companyName   = 'D+%26+B+BRITE+LITES';
var htmlTitle	  = 'D+%26+B+BRITE+LITES';
var metaKeywords  = '+Bulbs+Lamp+Overhead+Projectors+Bulbs+Lamps++Rear+Projection+T.V.+Bulbs+Fluorescent+Lighting+T8s+T12s+Automotive+Aircraft++Industrial++Medical+Stage++Studio+Track+Lighting+laminating+film+pouches+for+Laminators';
var metaContents  = 'Bulbs%2C++Lamps%2C+Overhead+Projectors++Rear+Projection+T.V.+Bulbs+Fluorescent+Lighting+T8s+T12s+Automotive+Aircraft+Industrial*++Medical+*Stage++Studio*Track+Lighting*Laminating+Film++Pouches+for+Laminators';
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();
};

