/* [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','52',jdecode('Home'),jdecode(''),'/52.html','true',[],'',''],
	['PAGE','32266',jdecode('2010+Tour+Schedule'),jdecode(''),'/32266/index.html','true',[ 
		['PAGE','124201',jdecode('Donegal+Weekend'),jdecode(''),'/32266/124201.html','true',[],'',''],
		['PAGE','32533',jdecode('Clare%2FConnemara+Tour'),jdecode(''),'/32266/32533.html','true',[],'',''],
		['PAGE','32569',jdecode('The+Irish+%22Grand+Tour%22'),jdecode(''),'/32266/32569.html','true',[],'',''],
		['PAGE','78543',jdecode('The+Switzerland+Tour'),jdecode(''),'/32266/78543.html','true',[],'',''],
		['PAGE','32794',jdecode('The+France+Tour'),jdecode(''),'/32266/32794.html','true',[],'',''],
		['PAGE','32587',jdecode('SW+Peninsulas+Tour'),jdecode(''),'/32266/32587.html','true',[],'',''],
		['PAGE','32596',jdecode('North+Wales+Weekend'),jdecode(''),'/32266/32596.html','true',[],'','']
	],'',''],
	['PAGE','122301',jdecode('General+Tour+Information'),jdecode(''),'/122301.html','true',[],'',''],
	['PAGE','82',jdecode('Terms%2FConditions'),jdecode(''),'/82.html','true',[],'',''],
	['PAGE','2428',jdecode('Booking+Procedure'),jdecode(''),'/2428.html','true',[],'',''],
	['PAGE','124001',jdecode('Motorcycle+Rental'),jdecode(''),'/124001.html','true',[],'',''],
	['PAGE','91',jdecode('Contact+Us'),jdecode(''),'/91.html','true',[],'',''],
	['PAGE','129101',jdecode('About+Us'),jdecode(''),'/129101.html','true',[],'',''],
	['PAGE','22212',jdecode('Travel+in+Ireland'),jdecode(''),'/22212.html','true',[],'',''],
	['PAGE','34067',jdecode('Touring+Tips'),jdecode(''),'/34067/index.html','true',[ 
		['PAGE','34408',jdecode('Motorcycle'),jdecode(''),'/34067/34408.html','true',[],'',''],
		['PAGE','34417',jdecode('Luggage'),jdecode(''),'/34067/34417.html','true',[],'',''],
		['PAGE','34426',jdecode('Documents'),jdecode(''),'/34067/34426.html','true',[],'',''],
		['PAGE','34435',jdecode('Clothing'),jdecode(''),'/34067/34435.html','true',[],'','']
	],'',''],
	['PAGE','21307',jdecode('Links'),jdecode(''),'/21307.html','true',[],'',''],
	['PAGE','21568',jdecode('Guestbook'),jdecode(''),'/21568/index.html','true',[ 
		['PAGE','21567',jdecode('Read+Guestbook'),jdecode(''),'/21568/21567.html','true',[],'','']
	],'',''],
	['PAGE','23669',jdecode('Photo+Albums'),jdecode(''),'/23669/index.html','true',[ 
		['PAGE','34608',jdecode('Swiss+Alps+2009'),jdecode(''),'/23669/34608.html','true',[],'',''],
		['PAGE','23605',jdecode('Previous+tours'),jdecode(''),'/23669/23605.html','true',[],'',''],
		['PAGE','24239',jdecode('2009+Tours'),jdecode(''),'/23669/24239.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Anniversary';
theSitetree.paletteFamily='5D539D';
theSitetree.keyvisualId='3740';
theSitetree.keyvisualName='kv_3740.jpg';
theSitetree.fontsetId='10472';
theSitetree.graphicsetId='10946';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F3EFDB';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Anniversary',
				paletteFamily: 	'5D539D',
				keyvisualId: 	'3740',
				keyvisualName: 	'kv_3740.jpg',
				fontsetId: 		'10472',
				graphicsetId: 	'10946',
				contentColor: 	'000000',
				contentBGColor: 'F3EFDB',
				a_color: 		'F7EFDE',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'828181',
				e_color: 		'828181',
				f_color: 		'828181',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-21568AHW050IN3CZO']={
webappId:    '1002',
documentId:  '21568',
internalId:  '21568AHW050IN3CZO',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-48']={
webappId:    '7008',
documentId:  '91',
internalId:  '48',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-4867550c41e3b9de458b67e0b3471037']={
webappId:    '7060',
documentId:  '23605',
internalId:  '4867550c41e3b9de458b67e0b3471037',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-326ede793a212b0f2f17952671a4b47c']={
webappId:    '7060',
documentId:  '24239',
internalId:  '326ede793a212b0f2f17952671a4b47c',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-35f3b4f415ed469e5c5e7a029d210ccb']={
webappId:    '7060',
documentId:  '34608',
internalId:  '35f3b4f415ed469e5c5e7a029d210ccb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20100701-175113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32266',
internalId:  '',
customField: '20100418-191845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32587',
internalId:  '',
customField: '20091029-151100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32569',
internalId:  '',
customField: '20100701-182637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122301',
internalId:  '',
customField: '20091102-114901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78543',
internalId:  '',
customField: '20100507-182320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20091013-203858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2428',
internalId:  '',
customField: '20091013-202358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32533',
internalId:  '',
customField: '20100602-181153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32596',
internalId:  '',
customField: '20100507-182548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32794',
internalId:  '',
customField: '20100507-182420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20091102-115043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22212',
internalId:  '',
customField: '20091013-210300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34067',
internalId:  '',
customField: '20091013-180606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34408',
internalId:  '',
customField: '20091013-215109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34417',
internalId:  '',
customField: '20091013-181731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34426',
internalId:  '',
customField: '20091029-141124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34435',
internalId:  '',
customField: '20091013-202725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21307',
internalId:  '',
customField: '20100418-200900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21568',
internalId:  '',
customField: '20100418-200647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21567',
internalId:  '',
customField: '20091013-215209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23669',
internalId:  '',
customField: '20100701-182740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34608',
internalId:  '',
customField: '20090820-165832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23605',
internalId:  '',
customField: '20070423-233230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24239',
internalId:  '',
customField: '20090929-165624'
};
webappMappings['1501']=webappMappings['1501-1333223']={
webappId:    '1501',
documentId:  '52',
internalId:  '1333223',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124001',
internalId:  '',
customField: '20091018-115810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124201',
internalId:  '',
customField: '20100602-181223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129101',
internalId:  '',
customField: '20091018-115734'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3CZO';
var companyName   = 'Motoireland+Motorcycle+Tours';
var htmlTitle	  = 'Motoireland+Motorcycle+Tours';
var metaKeywords  = 'motorcycle%2C+tour%2C+ireland%2C+northern%2C+irish%2C+bikers%2C+touring%2C+bike%2C+sligo%2C+kerry%2C+connemara%2C+donegal%2C+mayo%2C+motoireland%2C+Belfast%2C+moto';
var metaContents  = 'Scenic+tours+with+a+tour+leader+and+accommodation+arranged.+these+tours+are+for+bike+owners+using+their+own+machines.+Our+tours+can+be+weekends%2C+5+days+or+longer+breaks.+We+offer+value+for+money+and+welcome+everyone+from+first+time+tourers+to+seasoned+travellers.';
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();
};
