/* [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','5322',jdecode('Welcome+to+NH+DWI+Laws'),jdecode(''), jdecode('%2F5322.html'), 'true',[],'',''],
	['PAGE','7322',jdecode('DWI+Links'),jdecode(''), jdecode('%2F7322.html'), 'true',[],'',''],
	['PAGE','7343',jdecode('Contact'),jdecode(''), jdecode('%2F7343.html'), 'true',[],'',''],
	['PAGE','7364',jdecode('About+us'),jdecode(''), jdecode('%2F7364%2Findex.html'), 'true',[ 
		['PAGE','7385',jdecode('Attorney+Mark+Stevens'),jdecode(''), jdecode('%2F7364%2F7385.html'), 'true',[],'',''],
		['PAGE','7406',jdecode('Our+history'),jdecode(''), jdecode('%2F7364%2F7406.html'), 'false',[],'',''],
		['PAGE','7427',jdecode('Location'),jdecode(''), jdecode('%2F7364%2F7427.html'), 'true',[],'','']
	],'',''],
	['PAGE','8001',jdecode('New+Hampshire+DWI+Laws'),jdecode(''), jdecode('%2F8001.html'), 'true',[],'',''],
	['PAGE','8022',jdecode('New+Hampshire%26%23x27%3Bs+DWI+Law+RSA+265-A%3A2'),jdecode(''), jdecode('%2F8022.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('New+Hampshire+Aggravated+DWI+Laws'),jdecode(''), jdecode('%2F12101.html'), 'true',[],'',''],
	['PAGE','11201',jdecode('New+Hampshire+DWI+Laws-RSA+265%3AA-5%3A+Administration+of+Alcohol+Concentration+Testing'),jdecode(''), jdecode('%2F11201.html'), 'true',[],'',''],
	['PAGE','14801',jdecode('New+Hampshire+DWI+Penalties'),jdecode(''), jdecode('%2F14801.html'), 'true',[],'',''],
	['PAGE','15801',jdecode('New+Hampshire+Administrative+Rules+on+Blood+Testing+for+Alcohol+and+Controlled+Drugs-Definitions'),jdecode(''), jdecode('%2F15801.html'), 'true',[],'',''],
	['PAGE','16601',jdecode('New+Hampshire+Administrative+Rules+for+Blood+Testing-Collection%2C+Delivery+and+Testing+of+the+Samples'),jdecode(''), jdecode('%2F16601.html'), 'true',[],'',''],
	['PAGE','28501',jdecode('Driving+Under+the+Influence+of+Alcohol+or+Drugs%3A+Administrative+Review+and+Hearings%3A+RSA+265-A%3A31'),jdecode(''), jdecode('%2F28501.html'), 'true',[],'',''],
	['PAGE','13201',jdecode('%22Minor+in+Possesssion%22+or+Unlawful+Intoxication'),jdecode(''), jdecode('%2F13201.html'), 'true',[],'',''],
	['PAGE','17301',jdecode('New+Hampshire+Reckless+Driving+Law'),jdecode(''), jdecode('%2F17301.html'), 'true',[],'',''],
	['PAGE','19001',jdecode('New+Hampshire+Negligent+Driving+Charges'),jdecode(''), jdecode('%2F19001.html'), 'true',[],'',''],
	['PAGE','27601',jdecode('Conduct+After+Accident'),jdecode(''), jdecode('%2F27601.html'), 'true',[],'',''],
	['PAGE','35001',jdecode('%22Public+Way%22'),jdecode(''), jdecode('%2F35001.html'), 'true',[],'',''],
	['PAGE','31601',jdecode('Minor+in+Possession+of+Alcohol'),jdecode(''), jdecode('%2F31601.html'), 'true',[],'',''],
	['PAGE','20501',jdecode('New+Hampshire+District+Court+Directions'),jdecode(''), jdecode('%2F20501.html'), 'true',[],'',''],
	['PAGE','21301',jdecode('Transporting+Alcohol+in+a+Motor+Vehicle'),jdecode(''), jdecode('%2F21301.html'), 'true',[],'',''],
	['PAGE','29101',jdecode('Operating+After+License+Suspension'),jdecode(''), jdecode('%2F29101.html'), 'true',[],'',''],
	['PAGE','34501',jdecode('Trasporting+Alcoholic+Beverages%3A+New+Hampshire+Law'),jdecode(''), jdecode('%2F34501.html'), 'true',[],'',''],
	['PAGE','34101',jdecode('New+Hampshire+Law%3A+Possession+of+Drugs'),jdecode(''), jdecode('%2F34101.html'), 'true',[],'',''],
	['PAGE','30501',jdecode('Speeding'),jdecode(''), jdecode('%2F30501.html'), 'true',[],'',''],
	['PAGE','35701',jdecode('Habitual+Offender'),jdecode(''), jdecode('%2F35701.html'), 'true',[],'',''],
	['PAGE','37901',jdecode('Probationary+Licenses'),jdecode(''), jdecode('%2F37901.html'), 'true',[],'',''],
	['PAGE','15101',jdecode('Interesting+links'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7245';
theSitetree.keyvisualName='kv_7245.jpg';
theSitetree.fontsetId='16412';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC24G'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7245',
				keyvisualName: 	'kv_7245.jpg',
				fontsetId: 		'16412',
				graphicsetId: 	'12134',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-1847']={
webappId:    '7050',
documentId:  '5322',
internalId:  '1847',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20120102-101020'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5322',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6066425']={
webappId:    '1501',
documentId:  '5322',
internalId:  '6066425',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20110111-123215'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '5322',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7322',
internalId:  '',
customField: '20111114-183331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20120102-101219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7343',
internalId:  '',
customField: '20111208-162439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7364',
internalId:  '',
customField: '20111208-162959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7385',
internalId:  '',
customField: '20111208-163023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7406',
internalId:  '',
customField: '20091201-164202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7427',
internalId:  '',
customField: '20111024-104914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8022',
internalId:  '',
customField: '20110618-101208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20111114-183353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20110618-101324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20110618-101249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20120102-101717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20110411-174749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20111114-183600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20110411-174936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20110411-175100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20100906-140957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20100906-143808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20101008-083118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20101223-161604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20110422-151100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20110420-143550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31601',
internalId:  '',
customField: '20110502-214158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20110618-101020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20110708-164245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20110822-231910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35701',
internalId:  '',
customField: '20111024-105449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20120120-214600'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLPL2';
var companyName   = 'New+Hampshire+DWI+Laws+by+Mark+Stevens+';
var htmlTitle	  = 'New+Hampshire+DWI+Laws+by+Lawyer+Mark+Stevens+603-893-0074';
var metaKeywords  = 'New+Hampshire+DWI+laws%2C+DWI%2C+DUI%2C+OUI%2C+DWI-DUI%2C+dwi%2C+aggravated+dwi%2C+minor-in-possession%2C+intoxication%2C+dwi+roadblocks%2C+work+license%2C+New+Hampshire+DWI+penalties%2C+reckless+driving%2C+minor+in+possession+of+alcohol%2C+unlawful+intoxication%2C+dwi+lawyer+in+salem+district+court%2C+dwi+lawyer+in+nashua%2C+dwi+lawyer+in+plaistow%2C+dwi+lawyer+in+exeter%2C+dwi+lawyer+in+merrimack%2C+dwi+lawyer+in+dover%2C+dwi+lawyer+in+concord%2C+dwi+lawyer+in+merrimack%2C+dwi+lawyer+in+milford%2C+dwi+lawyer+in+jaffrey-peterborough%2C+dwi+lawyer+in+keene%2C+dwi+lawyer+in+derry%2C+new+hampshire+dwi+lawyer%2C+newhampshiredwilaws%2C+nhdwilaws%2C+dwi+lawyer+in+laconia%2C+dwi+lawyer+in+rochester%2C+dwi+lawyer+in+hampton%2C+dwi+lawyer+in+hampton%2C+dwi+lawyer+in+claremont%2C+dwi+lawyer+in+plymouth%2C+dwi+lawyer+in+carroll+county%2C+nashua+district+court%2C+salem+district+court%2C+laconia+district+court%2C+exeter+district+court%2C+derry+district+court%2C+merrimack+district+court%2C+concord+district+court';
var metaContents  = 'New+Hampshire+DWI+laws%2C+New+Hampshire+DUI%2FDWI+penalties%2C+DUI+case+results%2C+statutes+and+related+legal+information+by+Salem%2C+New+Hampshire+criminal+defense+lawyer+Mark+Stevens.++Topics+include+DWI%2C+DUI%2C+OUI%2C+aggravated+DWI%2C+boating+while+intoxicated%2C+%22minor+in+possession%22%2C+and+underage+alcohol+charges.';
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();
};

