/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],''],
	['PAGE','652',jdecode('About+Us'),jdecode(''),'/652.html','true',[],''],
	['PAGE','673',jdecode('Our+Products'),jdecode(''),'/673/index.html','true',[ 
		['PAGE','14412',jdecode('8.5+X+11+Sheets'),jdecode(''),'/673/14412.html','true',[],''],
		['PAGE','14433',jdecode('8.5+X+14+Sheets'),jdecode(''),'/673/14433.html','true',[],''],
		['PAGE','14454',jdecode('11+X+17+Sheets'),jdecode(''),'/673/14454.html','true',[],''],
		['PAGE','736',jdecode('Parent+Sheets'),jdecode(''),'/673/736.html','true',[],''],
		['PAGE','694',jdecode('File+Folder'),jdecode(''),'/673/694.html','true',[],''],
		['PAGE','715',jdecode('Kraft'),jdecode(''),'/673/715.html','true',[],''],
		['PAGE','11312',jdecode('LWC'),jdecode(''),'/673/11312.html','true',[],''],
		['PAGE','11333',jdecode('Board'),jdecode(''),'/673/11333.html','true',[],''],
		['PAGE','11354',jdecode('News'),jdecode(''),'/673/11354.html','true',[],''],
		['PAGE','25312',jdecode('Wrap'),jdecode(''),'/673/25312.html','true',[],''],
		['PAGE','11375',jdecode('Uncoated'),jdecode(''),'/673/11375.html','true',[],''],
		['PAGE','11396',jdecode('Coated-Free'),jdecode(''),'/673/11396.html','true',[],''],
		['PAGE','11417',jdecode('Liner-Med'),jdecode(''),'/673/11417.html','true',[],''],
		['PAGE','25112',jdecode('C1S%2F+C2S'),jdecode(''),'/673/25112.html','true',[],''],
		['PAGE','25212',jdecode('Envelope'),jdecode(''),'/673/25212.html','true',[],'']
	],''],
	['PAGE','820',jdecode('Contact+Us'),jdecode(''),'/820.html','true',[],''],
	['PAGE','862',jdecode('Tools'),jdecode(''),'/862.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='FF7112';
theSitetree.keyvisualId='8818';
theSitetree.keyvisualName='KV_04.swf';
theSitetree.fontsetId='17185';
theSitetree.graphicsetId='12654';
theSitetree.contentColor='FF7112';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Holz',
				paletteFamily: 	'FF7112',
				keyvisualId: 	'8818',
				keyvisualName: 	'KV_04.swf',
				fontsetId: 		'17185',
				graphicsetId: 	'12654',
				contentColor: 	'FF7112',
				contentBGColor: '262626',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'FF6600',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-4853']={
webappId:    '7008',
documentId:  '820',
internalId:  '4853',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20080220-153444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20080201-204741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20090420-162815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14412',
internalId:  '',
customField: '20090421-155303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14433',
internalId:  '',
customField: '20090421-155337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14454',
internalId:  '',
customField: '20090421-155405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20090421-155453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20090708-155514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20090421-153847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11312',
internalId:  '',
customField: '20090708-160214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11333',
internalId:  '',
customField: '20090708-160558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11354',
internalId:  '',
customField: '20090708-161247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11375',
internalId:  '',
customField: '20090708-160104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11396',
internalId:  '',
customField: '20090708-161626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11417',
internalId:  '',
customField: '20090708-161855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20080201-205146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '862',
internalId:  '',
customField: '20080211-015413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25112',
internalId:  '',
customField: '20090708-162617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25312',
internalId:  '',
customField: '20090708-162717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25212',
internalId:  '',
customField: '20090708-162652'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZ37W';
var companyName   = 'Badger+Forest+Products%2C+Inc.';
var htmlTitle	  = '';
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();
};
