/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','55101',jdecode('Attorney+Profile'),jdecode(''),'/55101.html','true',[],''],
	['PAGE','352',jdecode('Areas+of+Practice'),jdecode(''),'/352.html','true',[],''],
	['PAGE','394',jdecode('Criminal+Law'),jdecode(''),'/394/index.html','true',[ 
		['PAGE','93315',jdecode('Assault+Laws'),jdecode(''),'/394/93315.html','true',[],''],
		['PAGE','93915',jdecode('Burglary+Laws'),jdecode(''),'/394/93915.html','true',[],''],
		['PAGE','95415',jdecode('Drug+Laws+'),jdecode(''),'/394/95415.html','true',[],''],
		['PAGE','94615',jdecode('Forgery+Laws'),jdecode(''),'/394/94615.html','true',[],''],
		['PAGE','87801',jdecode('Police+Tactics'),jdecode(''),'/394/87801.html','true',[],''],
		['PAGE','89015',jdecode('Gun+Possession'),jdecode(''),'/394/89015.html','true',[],'']
	],''],
	['PAGE','415',jdecode('DUI%2FDWI'),jdecode(''),'/415/index.html','true',[ 
		['PAGE','57701',jdecode('DUI+FAQs'),jdecode(''),'/415/57701.html','true',[],''],
		['PAGE','58701',jdecode('DUI%2FDWI%3A+Penalties'),jdecode(''),'/415/58701.html','true',[],''],
		['PAGE','91715',jdecode('License+Suspension'),jdecode(''),'/415/91715.html','true',[],''],
		['PAGE','92615',jdecode('B+-+Card+License+'),jdecode(''),'/415/92615.html','true',[],'']
	],''],
	['PAGE','65101',jdecode('Criminal+Expungement'),jdecode(''),'/65101.html','true',[],''],
	['PAGE','373',jdecode('Family+Law'),jdecode(''),'/373/index.html','true',[ 
		['PAGE','62901',jdecode('Divorce+FAQs'),jdecode(''),'/373/62901.html','true',[],''],
		['PAGE','84001',jdecode('Maintenance'),jdecode(''),'/373/84001.html','true',[],''],
		['PAGE','61601',jdecode('Child+Support'),jdecode(''),'/373/61601.html','true',[],''],
		['PAGE','53301',jdecode('FAQs'),jdecode(''),'/373/53301.html','true',[],'']
	],''],
	['PAGE','66801',jdecode('Wills+and+Trusts'),jdecode(''),'/66801.html','true',[],''],
	['PAGE','53501',jdecode('Contact+Us'),jdecode(''),'/53501.html','true',[],''],
	['PAGE','52701',jdecode('Weblog'),jdecode(''),'/52701.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Vignette';
theSitetree.paletteFamily='E79E6E';
theSitetree.keyvisualId='3555';
theSitetree.keyvisualName='kv_3555.jpg';
theSitetree.fontsetId='10448';
theSitetree.graphicsetId='10833';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Vignette',
				paletteFamily: 	'E79E6E',
				keyvisualId: 	'3555',
				keyvisualName: 	'kv_3555.jpg',
				fontsetId: 		'10448',
				graphicsetId: 	'10833',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E79E6E',
				e_color: 		'886146',
				f_color: 		'C97556',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '53501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20091117-163643'
};
webappMappings['7008']=webappMappings['7008-226']={
webappId:    '7008',
documentId:  '53301',
internalId:  '226',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100522-092708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20081230-235315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373',
internalId:  '',
customField: '20090402-203836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20100521-215217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20100522-092912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53301',
internalId:  '',
customField: '20100512-210705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53501',
internalId:  '',
customField: '20080629-121354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20080629-121731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20090401-214249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58701',
internalId:  '',
customField: '20080701-212353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87801',
internalId:  '',
customField: '20091117-151455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89015',
internalId:  '',
customField: '20100522-092904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84001',
internalId:  '',
customField: '20090402-212004'
};
webappMappings['7050']=webappMappings['7050-5']={
webappId:    '7050',
documentId:  '52701',
internalId:  '5',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93315',
internalId:  '',
customField: '20100522-092801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66801',
internalId:  '',
customField: '20080629-121651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65101',
internalId:  '',
customField: '20100512-224420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62901',
internalId:  '',
customField: '20080629-121812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20080629-121558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91715',
internalId:  '',
customField: '20100522-092933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92615',
internalId:  '',
customField: '20100522-093007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93915',
internalId:  '',
customField: '20100522-092826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94615',
internalId:  '',
customField: '20100522-092852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95415',
internalId:  '',
customField: '20100525-225445'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INXZXD';
var companyName   = 'DILAVERI+LAW+FIRM+++206-6020';
var htmlTitle	  = 'Rochester+MN+Lawyers+and+Attorneys+%7C+Minnesota+Criminal+Defense+%7C+Family+Law+%7C+DUI+';
var metaKeywords  = 'family+attorney%2C+lawyer%2C+criminal+defense%2C+law+firm%2C+rochester+mn%2C+minnesota%2C+dilaveri%2C+dui';
var metaContents  = 'Dilaveri+Law+provides+DUI+and+criminal+defense+lawyers+and+attorneys+in+Rochester+MN%2C+and+legal+services+related+to+family+law%2C+divorce+and+expungement';
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();
};
