/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('About+GPD'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','673',jdecode('History'),jdecode(''),'/652/673.html','true',[],'','']
	],'',''],
	['PAGE','38701',jdecode('Citizens+Auxiliary'),jdecode(''),'/38701.html','true',[],'',''],
	['PAGE','736',jdecode('Contact'),jdecode(''),'/736.html','true',[],'',''],
	['PAGE','1243',jdecode('Crime+Prevention'),jdecode(''),'/1243/index.html','true',[ 
		['PAGE','27601',jdecode('Citizens+Police+Academy'),jdecode(''),'/1243/27601.html','true',[],'',''],
		['PAGE','1264',jdecode('Dare'),jdecode(''),'/1243/1264.html','true',[],'',''],
		['PAGE','9622',jdecode('KidCop+Academy'),jdecode(''),'/1243/9622.html','true',[],'',''],
		['PAGE','9601',jdecode('Neighborhood+Watch'),jdecode(''),'/1243/9601.html','true',[],'',''],
		['PAGE','9643',jdecode('Operation+I.+D.'),jdecode(''),'/1243/9643.html','true',[],'',''],
		['PAGE','1285',jdecode('PC%26%23x27%3Bs+Page'),jdecode(''),'/1243/1285.html','true',[],'',''],
		['PAGE','9664',jdecode('Vacation+Checks'),jdecode(''),'/1243/9664.html','true',[],'','']
	],'',''],
	['PAGE','13001',jdecode('Crime+TIPS'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','13806',jdecode('Guestbook'),jdecode(''),'/13806.html','true',[],'',''],
	['PAGE','715',jdecode('Jobs%2FEmployment'),jdecode(''),'/715.html','true',[],'',''],
	['PAGE','8185',jdecode('Law+Enforcement+Links'),jdecode(''),'/8185.html','true',[],'',''],
	['PAGE','34601',jdecode('Photos'),jdecode(''),'/34601/index.html','true',[ 
		['PAGE','34622',jdecode('Citizens+Police+Academy'),jdecode(''),'/34601/34622.html','true',[],'',''],
		['PAGE','39501',jdecode('Defensive+Tactics+for+GHS'),jdecode(''),'/34601/39501.html','true',[],'',''],
		['PAGE','37501',jdecode('Defensive+Tactics+for+Women'),jdecode(''),'/34601/37501.html','true',[],'',''],
		['PAGE','34643',jdecode('KidCop+Academy'),jdecode(''),'/34601/34643.html','true',[],'','']
	],'',''],
	['PAGE','8501',jdecode('Safety+Tips'),jdecode(''),'/8501/index.html','true',[ 
		['PAGE','8564',jdecode('Business+Security'),jdecode(''),'/8501/8564.html','true',[],'',''],
		['PAGE','18301',jdecode('Child+Safety'),jdecode(''),'/8501/18301.html','true',[],'',''],
		['PAGE','22822',jdecode('Computer+Security'),jdecode(''),'/8501/22822.html','true',[],'',''],
		['PAGE','8522',jdecode('Drugs+of+Abuse'),jdecode(''),'/8501/8522.html','true',[],'',''],
		['PAGE','13022',jdecode('Fraud'),jdecode(''),'/8501/13022.html','true',[],'',''],
		['PAGE','8543',jdecode('Home+Security'),jdecode(''),'/8501/8543.html','true',[],'','']
	],'',''],
	['PAGE','13801',jdecode('Read+Guestbook'),jdecode(''),'/13801.html','false',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='70A3FF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'70A3FF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-13806avec10inpy9x']={
webappId:    '1002',
documentId:  '13806',
internalId:  '13806avec10inpy9x',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-129']={
webappId:    '7008',
documentId:  '9664',
internalId:  '129',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-130']={
webappId:    '7008',
documentId:  '715',
internalId:  '130',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090116-134610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13806',
internalId:  '',
customField: '20081224-110729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100426-101914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20091102-125054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20081030-122527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20090714-110541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20100111-112344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20100426-104505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20100426-105128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1243',
internalId:  '',
customField: '20090311-114118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1264',
internalId:  '',
customField: '20091224-132510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20081103-113645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20081103-123923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20081103-123849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9664',
internalId:  '',
customField: '20081111-115740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1285',
internalId:  '',
customField: '20090205-134642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20081224-105555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8522',
internalId:  '',
customField: '20090205-141956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8543',
internalId:  '',
customField: '20081111-111724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8564',
internalId:  '',
customField: '20081111-112847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13022',
internalId:  '',
customField: '20081111-113612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20081111-154151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8185',
internalId:  '',
customField: '20100111-112803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20081104-152635'
};
webappMappings['7008']=webappMappings['7008-9343']={
webappId:    '7008',
documentId:  '13001',
internalId:  '9343',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22822',
internalId:  '',
customField: '20090129-113418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20100426-104756'
};
webappMappings['7060']=webappMappings['7060-6fc0ec1c0329fbe794c4f02887a45118']={
webappId:    '7060',
documentId:  '37501',
internalId:  '6fc0ec1c0329fbe794c4f02887a45118',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20090421-123851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34622',
internalId:  '',
customField: '20091224-103839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34643',
internalId:  '',
customField: '20090902-121509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20091129-074710'
};
webappMappings['1501']=webappMappings['1501-14598313']={
webappId:    '1501',
documentId:  '601',
internalId:  '14598313',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-7e45f626d0be3cb5fa0b70fc781f63a7']={
webappId:    '7060',
documentId:  '39501',
internalId:  '7e45f626d0be3cb5fa0b70fc781f63a7',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e2a117dff523687b14cc629b3fc56949']={
webappId:    '7060',
documentId:  '34622',
internalId:  'e2a117dff523687b14cc629b3fc56949',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-a66614880880d20019bdff3ba67a5766']={
webappId:    '7060',
documentId:  '34643',
internalId:  'a66614880880d20019bdff3ba67a5766',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPY9X';
var companyName   = 'GRAHAM+POLICE+DEPARTMENT';
var htmlTitle	  = '';
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();
};
