/* [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','9401',jdecode('Home'),jdecode(''),'/9401.html','true',[],''],
	['PAGE','9452',jdecode('Services'),jdecode(''),'/9452.html','true',[],''],
	['PAGE','9473',jdecode('About+Us'),jdecode(''),'/9473.html','true',[],''],
	['PAGE','14601',jdecode('Customers'),jdecode(''),'/14601.html','true',[],''],
	['PAGE','9494',jdecode('Meet+the+Crew'),jdecode(''),'/9494.html','true',[],''],
	['PAGE','9515',jdecode('Equipment'),jdecode(''),'/9515.html','true',[],''],
	['PAGE','15101',jdecode('Safety'),jdecode(''),'/15101.html','true',[],''],
	['PAGE','9536',jdecode('Employment'),jdecode(''),'/9536.html','true',[],''],
	['PAGE','9557',jdecode('Contact+Us'),jdecode(''),'/9557.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20100127-112436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9452',
internalId:  '',
customField: '20100115-140203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9473',
internalId:  '',
customField: '20100115-131041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9494',
internalId:  '',
customField: '20100122-142446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9515',
internalId:  '',
customField: '20100115-105308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9536',
internalId:  '',
customField: '20100118-095213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9557',
internalId:  '',
customField: '20100118-134158'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20100115-165443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20100115-124742'
};
webappMappings['1501']=webappMappings['1501-26587835']={
webappId:    '1501',
documentId:  '9401',
internalId:  '26587835',
customField: '1501'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INV3IE';
var companyName   = 'Mlaskoch+Excavating+%26+Utility';
var htmlTitle	  = '';
var metaKeywords  = 'underground+construction%2C+telephone+utility%2C+directional+boring%2C+cable+plowing%2C+trenching%2C+rock+sawing%2C+frost+trenching%2C+trenchless+excavating%2C+willow+river+MN+underground+construction%2C+mlaskoch%2C+mlaskoch+excavating+and+utility+contractor%2C+telecommunications%2C+CATV%2C+fiber+optics%2C+mlaskoch%2C+com%2C+here%2C+click%2C+utility%2C+crew%2C+meet%2C+excavating%2C+inc%2C+services%2C+willow%2C+river%2C+facility%2C+home%2C+underground%2C+construction%2C+contact%2C+counter%2C+list%2C+hit%2C+equipment%2C+own%2C+page%2C+offered%2C+map%2C+website%2C+cable%2C+directional%2C+boring%2C+trenching%2C+fiber%2C+telephone%2C+telecommunications%2C+optics%2C+contractor%2C+catv%2C+frost%2C+plowing%2C+sawing%2C+trenchless%2C+meet+the+crew';
var metaContents  = 'Mlaskoch+Excavating++Utility%2C+Inc.+has+been+delivering+quality+construction+services+in+the+underground+utility+field+for+more+than+twenty+years.++Our+wide+range+of+capabilities+enable+us+to+serve+clients+in+a+number+of+ways+including+Directional+Boring%2C+Direct+Bury+of+Fiber+Optics+and+Telecommunications%2C+Wind+Generation%2C+Electrical+Utility+Construction+and+Direct+Bury+of+Power+Cables.++We+have+remained+proactive+anticipating+the+needs+of+customers+and+keeping+pace+with+technological+advances+in+a+rapidly+changing+world.++More+than+90%25+of+our+customers+provide+us+with+additional+projects.';
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();
};
