/* [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','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],''],
	['PAGE','6601',jdecode('Drug+Crimes'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','6622',jdecode('DUI%2FTraffic'),jdecode(''),'/6622.html','true',[],''],
	['PAGE','6643',jdecode('Assault'),jdecode(''),'/6643.html','true',[],''],
	['PAGE','7601',jdecode('Domestic+Violence'),jdecode(''),'/7601.html','true',[],''],
	['PAGE','7622',jdecode('Property+Crimes'),jdecode(''),'/7622.html','true',[],''],
	['PAGE','7643',jdecode('Probation+Violations'),jdecode(''),'/7643.html','true',[],''],
	['PAGE','7664',jdecode('Juvenile+Offenses'),jdecode(''),'/7664.html','true',[],''],
	['PAGE','6685',jdecode('About+the+Firm'),jdecode(''),'/6685/index.html','true',[ 
		['PAGE','6706',jdecode('Our+team'),jdecode(''),'/6685/6706.html','true',[],''],
		['PAGE','6727',jdecode('Our+history'),jdecode(''),'/6685/6727.html','true',[],''],
		['PAGE','6748',jdecode('How+to+find+us'),jdecode(''),'/6685/6748.html','true',[],'']
	],''],
	['PAGE','6769',jdecode('Resources'),jdecode(''),'/6769.html','true',[],''],
	['PAGE','6664',jdecode('Contact+Us'),jdecode(''),'/6664/index.html','true',[ 
		['PAGE','10501',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/6664/10501.html','false',[],'']
	],''],
	['PAGE','7685',jdecode('En+Espanol'),jdecode(''),'/7685.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Cosy';
theSitetree.paletteFamily='6E665A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10603';
theSitetree.graphicsetId='10618';
theSitetree.contentColor='271A07';
theSitetree.contentBGColor='D4D1CA';
var theTemplate={
				name: 			'Cosy',
				paletteFamily: 	'6E665A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10603',
				graphicsetId: 	'10618',
				contentColor: 	'271A07',
				contentBGColor: 'D4D1CA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'977433',
				e_color: 		'5D4016',
				f_color: 		'746C60',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050inenpa18767c69e9b32a83']={
webappId:    '1001',
documentId:  '6664',
internalId:  'ahw050inenpa18767c69e9b32a83',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inenpa18767c69e9b32a83']={
webappId:    '1001',
documentId:  '10501',
internalId:  'ahw050inenpa18767c69e9b32a83',
customField: 'followUp'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20070620-192102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20070322-171126'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INENPA';
var companyName   = 'Law+Offices+of+David+B.+Shapiro%2C+llc';
var htmlTitle	  = 'Utah+Criminal+Defense+Attorney+David+B.+Shapiro';
var metaKeywords  = 'salt+lake+city%2C+slc%2C+drug+arrest%2C+drug+trafficking%2C+drug+possession%2C+marijuana%2C+cocaine%2C+ecstasy%2C+heroin%2C+meth%2C+crack%2C+cocaine%2C+utah%2C+ut%2C+provo%2C+orem%2C+west+valley+city%2C+sandy%2C+draper%2C+murray%2C+midvale%2C+ogden%2C+west+jordan%2C+taylorsville%2C+south+jordan+%2C+cottonwood+heights%2C+holladay%2C+north%2C+south%2C+park+city%2C+riverton%2C+salk+lake+county%2C+summit+county%2C+utah+county+deseret%2C+criminal+defense+lawyer%2C+dui%2C+drug+charges%2C+violent+crimes%2C+assault%2C+property+crimes%2C+theft%2C+shoplifting%2C+fraud%2C+forgery%2C+drivers+license%2C+revocation%2C+insurance%2C+drivers+license+status%2C+homicide%2C+rape%2C+battery%2C+dave+b.+shapiro%2C+attorney%2C+law+firm';
var metaContents  = 'salt+lake+city%2C+slc%2C+drug+arrest%2C+drug+trafficking%2C+drug+possession%2C+marijuana%2C+cocaine%2C+ecstasy%2C+heroin%2C+meth%2C+crack%2C+cocaine%2C+utah%2C+ut%2C+provo%2C+orem%2C+west+valley+city%2C+sandy%2C+draper%2C+murray%2C+midvale%2C+ogden%2C+west+jordan%2C+taylorsville%2C+DRUGS%2C+Possession+of+drugs%2C+Possession+with+Intent+to+Distribute+Drugs%2C+Conspiracy+to+Posses+Drugs++++Conspiracy+to+Traffic+in+Drugs++++Trafficking+in+Drugs++++International+Drug+Smuggling+++VIOLENT+CRIMES+++Murder+in+the+First+Degree++++Murder++++Manslaughter++++Culpable+Negligence+Manslaughter++++Vehicular+Homicide+++ROBBERY+AND+THEFT+OFFENSES+++Robbery++++Burglary+of+a+Dwelling++++Battery++++Assault++++Domestic+Violence+Battery++++Violation+Temporary+Restraining+Orders++++Protective+order+++Resisting+Arrest+With+Violence++++Rape++++Sexual+Assault++++Sexual+Battery++++Lewdness+Possession+of+Pornographic+or+Obscene+Materials++++Solicitation+FRAUD+++Uttering+a+Forged+Instrument++++Forgery++++Counterfeiting++++Identity+Theft++++Identity+Fraud++++Theft+of+Intellectual+Property++++Money+Laundering++++Bank+Fraud++++Wire+Fraud++++Healthcare+Fraud++++Welfare+Fraud++++Medicare+Fraud++++Medicaid+Fraud+++DRIVING+OFFENSES+++Reckless+Driving++++Driving+Under+the+Influence+of+Alcohol+or+Drugs++++Felony+Driving+Under+the+Influence++++Driving+Under+the+Influence+Manslaughter++++Fleeing+or+Eluding+a+Police+Officer++++Racing++++Speeding++++Driving+With+a+Suspended+Drivers+License++++Driving+With+an+Expired+Drivers+License++++Driving+Without+a+Drivers+License++++All+Traffic+Offenses+++Disorderly+Conduct++++Possession+of+Alcoholic+Beverages+by+Under+Aged+Person++++Obstruction+of+Justice++++False+Statement+to+a+Federal+Agent++++Filing+a+False+Police+Report++++Resisting+Arrest+Without+Violence++++Illegal+Re-entry+After+Deportation++++Illegal+Dumping++++Contracting+Without+a+License+++POST-CONVICTION+RELIEF++++Expunge+++Expungement+++Expungment++Criminal+Records+++';
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();
};
