/* [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','2612',jdecode('PAT+M.+DIFURIA+%26+ASSOCIATES'),jdecode(''),'/2612/index.html','true',[ 
		['PAGE','42323',jdecode('Salesman'),jdecode(''),'/2612/42323.html','true',[],'',''],
		['PAGE','42344',jdecode('Operations+Manager'),jdecode(''),'/2612/42344.html','true',[],'',''],
		['PAGE','41523',jdecode('Grower+Rep+Supervisor+'),jdecode(''),'/2612/41523.html','true',[],'',''],
		['PAGE','41923',jdecode('Warehouse+Manager'),jdecode(''),'/2612/41923.html','true',[],'',''],
		['PAGE','40423',jdecode('QA+Manager'),jdecode(''),'/2612/40423.html','true',[],'',''],
		['PAGE','40444',jdecode('Agronomist'),jdecode(''),'/2612/40444.html','true',[],'',''],
		['PAGE','40465',jdecode('Seed+Breeder'),jdecode(''),'/2612/40465.html','true',[],'',''],
		['PAGE','40023',jdecode('QC+Manager+'),jdecode(''),'/2612/40023.html','true',[],'',''],
		['PAGE','39623',jdecode('Director+HR'),jdecode(''),'/2612/39623.html','true',[],'',''],
		['PAGE','39644',jdecode('Electrician%2FMechanic'),jdecode(''),'/2612/39644.html','true',[],'',''],
		['PAGE','38523',jdecode('Maintenance+Supervisor'),jdecode(''),'/2612/38523.html','true',[],'',''],
		['PAGE','37523',jdecode('Plant+Manager+%28Poultry%29'),jdecode(''),'/2612/37523.html','true',[],'',''],
		['PAGE','37544',jdecode('Director+Food+Service+and+Industrial+Sales+'),jdecode(''),'/2612/37544.html','true',[],'',''],
		['PAGE','36623',jdecode('Salesman'),jdecode(''),'/2612/36623.html','true',[],'',''],
		['PAGE','36644',jdecode('Sales+Manager'),jdecode(''),'/2612/36644.html','true',[],'',''],
		['PAGE','34823',jdecode('Plant+Manager'),jdecode(''),'/2612/34823.html','true',[],'',''],
		['PAGE','32923',jdecode('Harvesting+Manager'),jdecode(''),'/2612/32923.html','true',[],'',''],
		['PAGE','32223',jdecode('Tropical+Fruit+Sales+Manger'),jdecode(''),'/2612/32223.html','true',[],'',''],
		['PAGE','23223',jdecode('Table+Grape+Sales'),jdecode(''),'/2612/23223.html','true',[],'',''],
		['PAGE','10554',jdecode('Melon+Sales+Manager'),jdecode(''),'/2612/10554.html','true',[],'',''],
		['PAGE','10617',jdecode('Salesman'),jdecode(''),'/2612/10617.html','true',[],'','']
	],'',''],
	['PAGE','11933',jdecode('STAFF'),jdecode(''),'/11933.html','true',[],'',''],
	['PAGE','12412',jdecode('CONTACT'),jdecode(''),'/12412.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Lunch';
theSitetree.paletteFamily='8E0C0A';
theSitetree.keyvisualId='3854';
theSitetree.keyvisualName='kv_3854.jpg';
theSitetree.fontsetId='10491';
theSitetree.graphicsetId='11064';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B32A28';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Lunch',
				paletteFamily: 	'8E0C0A',
				keyvisualId: 	'3854',
				keyvisualName: 	'kv_3854.jpg',
				fontsetId: 		'10491',
				graphicsetId: 	'11064',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B32A28',
				a_color: 		'8E0C0A',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E38F68',
				e_color: 		'E38F68',
				f_color: 		'E38F68',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36644',
internalId:  '',
customField: '20100722-162359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2612',
internalId:  '',
customField: '20100201-170527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23223',
internalId:  '',
customField: '20100609-163720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32223',
internalId:  '',
customField: '20100603-175429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42344',
internalId:  '',
customField: '20100831-170902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38523',
internalId:  '',
customField: '20100723-165256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10554',
internalId:  '',
customField: '20091109-164026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32923',
internalId:  '',
customField: '20100609-163341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10617',
internalId:  '',
customField: '20091109-164335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41523',
internalId:  '',
customField: '20100825-161003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41923',
internalId:  '',
customField: '20100826-171738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12412',
internalId:  '',
customField: '20091221-172934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11933',
internalId:  '',
customField: '20100611-161057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37544',
internalId:  '',
customField: '20100720-164946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39623',
internalId:  '',
customField: '20100804-134857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37523',
internalId:  '',
customField: '20100720-164756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42323',
internalId:  '',
customField: '20100831-170902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36623',
internalId:  '',
customField: '20100709-143828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34823',
internalId:  '',
customField: '20100625-164957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40423',
internalId:  '',
customField: '20100811-144111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39644',
internalId:  '',
customField: '20100804-134946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40023',
internalId:  '',
customField: '20100804-173026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40444',
internalId:  '',
customField: '20100811-144213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40465',
internalId:  '',
customField: '20100811-144319'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30I7CCWF';
var companyName   = 'PAT+M.+DIFURIA+%26+ASSOCIATES';
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();
};
