/* [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','42',jdecode('Home'),jdecode(''),'/42.html','true',[],''],
	['PAGE','2438',jdecode('Frye+Roofing+Presents...'),jdecode(''),'/2438.html','true',[],''],
	['PAGE','2883',jdecode('Roof+Inspection+Checklist'),jdecode(''),'/2883.html','true',[],''],
	['PAGE','90',jdecode('Informative+Links'),jdecode(''),'/90.html','true',[],''],
	['PAGE','1217',jdecode('Contact+Us'),jdecode(''),'/1217.html','true',[],'']];
var siteelementCount=5;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='2E681F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10829';
theSitetree.graphicsetId='11286';
theSitetree.contentColor='2E681F';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Basic',
				paletteFamily: 	'2E681F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10829',
				graphicsetId: 	'11286',
				contentColor: 	'2E681F',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '42',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-870400044ee5270ade0abea75629ee20']={
webappId:    '7060',
documentId:  '2438',
internalId:  '870400044ee5270ade0abea75629ee20',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20090409-105032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2438',
internalId:  '',
customField: '20090408-140001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2883',
internalId:  '',
customField: '20090408-140322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90',
internalId:  '',
customField: '20090408-140459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1217',
internalId:  '',
customField: '20090409-105416'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN34MU';
var companyName   = '';
var htmlTitle	  = 'Frye+Roofing%2C+Inc...Professional+Roofing+for+the+Virginias+Since+1900';
var metaKeywords  = 'roofing+commercial+roofing+residential+roofing+EPDM+shingles+slate+cedar+metal+roofing+TPO+copper+tile+roofing+single-ply+standing+seam+metal+shop+roof+repair+guttering+bluefield+historical+roofing+professional+roofing';
var metaContents  = 'Established+in+1900+and+incorporated+in+1954%2C+Frye+Roofing%2C+Inc.+of+Bluefield%2C+WV%2C+has+evolved+from+a+small%2C+local+company+to+one+of+the+United+States+leading+installers+of+commercial+roofing+systems.++Serving+the+two+Virginias+for+more+than+100+years%2C+Frye+Roofing%2C+Inc.+is+a+full-service+roofing+company+that+offers+total+roof+management%2C+from+specification+and+design+to+the+completed+installation%3B+the+company+also+operates+a+dedicated+service+department+for+repairs+and+maintenance.+Frye+Roofing+feels+that+commitment+to+quality+workmanship%2C+customer+service%2C+and+the+well-being+of+employees+are+the+principles+that+have+kept+the+organization+strong+for+such+a+long+time.++++Frye+Roofing+projects+are+designed+and+managed+by+experienced+estimators+and+engineers%2C+while+business+functions+are+handled+by+a+staff+of+highly+educated+and+experienced+managers.+The+Company+is+also+dedicated+to+hiring+and+training+only+the+most+qualified+professional+roofers%2C+employing+highly+skilled+mechanics+who+are+qualified+to+perform+nearly+all+types+of+work.+The+company+feels+an+emphasis+on+safety%2C+in-house+training%2C+and+ongoing+professional+education+leads+to+a+staff+of+highly+qualified+individuals+and+progressive+business+acumen.+++++Most+of+Frye%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+work+consists+of+large%2C+new+construction+and+re-roofing+commercial+projects+that+they+cover+with+Carlisle%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+premium+Sure-Seal%C3%83%C2%82%C3%82%C2%AE+EPDM+roof+systems.++However%2C+they+are+a+versatile+contractor+with+the+ability+to+install+virtually+any+type+of+roofing+system%2C+including+Metal%2C+Copper%2C+Slate%2C+Shingle%2C+Cedar%2C+Tile%2C+Single-Ply%2C+Built-Up%2C+and+Modified+Bitumen+roofing+applications%2C+serving+both+commercial+and+residential+customers.++Every+job+is+completed+with+the+utmost+amount+of+attention+and+a+guaranteed%2C+professional+quality+result.++++Operating+with+state-of-the-art+facilities+and+equipment%2C+Frye+Roofing+takes+pride+in+its+38%2C000+square+foot+headquarters%2C+which+houses+over+24%2C000+square+feet+of+warehouse+storage.+There+is+also+an+in-house+sheet+metal+shop%2C+allowing+them+to+compliment+any+job+with+precision+sheet+metal%2C+fabricated+on+the+industry%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+most+state-of-the-art+equipment.+Frye+Roofing+utilizes+a+sophisticated+computer+network+for+project+estimation+and+management%2C+as+well+as+weather+radar+access+from+their+office+facilities+to+monitor+up-to-the-minute+conditions+for+all+of+their+jobsites.+++++Frye+Roofing%2C+Inc.+has+been+a+Carlisle+authorized+applicator+since+1979.++To+become+a+Carlisle+authorized+applicator%2C+a+company+must+undergo+comprehensive+training+conducted+by+Carlisle+technical+experts+covering+single-ply+roofing+system+installations+and+maintenance%2C+and+must+then+maintain+their+knowledge+through+Carlisle%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+continuing+education+program%2C+staying+current+on+the+latest+technology+and+procedures+from+Carlisle.++In+addition%2C+Carlisle+authorized+applicators+must+demonstrate+sound+financial+integrity.++++Since+becoming+a+Carlisle+authorized+applicator%2C+Frye+Roofing%2C+Inc.+has+had+many+achievements+within+Carlisle%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+Quality+Recognition+Program.+The+minimum+number+of+%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9CPerfect+10%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9D+for+Carlisle%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+Hall+of+Fame+is+250+perfect+installations%2C+and+Frye+Roofing%2C+Inc.+has+completed+more+than+500+%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9CPerfect+10%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9D+installations+to+date.+Presented+to+Carlisle+applicators+for+outstanding+quality+and+workmanship%2C+%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9CPerfect+10%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%9D+installations+are+based+upon+completed+roofing+system+inspections+performed+by+a+Carlisle+field+service+representative.++Prior+to+the+issuance+of+a+Carlisle+membrane+system+warranty%2C+a+project+is+thoroughly+reviewed+for+conformity+to+Carlisle+specifications%2C+details+and+workmanship.++At+the+inspection%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%99s+conclusion%2C+the+Carlisle+representative+will+rate+the+roofing+installation%2C+paying+special+attention+to+detail+and+quality+of+workmanship.++Installation+ratings+are+then+awarded+on+a+scale+from+1+to+10+%C3%83%C2%A2%C3%82%C2%80%C3%82%C2%93+10+being+a+flawless+application.++++To+discuss+a+new+roofing+project%2C+schedule+an+inspection+and+evaluation+of+an+existing+roofing+system+or+find+out+how+you+can+benefit+from+the+services+offered+by+Frye+Roofing%2C+Inc.%2C+call+304-327-5314%2C+email+info%40fryeroofing.com+or+visit+their+website+at+www.fryeroofing.com.+++++';
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();
};
