/* [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','11401',jdecode('Home'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','11452',jdecode('About+Us'),jdecode(''),'/11452.html','true',[],'',''],
	['PAGE','11473',jdecode('Cleanroom'),jdecode(''),'/11473.html','true',[],'',''],
	['PAGE','11494',jdecode('Materials'),jdecode(''),'/11494/index.html','true',[ 
		['PAGE','11515',jdecode('Barrier+Films'),jdecode(''),'/11494/11515.html','true',[],'',''],
		['PAGE','11536',jdecode('LDPE'),jdecode(''),'/11494/11536.html','true',[],'',''],
		['PAGE','11557',jdecode('Cushioning'),jdecode(''),'/11494/11557.html','true',[],'',''],
		['PAGE','11578',jdecode('Custom+Items'),jdecode(''),'/11494/11578.html','true',[],'','']
	],'',''],
	['PAGE','11599',jdecode('Enviroshield'),jdecode(''),'/11599.html','true',[],'',''],
	['PAGE','11620',jdecode('Cal-Az+Paper'),jdecode(''),'/11620.html','true',[],'',''],
	['PAGE','11641',jdecode('Contact+Us'),jdecode(''),'/11641.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='57';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easy',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'57',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-2532']={
webappId:    '7008',
documentId:  '11641',
internalId:  '2532',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090209-191859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11494',
internalId:  '',
customField: '20090209-192136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11452',
internalId:  '',
customField: '20090203-140827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11641',
internalId:  '',
customField: '20090209-192905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11473',
internalId:  '',
customField: '20090203-150331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11515',
internalId:  '',
customField: '20090209-192248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11536',
internalId:  '',
customField: '20090209-192609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11557',
internalId:  '',
customField: '20090209-192708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11578',
internalId:  '',
customField: '20090318-190727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11599',
internalId:  '',
customField: '20100519-162217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11620',
internalId:  '',
customField: '20090210-195323'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11401',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPMTU';
var companyName   = 'Fruth+Custom+Plastics%2C+Inc.';
var htmlTitle	  = 'Fruth+Custom+Plastics+-+Manufacturers+of+Custom+Flexible+Packaging';
var metaKeywords  = 'Fruth+Custom+Plastics%3B+Fruth%3B+plastic%3B+plastics%3B+custom%3B+manufacturers%3B+manufacturer%3B+manufacture%3B+manufacturing%3B+custom+manufacturers%3B+flexible+packaging%3B+flexible%3B+packaging%3B+Placentia%3B+California%3B+distributor%3B+distributors%3B+competitive+pricing%3B+custom+engineering%3B+customer%3B+customer+care%3B+quality%3B+solution%3B+affordable%3B+electronic%3B+medical%3B+pharmaceutical%3B+cleanroom%3Bclean%3B+clean+room%3B+room%3B+class+100%3B+class%3B+100%3B+cleanliness%3B+aerospace%3B+industrial%3B+automotive%3B+transportation%3B+agricultural%3B+environmental%3B+packaging+products%3B+variety%3B+shapes%3B+sizes%3B+F-ULO%3B+nylon%3B+poly%3B+extrusion%3B+conversion%3B+materials%3B+material%3B+raw%3B+barrier+films%3B+resin%3B+LDPE%3B+cushioning%3B+custom+items%3B+poly%3B+nylon%3B+extrusion%3B+NAPP%3B+foil%3B+NAPP+foil%3B+static%3B+shielding%3B+static+shielding%3B+barrier+film%3B+barrier%3B+film%3B+emi%3B+emi+static+shielding%3B+mil-b-131%3B+kraft%3B+foil%3B+poly%3B+kraft+foil%3B+kraft+poly%3B+scrim%3B+tyvek+foil%3B+mylar+foil%3B+pink%3B+pink+anti-stat%3B+anti-stat%3B+clear+anti-stat%3B+blue+VCI%3B+VCI%3B+black+conductive%3B+conductive%3B+opaque%3B+colors%3B+transparent%3B+extruded%3B+foam%3B+pink%3B+white%3B+pink+foam%3B+white+foam%3B+air+bubble%3B+pink+anti-stat%3B+clear%3B+clear+bubble%3B+pink+anti-stat+bubble%3B+anti-stat+bubble%3B+3rd+webb%3B+flexshield%3B+foil+laminate%3B+foil%3B+laminate%3B+cancel%3B+lip%3B+tape%3B+mild+tape%3B+aggressive+tape%3B+strapping%3B+buckles%3B+zipper%3B+velcro%3B+perforations%3B+print%3B+grommets%3B+hangholes%3B+felt%3B+pouches%3B+square+bottom%3B+bags+on+rolls%3B+rolls%3B+tubing%3B+sheeting%3B+sleeves%3B+side+gusset%3B+fiberboard%3B+quad-wall%3B+waste%3B+container%3B+waste+container%3B+waste+disposal%3B+Cal-Az%3B+paper%3B+paper+products%3B+products%3B+paper+sheeting%3B+sheeting%3B+saturated+kraft%3B+saturated%3B+kraft%3B+parchment%3B+vegetable+parchment%3B+contact%3B+us%3B+contact+us%3B+information%3B+questions%3B+quotes%3B+pricing';
var metaContents  = 'Custom+manufacturers+for+all+of+your+flexible+packaging+needs-from+the+usual+to+the+unique-see+how+Team+Fruth+can+satisfy+your+requirements+and+be+your+one-stop+solution%21';
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();
};
