/* [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','1301',jdecode('WELCOME++'),jdecode(''),'/1301/index.html','true',[ 
		['PAGE','13822',jdecode('RESERVATIONS'),jdecode(''),'/1301/13822.html','true',[],''],
		['PAGE','15101',jdecode('METER+RATES'),jdecode(''),'/1301/15101.html','true',[],''],
		['PAGE','15601',jdecode('CREDIT+CARDS'),jdecode(''),'/1301/15601.html','true',[],''],
		['PAGE','1352',jdecode('SERVICES'),jdecode(''),'/1301/1352.html','true',[],''],
		['PAGE','1436',jdecode('ABOUT+US'),jdecode(''),'/1301/1436.html','true',[],''],
		['PAGE','1499',jdecode('OPPORTUNITIES'),jdecode(''),'/1301/1499.html','true',[],''],
		['PAGE','20001',jdecode('CONTACT+US'),jdecode(''),'/1301/20001.html','true',[],'']
	],''],
	['PAGE','22501',jdecode('VISITORS'),jdecode(''),'/22501.html','true',[],''],
	['PAGE','49701',jdecode('NO+DUI%21'),jdecode(''),'/49701.html','true',[],''],
	['PAGE','20401',jdecode('ENTERTAINMENT'),jdecode(''),'/20401.html','true',[],''],
	['PAGE','23001',jdecode('AIRPORT'),jdecode(''),'/23001.html','true',[],''],
	['PAGE','49201',jdecode('WEATHER'),jdecode(''),'/49201.html','true',[],''],
	['PAGE','1520',jdecode('NEWS4U'),jdecode(''),'/1520.html','false',[],''],
	['PAGE','37101',jdecode('+LOCAL+CHAMBER'),jdecode(''),'/37101.html','true',[],''],
	['PAGE','37501',jdecode('LOCAL+GOV'),jdecode(''),'/37501.html','true',[],''],
	['PAGE','20422',jdecode('SCHOOLS'),jdecode(''),'/20422.html','true',[],''],
	['PAGE','37122',jdecode('MAPS++'),jdecode(''),'/37122.html','true',[],''],
	['PAGE','41601',jdecode('FIND+IT'),jdecode(''),'/41601.html','true',[],''],
	['PAGE','43401',jdecode('Contact'),jdecode(''),'/43401.html','false',[],''],
	['PAGE','43601',jdecode('Jobs'),jdecode(''),'/43601.html','false',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Cuy';
theSitetree.paletteFamily='F3FAFB';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='385';
theSitetree.graphicsetId='437';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F3FAFB';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Cuy',
				paletteFamily: 	'F3FAFB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'385',
				graphicsetId: 	'437',
				contentColor: 	'000000',
				contentBGColor: 'F3FAFB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'F3FAFB',
				b_color: 		'A9C9CD',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '1301',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20422',
internalId:  '',
customField: '20090920-231011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20090930-155217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1520',
internalId:  '',
customField: '20090923-205047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1352',
internalId:  '',
customField: '20090916-125037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1436',
internalId:  '',
customField: '20090911-133331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1499',
internalId:  '',
customField: '20081104-110843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20090930-105136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20090930-160659'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-11091']={
webappId:    '7008',
documentId:  '13822',
internalId:  '11091',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13822',
internalId:  '',
customField: '20090920-220449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20090920-233158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20091001-175658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20090924-213801'
};
webappMappings['7008']=webappMappings['7008-11213']={
webappId:    '7008',
documentId:  '1520',
internalId:  '11213',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49201',
internalId:  '',
customField: '20090921-213045'
};
webappMappings['7008']=webappMappings['7008-11212']={
webappId:    '7008',
documentId:  '20001',
internalId:  '11212',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20090915-221558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20090917-031730'
};
webappMappings['1501']=webappMappings['1501-13431895']={
webappId:    '1501',
documentId:  '1301',
internalId:  '13431895',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20090917-205050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37122',
internalId:  '',
customField: '20090920-215139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20090917-215430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41601',
internalId:  '',
customField: '20090927-201536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43401',
internalId:  '',
customField: '20090921-023359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20090921-023935'
};
webappMappings['7080']=webappMappings['7080-447']={
webappId:    '7080',
documentId:  '49201',
internalId:  '447',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-11370']={
webappId:    '7008',
documentId:  '49701',
internalId:  '11370',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPGW4';
var companyName   = 'Cardinal+Cab+Co.';
var htmlTitle	  = 'CARDINAL+CAB+Evansville%27s+Newest+Cab+Service';
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();
};
