/* [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','347',jdecode('Home'),jdecode(''), jdecode('%2F347.html'), 'true',[],'',''],
	['PAGE','610',jdecode('About+Us'),jdecode(''), jdecode('%2F610.html'), 'true',[],'',''],
	['PAGE','5240',jdecode('What%26%23x27%3Bs+New'),jdecode(''), jdecode('%2F5240.html'), 'true',[],'',''],
	['PAGE','805',jdecode('Other+Vehicles'),jdecode(''), jdecode('%2F805.html'), 'true',[],'',''],
	['PAGE','628',jdecode('Picture+Gallery'),jdecode(''), jdecode('%2F628.html'), 'true',[],'',''],
	['PAGE','4793',jdecode('London+Airports'),jdecode(''), jdecode('%2F4793.html'), 'true',[],'',''],
	['PAGE','3889',jdecode('Sea+Trips'),jdecode(''), jdecode('%2F3889.html'), 'true',[],'',''],
	['PAGE','2239',jdecode('Weddings'),jdecode(''), jdecode('%2F2239.html'), 'true',[],'',''],
	['PAGE','3270',jdecode('Royal+Ascot'),jdecode(''), jdecode('%2F3270.html'), 'true',[],'',''],
	['PAGE','3688',jdecode('Make+a+Wish+'),jdecode(''), jdecode('%2F3688.html'), 'true',[],'',''],
	['PAGE','1816',jdecode('Security'),jdecode(''), jdecode('%2F1816.html'), 'true',[],'',''],
	['PAGE','2523',jdecode('Clubs'),jdecode(''), jdecode('%2F2523.html'), 'true',[],'',''],
	['PAGE','2706',jdecode('F.A.Q'),jdecode(''), jdecode('%2F2706.html'), 'true',[],'',''],
	['PAGE','619',jdecode('Contact+Us'),jdecode(''), jdecode('%2F619.html'), 'true',[],'',''],
	['PAGE','1807',jdecode('Legal+Stuff'),jdecode(''), jdecode('%2F1807.html'), 'true',[],'',''],
	['PAGE','5326',jdecode('Guestbook'),jdecode(''), jdecode('%2F5326%2Findex.html'), 'true',[ 
		['PAGE','5325',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F5326%2F5325.html'), 'false',[],'','']
	],'',''],
	['PAGE','13401',jdecode('Links'),jdecode(''), jdecode('%2F13401.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Disco';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='4611';
theSitetree.keyvisualName='eroeffnung.jpg';
theSitetree.fontsetId='310';
theSitetree.graphicsetId='363';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000066';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Disco',
				paletteFamily: 	'000066',
				keyvisualId: 	'4611',
				keyvisualName: 	'eroeffnung.jpg',
				fontsetId: 		'310',
				graphicsetId: 	'363',
				contentColor: 	'FFFFFF',
				contentBGColor: '000066',
				a_color: 		'000066',
				b_color: 		'FFFFFF',
				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:  '347',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-224905']={
webappId:    '1501',
documentId:  '347',
internalId:  '224905',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '610',
internalId:  '',
customField: '20120123-093920'
};
webappMappings['1002']=webappMappings['1002-5326AHW050INXVCP']={
webappId:    '1002',
documentId:  '5326',
internalId:  '5326AHW050INXVCP',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '347',
internalId:  '',
customField: '20120123-131002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5240',
internalId:  '',
customField: '20120123-094209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '619',
internalId:  '',
customField: '20060817-165556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '805',
internalId:  '',
customField: '20111220-145540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '628',
internalId:  '',
customField: '20120123-132130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4793',
internalId:  '',
customField: '20080129-130759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3889',
internalId:  '',
customField: '20060928-154901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2239',
internalId:  '',
customField: '20120115-091104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3270',
internalId:  '',
customField: '20111207-045824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3688',
internalId:  '',
customField: '20061013-083143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1816',
internalId:  '',
customField: '20060329-165918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2523',
internalId:  '',
customField: '20110730-141907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2706',
internalId:  '',
customField: '20120123-095525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1807',
internalId:  '',
customField: '20080218-141216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5326',
internalId:  '',
customField: '20060928-153614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5325',
internalId:  '',
customField: '20060814-023747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20110628-040817'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXVCP';
var companyName   = '+++kentlimos.co.uk+++++++++++++Tel%3A+01227+794452+';
var htmlTitle	  = 'Kent+Limos+-+Limousines+and+Hummers+for+hire+in+Kent+and+London';
var metaKeywords  = 'uk%2Ckent+limos%2Climo+hire+in+kent+and+london%2Ckent+limousine+hire%2C+london+limousine+hire%2Ccheap+Limos%2Ckaraoke+limos%3A+limousines%2Chen+partys%2Chen+parties%2Cbirthday+parties%2Cstag+nights%2Cstretched+limos%2Csuper+stretched+limousines%2Climosines+for+hire%2Chire+a+limo%2Chen+parties%2Cstag+parties%2Chen+party+limousines%2Chen+partys+limos%2Cstag+party+limos%2Cday+trip+limousines%2Cwedding+cars+in+east+kent%2Ctaxis+to+london+airports+from+whitstable%3Acanterbury%3Aherne+bay%3A+east+kent%2Ccabs+from+london+airport+to+canterbury+%3A+kent+';
var metaContents  = 'UK+Kentlimos.com+%3A+Limos+%3A+Limousines+and+hummers+for+hire+in+kent+and+london%2CKent+Limo+Hire%2CKaraoke+Limo%2CLimousine+hire+kent%2Cprom+limos%2C++++++Wedding+Limousines%2Cparty+limousines%2CStretched+limo+hire%2CCanterbury+Limo+hire.Cheap+Limousine+hire%2CHen+Night+Limousines%2CHEN+NIGHTS%2CLIMO+to+Brighton%2CLimo+Hire+Canterbury+%3A+Whitstable+%3A+airports%2C+american+++millenium+limousines%2CStretched+limousines%2Cstretched+hummers+for+hire+canterbury+%3A+whitstable+%3A+herne+bay+%3A+faversham+%3A+sittingbourne%3A+margate%3A+broadstairs+%3A+east+kent+%3A+london';
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();
};

