/* [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','6712',jdecode('Home'),jdecode(''),'/6712.html','true',[],''],
	['PAGE','6763',jdecode('Contact'),jdecode(''),'/6763.html','true',[],''],
	['PAGE','6784',jdecode('About+us'),jdecode(''),'/6784/index.html','true',[ 
		['PAGE','6805',jdecode('Our+team'),jdecode(''),'/6784/6805.html','true',[],''],
		['PAGE','6868',jdecode('How+to+find+us'),jdecode(''),'/6784/6868.html','true',[],'']
	],''],
	['PAGE','6910',jdecode('Capabilities'),jdecode(''),'/6910.html','true',[],''],
	['PAGE','6973',jdecode('Email+Us'),jdecode(''),'/6973.html','true',[],''],
	['PAGE','6931',jdecode('Forum'),jdecode(''),'/6931.html','true',[],''],
	['PAGE','14012',jdecode('The+Heid+Blog'),jdecode(''),'/14012.html','true',[],''],
	['PAGE','10312',jdecode('Points+of+Interest'),jdecode(''),'/10312.html','true',[],''],
	['PAGE','6889',jdecode('Interesting+links'),jdecode(''),'/6889.html','true',[],''],
	['PAGE','15212',jdecode('Local+Forecast'),jdecode(''),'/15212.html','true',[],''],
	['PAGE','12512',jdecode('HeidMail'),jdecode(''),'/12512.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Stripes';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1642';
theSitetree.keyvisualName='kanu_see.jpg';
theSitetree.fontsetId='244';
theSitetree.graphicsetId='304';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCFB';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stripes',
				paletteFamily: 	'003399',
				keyvisualId: 	'1642',
				keyvisualName: 	'kanu_see.jpg',
				fontsetId: 		'244',
				graphicsetId: 	'304',
				contentColor: 	'000000',
				contentBGColor: 'FCFCFB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003399',
				b_color: 		'DEDECA',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1003']=webappMappings['1003-avfl30inhi8b122a02918d7']={
webappId:    '1003',
documentId:  '6931',
internalId:  'avfl30inhi8b122a02918d7',
customField: 'en:US'
};
webappMappings['7050']=webappMappings['7050-2491']={
webappId:    '7050',
documentId:  '14012',
internalId:  '2491',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-9545']={
webappId:    '7008',
documentId:  '6973',
internalId:  '9545',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6712',
internalId:  '',
customField: '20090722-133032'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6712',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14312402']={
webappId:    '1501',
documentId:  '6712',
internalId:  '14312402',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6763',
internalId:  '',
customField: '20090722-134308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6784',
internalId:  '',
customField: '20090722-213451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6805',
internalId:  '',
customField: '20090722-135126'
};
webappMappings['7060']=webappMappings['7060-1f9043be1c84ac43059f12438700bc1f']={
webappId:    '7060',
documentId:  '10312',
internalId:  '1f9043be1c84ac43059f12438700bc1f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6868',
internalId:  '',
customField: '20090722-135253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6889',
internalId:  '',
customField: '20090722-193945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6910',
internalId:  '',
customField: '20090722-190253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6931',
internalId:  '',
customField: '20090722-203555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15212',
internalId:  '',
customField: '20090722-212538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6973',
internalId:  '',
customField: '20090722-130738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10312',
internalId:  '',
customField: '20090722-122905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12512',
internalId:  '',
customField: '20090722-140623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14012',
internalId:  '',
customField: '20090722-194933'
};
webappMappings['7080']=webappMappings['7080-345']={
webappId:    '7080',
documentId:  '15212',
internalId:  '345',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHI8B';
var companyName   = 'Heid+Diecutting+%26+Finishing';
var htmlTitle	  = 'Heid+Diecutting+%26+Finishing';
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();
};
