/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','52301',jdecode('Testimonials'),jdecode(''),'/52301.html','true',[],'',''],
	['PAGE','5343',jdecode('Wedding+Hire'),jdecode(''),'/5343.html','true',[],'',''],
	['PAGE','24122',jdecode('Limousine+Hire'),jdecode(''),'/24122.html','true',[],'',''],
	['PAGE','36901',jdecode('Tours'),jdecode(''),'/36901.html','true',[],'',''],
	['PAGE','24101',jdecode('Cruise+Liner+Tours'),jdecode(''),'/24101.html','true',[],'',''],
	['PAGE','32501',jdecode('Price+Guide'),jdecode(''),'/32501.html','true',[],'',''],
	['PAGE','31501',jdecode('Request+a+Quote'),jdecode(''),'/31501.html','true',[],'',''],
	['PAGE','5469',jdecode('Contact+us'),jdecode(''),'/5469.html','true',[],'',''],
	['PAGE','41501',jdecode('Links'),jdecode(''),'/41501.html','true',[],'',''],
	['PAGE','31801',jdecode('Gallery'),jdecode(''),'/31801.html','true',[],'',''],
	['PAGE','47801',jdecode('Cab+Blog'),jdecode(''),'/47801.html','true',[],'',''],
	['PAGE','20701',jdecode('London+Cab+History'),jdecode(''),'/20701.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Shadows';
theSitetree.paletteFamily='C8D4E7';
theSitetree.keyvisualId='1844';
theSitetree.keyvisualName='auto.jpg';
theSitetree.fontsetId='314';
theSitetree.graphicsetId='369';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Shadows',
				paletteFamily: 	'C8D4E7',
				keyvisualId: 	'1844',
				keyvisualName: 	'auto.jpg',
				fontsetId: 		'314',
				graphicsetId: 	'369',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'C8D4E7',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100203-143051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20090113-153244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5343',
internalId:  '',
customField: '20100126-191605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24122',
internalId:  '',
customField: '20100209-224823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20090409-214318'
};
webappMappings['7050']=webappMappings['7050-1577']={
webappId:    '7050',
documentId:  '47801',
internalId:  '1577',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5469',
internalId:  '',
customField: '20090118-164946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20090804-011120'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-3063']={
webappId:    '7008',
documentId:  '31501',
internalId:  '3063',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20090228-172221'
};
webappMappings['7060']=webappMappings['7060-1aa400a1de3a1cfee987c8038a1bd4f8']={
webappId:    '7060',
documentId:  '31801',
internalId:  '1aa400a1de3a1cfee987c8038a1bd4f8',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20090804-011502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20100126-192543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20090804-010826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20100202-063543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47801',
internalId:  '',
customField: '20090806-171316'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPBSA';
var companyName   = 'LONDON+CAB';
var htmlTitle	  = 'LONDON+CAB+HIRE+-+Christchurch+NZ';
var metaKeywords  = 'wedding+car%2C+wedding+car+christchurch%2C+wedding%2C+Bridal+car%2C+bridal+car%2C+bridal+car+hire%2C+limousine+christchurch%2C+limousines+christchurch%2C+limousine+hire%2C+limousine%2C+limosine%2C+limosine+christchurch%2C+wedding+cars+christchurch%2C+christchurch+wedding+car%2C+christchurch+bridal+car%2C+bridal+car%2C+bridal+cars%2C+wedding+transport%2C+wedding+transport+christchurch%2C+canterbury%2C+bridal+car+christchurch%2C+london+taxi+wedding%2C+london+cab+wedding%2C++wedding+car+canterbury%2C+london+cab%2C+London+Taxi%2C+London+cab+christchurch%2C+London%2C+cab%2C+taxi%2C+christchurch%2C+Wedding+car+hire%2C+car+hire%2C++london+taxi%2C++christchurch+sightseeing+tours%2C+sightseeing+tours%2C+tours%2Ccorporate+hire%2C+event%2C+birthday+car+hire%2C+school+ball%2C+anniversary%2C+wine+tour%2C+event%2C+a+taste+of+england%2C+england%2C+';
var metaContents  = 'Wedding+Car+Christchurch+-+London+Cab+Hire.+The+Perfect+Transport+for+your+special+day.+Seats+Six.+A+taste+of+England+in+the+Garden+city.';
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();
};
