/* [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','22',jdecode('HOME'),jdecode(''),'/22.html','true',[],'',''],
	['PAGE','51101',jdecode('%5E'),jdecode(''),'/51101.html','true',[],'',''],
	['PAGE','88',jdecode('APPLICATIONS'),jdecode(''),'/88.html','true',[],'',''],
	['PAGE','51701',jdecode('%5E'),jdecode(''),'/51701.html','true',[],'',''],
	['PAGE','61',jdecode('DURABILITY'),jdecode(''),'/61.html','true',[],'',''],
	['PAGE','51122',jdecode('%5E'),jdecode(''),'/51122.html','true',[],'',''],
	['PAGE','79',jdecode('WHY+IT+WORKS'),jdecode(''),'/79.html','true',[],'',''],
	['PAGE','52501',jdecode('%5E'),jdecode(''),'/52501.html','true',[],'',''],
	['PAGE','106',jdecode('PROFILE'),jdecode(''),'/106.html','true',[],'',''],
	['PAGE','51164',jdecode('%5E'),jdecode(''),'/51164.html','true',[],'',''],
	['PAGE','41401',jdecode('INSTALLATION'),jdecode(''),'/41401/index.html','true',[ 
		['PAGE','1561',jdecode('Tools+%26Accessories'),jdecode(''),'/41401/1561.html','true',[],'',''],
		['PAGE','1588',jdecode('Miters%2FEnd+Caps'),jdecode(''),'/41401/1588.html','true',[],'',''],
		['PAGE','1606',jdecode('Fasteners'),jdecode(''),'/41401/1606.html','true',[],'','']
	],'',''],
	['PAGE','51185',jdecode('%5E'),jdecode(''),'/51185.html','true',[],'',''],
	['PAGE','2662',jdecode('FIRE+%26+ICE+%26+Misc'),jdecode(''),'/2662/index.html','true',[ 
		['PAGE','2720',jdecode('Misc+2'),jdecode(''),'/2662/2720.html','true',[],'','']
	],'',''],
	['PAGE','51206',jdecode('%5E'),jdecode(''),'/51206.html','true',[],'',''],
	['PAGE','8501',jdecode('FIND+SUPPLIERS+%26+INSTALLERS'),jdecode(''),'/8501.html','true',[],'',''],
	['PAGE','51722',jdecode('%5E'),jdecode(''),'/51722.html','true',[],'',''],
	['PAGE','3018',jdecode('ASSOCIATIONS'),jdecode(''),'/3018.html','true',[],'',''],
	['PAGE','51227',jdecode('%5E'),jdecode(''),'/51227.html','true',[],'',''],
	['PAGE','38801',jdecode('CONTACT+US+Requests'),jdecode(''),'/38801.html','true',[],'',''],
	['PAGE','51743',jdecode('%5E'),jdecode(''),'/51743.html','true',[],'',''],
	['PAGE','72801',jdecode('WINNERS'),jdecode(''),'/72801.html','true',[],'',''],
	['PAGE','72822',jdecode('%5E'),jdecode(''),'/72822.html','true',[],'',''],
	['PAGE','40901',jdecode('PHOTO+I'),jdecode(''),'/40901.html','true',[],'',''],
	['PAGE','48701',jdecode('.'),jdecode(''),'/48701.html','true',[],'',''],
	['PAGE','48722',jdecode('++.'),jdecode(''),'/48722.html','true',[],'',''],
	['PAGE','48743',jdecode('.'),jdecode(''),'/48743.html','true',[],'',''],
	['PAGE','48764',jdecode('+-+RAINDROP+-+++++'),jdecode(''),'/48764.html','true',[],'',''],
	['PAGE','56201',jdecode('%28800%29816-0199'),jdecode(''),'/56201.html','true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='080245';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10615';
theSitetree.graphicsetId='10811';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='080245';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delta',
				paletteFamily: 	'080245',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10615',
				graphicsetId: 	'10811',
				contentColor: 	'FFFFFF',
				contentBGColor: '080245',
				a_color: 		'221785',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-8904205']={
webappId:    '1501',
documentId:  '22',
internalId:  '8904205',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-1090']={
webappId:    '7008',
documentId:  '38801',
internalId:  '1090',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e9fd6372be0868ec469d11f756690d4c']={
webappId:    '7060',
documentId:  '40901',
internalId:  'e9fd6372be0868ec469d11f756690d4c',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22',
internalId:  '',
customField: '20100614-084414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20081217-110201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88',
internalId:  '',
customField: '20081217-110059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20081217-110144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61',
internalId:  '',
customField: '20100405-175837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51122',
internalId:  '',
customField: '20081217-110623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79',
internalId:  '',
customField: '20081217-123050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20081217-123122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106',
internalId:  '',
customField: '20081217-124339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51164',
internalId:  '',
customField: '20081217-124417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41401',
internalId:  '',
customField: '20081217-125039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1561',
internalId:  '',
customField: '20080216-120739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1588',
internalId:  '',
customField: '20080213-131219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1606',
internalId:  '',
customField: '20081217-131611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51185',
internalId:  '',
customField: '20081217-131917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2662',
internalId:  '',
customField: '20081219-131603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2720',
internalId:  '',
customField: '20080213-141913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51206',
internalId:  '',
customField: '20081217-134004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20100614-080918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51722',
internalId:  '',
customField: '20081217-134042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3018',
internalId:  '',
customField: '20090213-184231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51227',
internalId:  '',
customField: '20081217-134112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38801',
internalId:  '',
customField: '20080514-065519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51743',
internalId:  '',
customField: '20081217-134157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20080215-135937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48701',
internalId:  '',
customField: '20100429-100119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48722',
internalId:  '',
customField: '20090424-140008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48743',
internalId:  '',
customField: '20081027-143026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48764',
internalId:  '',
customField: '20090213-183413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56201',
internalId:  '',
customField: '20090721-164251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72801',
internalId:  '',
customField: '20100401-062534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72822',
internalId:  '',
customField: '20100217-071508'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN24WZ';
var companyName   = 'RAINDROP++++%28800%29+816-0199';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = 'gutter+protection%2C+gutter+guards%2C+gutter+covers%2C+leaf+and+debris%2C+scxreens%2C+helmut%2C+topper%2C+';
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();
};
