/* [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','1501',jdecode('GuelphLimo+Home'),jdecode(''),'/1501.html','true',[],'',''],
	['PAGE','2001',jdecode('Our+Fleet'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2022',jdecode('Packages'),jdecode(''),'/2022.html','true',[],'',''],
	['PAGE','2043',jdecode('Rates+%26+Reservations'),jdecode(''),'/2043.html','true',[],'',''],
	['PAGE','2064',jdecode('Testimonials'),jdecode(''),'/2064.html','true',[],'','']];
var siteelementCount=5;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='6699CC';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17363';
theSitetree.graphicsetId='12764';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'6699CC',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17363',
				graphicsetId: 	'12764',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20090805-144727'
};
webappMappings['1501']=webappMappings['1501-708285']={
webappId:    '1501',
documentId:  '1501',
internalId:  '708285',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20090130-160654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20090324-135533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2022',
internalId:  '',
customField: '20080708-230820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2064',
internalId:  '',
customField: '20090915-135420'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc2.sitecreatorservice.com';
var accountId     = 'ASIB10INXLX0';
var companyName   = '+++++LIMOBUS+NEW+FOR+2009%21%21%21';
var htmlTitle	  = 'Guelph+Limo+Service+%3C+Cambridge%2C+Guelph%2C++Kitchener%2CWaterloo%3E';
var metaKeywords  = 'cambridge+limo%2C+tricity+limo%2Cchauffer+kitchener%2C+waterloolimo%2C+waterloo%2C+guelphlimo%2C+cambridgelimo%2C+kitchenerlimo%2C+wedding%2C+party%2C+airport+shuttle%2C+waterloo+limousine%2C+Kitchener+limousine%2C+kitchener+hummer%2C+airport+limo%2Cairport+limousine%2C+limo+service%2C+chauffeured+limousines%2Cdiscount+limousines%2Cexotic+limousines%2Climo+rental%2Climo+service%2Climousines%2Cluxury+limo%2Cluxury+limousines%2Cprom+limo%2Cprom+limousines%2Crent+limousines%2Cstretch+limo%2Cstretch+limousines%2Csuv+limousines%2C+cambridge%2C+kitchener%2C+waterloo%2C+guelph%2C+erin%2C+fergus%2C+orangeville%2C+ayrlimo%2Cwaterloolimo%2C+limobus%2C+limo+bus%2C+limusine';
var metaContents  = 'cambridge+limo%2Cairport+shuttle%2C+tricity+limo%2C+guelph+limo%2C+waterloo+limo%2Ckitchenerlimo%2C+kitchener+limo%2C+limousine+ontario%2C+stretch+hummer%2C+hummerlimo%2C+hummerlimo%2C+cambridge+hummer%2C+waterloo+hummer%2C+waterloohummer%2C+waterloolimousine%2C+limousine+tricity%2C+wedding+limo%2C+wedding%2C+transportation%2C+cambridge+livery%2C+livery%2C+bookmealimo%2C+airport+limo%2Cairport+limousine%2C+limo+service%2C+chauffeured+limousines%2Cdiscount+limousines%2Cexotic+limousines%2Climo+rental%2Climo+service%2Climousines%2Cluxury+limo%2Cluxury+limousines%2Cprom+limo%2Cprom+limousines%2Crent+limousines%2Cstretch+limo%2Cstretch+limousines%2Csuv+limousines%2C+Limobus%2C+limobus%2C+limusine+';
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();
};
