/* [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','3601',jdecode('About+Us'),jdecode(''),'/3601.html','true',[],''],
	['PAGE','24722',jdecode('Wine+%26+Juice+Tanks'),jdecode(''),'/24722/index.html','true',[ 
		['PAGE','43812',jdecode('Tank+Accessories'),jdecode(''),'/24722/43812.html','true',[],''],
		['PAGE','63323',jdecode('Quality+Construction'),jdecode(''),'/24722/63323.html','true',[],'']
	],''],
	['PAGE','64223',jdecode('Tank+Guides'),jdecode(''),'/64223/index.html','true',[ 
		['PAGE','62023',jdecode('Tank+Calibration'),jdecode(''),'/64223/62023.html','true',[],''],
		['PAGE','61665',jdecode('Upgrade+%26+Rejacket'),jdecode(''),'/64223/61665.html','true',[],''],
		['PAGE','61707',jdecode('Temps+Lurking+in+Tanks'),jdecode(''),'/64223/61707.html','true',[],''],
		['PAGE','61728',jdecode('Unmasking+Winemaking+Mysteries'),jdecode(''),'/64223/61728.html','true',[],''],
		['PAGE','61923',jdecode('Polyethylene+Myths'),jdecode(''),'/64223/61923.html','true',[],''],
		['PAGE','61623',jdecode('How+To+Set+Temperatures'),jdecode(''),'/64223/61623.html','true',[],''],
		['PAGE','61644',jdecode('How+to+Cool'),jdecode(''),'/64223/61644.html','true',[],'']
	],''],
	['PAGE','3652',jdecode('Wine+Cooling+%26+Heating'),jdecode(''),'/3652/index.html','true',[ 
		['PAGE','24701',jdecode('KiLR-CHiLR'),jdecode(''),'/3652/24701.html','true',[],'']
	],''],
	['PAGE','47712',jdecode('Wine+Fermenting+'),jdecode(''),'/47712/index.html','true',[ 
		['PAGE','62423',jdecode('PuMP-uNDeR+Fermentor'),jdecode(''),'/47712/62423.html','true',[],''],
		['PAGE','62165',jdecode('Fermentor+or+Fermenter%3F'),jdecode(''),'/47712/62165.html','true',[],''],
		['PAGE','62228',jdecode('What+is+Self-Pressing%3F'),jdecode(''),'/47712/62228.html','true',[],''],
		['PAGE','62523',jdecode('Temperature+Graphics'),jdecode(''),'/47712/62523.html','false',[],''],
		['PAGE','62723',jdecode('Conventional+vs.+Pump-Under'),jdecode(''),'/47712/62723.html','true',[],'']
	],''],
	['PAGE','43833',jdecode('Pasco+Poly+in+the+News'),jdecode(''),'/43833.html','true',[],''],
	['PAGE','64323',jdecode('Wine+Science+%26+News'),jdecode(''),'/64323/index.html','true',[ 
		['PAGE','62623',jdecode('Energy+Efficiency+in+Wineries'),jdecode(''),'/64323/62623.html','true',[],'']
	],''],
	['PAGE','48812',jdecode('Customer+Gallery'),jdecode(''),'/48812.html','true',[],''],
	['PAGE','18201',jdecode('Request+A+Quote'),jdecode(''),'/18201.html','true',[],''],
	['PAGE','74023',jdecode('Friends+%26+Wine+We+Like'),jdecode(''),'/74023.html','true',[],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='CFCFCF';
theSitetree.keyvisualId='11074';
theSitetree.keyvisualName='kv_11074.jpg';
theSitetree.fontsetId='31958';
theSitetree.graphicsetId='13799';
theSitetree.contentColor='342500';
theSitetree.contentBGColor='CFCFCF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Displace',
				paletteFamily: 	'CFCFCF',
				keyvisualId: 	'11074',
				keyvisualName: 	'kv_11074.jpg',
				fontsetId: 		'31958',
				graphicsetId: 	'13799',
				contentColor: 	'342500',
				contentBGColor: 'CFCFCF',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3601',
internalId:  '',
customField: '20090608-091221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3652',
internalId:  '',
customField: '20090608-091410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43833',
internalId:  '',
customField: '20090607-230753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48812',
internalId:  '',
customField: '20090828-111605'
};
webappMappings['7008']=webappMappings['7008-394']={
webappId:    '7008',
documentId:  '18201',
internalId:  '394',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20090607-222342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24722',
internalId:  '',
customField: '20090607-184809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20090607-191011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47712',
internalId:  '',
customField: '20090608-091818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63323',
internalId:  '',
customField: '20090607-081353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64223',
internalId:  '',
customField: '20090607-185150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43812',
internalId:  '',
customField: '20090607-233016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61623',
internalId:  '',
customField: '20090602-154954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62023',
internalId:  '',
customField: '20090607-185330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61644',
internalId:  '',
customField: '20090524-122957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61707',
internalId:  '',
customField: '20090607-185542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61665',
internalId:  '',
customField: '20090607-083453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61728',
internalId:  '',
customField: '20090607-090759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61923',
internalId:  '',
customField: '20090602-154856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64323',
internalId:  '',
customField: '20090607-232113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62623',
internalId:  '',
customField: '20090524-170255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62165',
internalId:  '',
customField: '20090524-171720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62523',
internalId:  '',
customField: '20090524-182538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62228',
internalId:  '',
customField: '20090525-115443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62423',
internalId:  '',
customField: '20090607-235741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62723',
internalId:  '',
customField: '20090602-150748'
};
webappMappings['7060']=webappMappings['7060-efe0aa9174f509da82646853b75d02d5']={
webappId:    '7060',
documentId:  '62228',
internalId:  'efe0aa9174f509da82646853b75d02d5',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74023',
internalId:  '',
customField: '20090828-112356'
};
var canonHostname = 'cm4all01.west-datacenter.net';
var accountId     = 'AWH030IN2RSK';
var companyName   = 'For+Wine%3A+Tanks%2C+Fermentors%2C+Heating+%26+Cooling+';
var htmlTitle	  = 'Pasco+Poly%E2%84%A2+Wine+%26+Juice+Tanks%2C+Maker+of+KiLR+CHiLR%E2%84%A2+%26+SR+PuMP-uNDeR%E2%84%A2+Wine+Systems';
var metaKeywords  = 'Wine+Tanks%2C+wine+heating+and+cooling+systems%2C+wine+producing+systems%2C+Fermentors%2C+fermenters%2C+Pump-under+fermenting%2C++Tanks+for+wine%2C+vinegar%2C+and+juice%2C+beverage+refrigeration%2C+Pasco+Poly%2C+Dave+Rule.';
var metaContents  = 'Pasco+Poly+%E2%84%A2+manufactures+polyethylene+plastic+wine+tanks%2C+KiLR-CHiLR+%E2%84%A2%2C+wine+tanks+for+the+food+and+beverage+industry%2C+SR+Pump-Under%E2%84%A2+fermentators%3A+blending%2C+storage%2C+brewing%2C+cooling%2C+chilling%2C+and+cold-stabilization+of+wine%2C+juice%2C+vinegar%2C+syrups%2C+and+other+beverage+production+needs.+Our+quality%2C+natural+white+poly+plastic+wine+tanks+include+stainless+steel+manways+and+fittings.+The+upper+manway+is+set+forward+for+easy+access+from+the+front.+The+lower+manway+is+inward+swinging%2C+outward+hinged.+Stainless+steel+racking+and+drain+fittings+available+in+tri-clamp+quick-connect+or+normal+pipe+thread.+From+small+to+large%2C+Pasco+Poly%E2%84%A2+wine+and+juice+tanks%2C+KiLR-CHiLR%E2%84%A2+heating++cooling+system%2C+to+SR+Pump-Under+Fermentors%E2%84%A2%2C+we+will+meet+your+wine+tank+needs.+';
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();
};
