/* [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','3101',jdecode('Home'),jdecode(''),'/3101.html','true',[],'',''],
	['PAGE','3343',jdecode('Plexidor+Pet+Doors'),jdecode(''),'/3343/index.html','true',[ 
		['PAGE','17479',jdecode('Door+Mount'),jdecode(''),'/3343/17479.html','true',[],'',''],
		['PAGE','17500',jdecode('Wall+Mount'),jdecode(''),'/3343/17500.html','true',[],'',''],
		['PAGE','17521',jdecode('Plexidor+Electronic'),jdecode(''),'/3343/17521.html','true',[],'','']
	],'',''],
	['PAGE','3364',jdecode('Habitat+Haven'),jdecode(''),'/3364/index.html','true',[ 
		['PAGE','17542',jdecode('Cat%26%23x27%3Bs+Den%26%23x27%3Bs'),jdecode(''),'/3364/17542.html','true',[],'',''],
		['PAGE','17563',jdecode('Doggie+Dig%26%23x27%3Bs'),jdecode(''),'/3364/17563.html','true',[],'','']
	],'',''],
	['PAGE','3427',jdecode('Patio+Door+Pet+Doors+'),jdecode(''),'/3427/index.html','true',[ 
		['PAGE','17584',jdecode('Pet+Door+Design'),jdecode(''),'/3427/17584.html','true',[],'',''],
		['PAGE','17605',jdecode('Plexidor+Glass+Installation'),jdecode(''),'/3427/17605.html','true',[],'','']
	],'',''],
	['PAGE','16879',jdecode('Walkin+Wheels'),jdecode(''),'/16879/index.html','true',[ 
		['PAGE','27179',jdecode('Measure+and+Select+Cart'),jdecode(''),'/16879/27179.html','true',[],'',''],
		['PAGE','17626',jdecode('Rentals'),jdecode(''),'/16879/17626.html','true',[],'','']
	],'',''],
	['PAGE','5701',jdecode('Cat+Mate'),jdecode(''),'/5701.html','true',[],'',''],
	['PAGE','3385',jdecode('Dog+Runs+Kennel+Fencing'),jdecode(''),'/3385.html','true',[],'',''],
	['PAGE','3406',jdecode('Pet+Peeks'),jdecode(''),'/3406.html','true',[],'',''],
	['PAGE','3322',jdecode('Installations+and+Pics'),jdecode(''),'/3322.html','true',[],'',''],
	['PAGE','3448',jdecode('Choose+%26+Measure'),jdecode(''),'/3448.html','true',[],'',''],
	['PAGE','3301',jdecode('About+%2F+Contact+Us'),jdecode(''),'/3301.html','true',[],'',''],
	['PAGE','16900',jdecode('Our+Friends'),jdecode(''),'/16900.html','true',[],'',''],
	['PAGE','23779',jdecode('Online+Store'),jdecode(''),'/23779.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
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: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20100818-222222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100505-190955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3322',
internalId:  '',
customField: '20100414-121436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3406',
internalId:  '',
customField: '20100414-232325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3385',
internalId:  '',
customField: '20100511-230622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3427',
internalId:  '',
customField: '20100510-225600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3343',
internalId:  '',
customField: '20100531-230125'
};
webappMappings['7060']=webappMappings['7060-a634bfe47a18419939058a019e02e868']={
webappId:    '7060',
documentId:  '3322',
internalId:  'a634bfe47a18419939058a019e02e868',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3364',
internalId:  '',
customField: '20100531-230154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3448',
internalId:  '',
customField: '20100414-234003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20100531-230808'
};
webappMappings['7008']=webappMappings['7008-7652']={
webappId:    '7008',
documentId:  '3301',
internalId:  '7652',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16900',
internalId:  '',
customField: '20100424-015128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16879',
internalId:  '',
customField: '20100531-230541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17479',
internalId:  '',
customField: '20100531-230030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17626',
internalId:  '',
customField: '20100511-225749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17500',
internalId:  '',
customField: '20100531-225955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17521',
internalId:  '',
customField: '20100428-004350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17542',
internalId:  '',
customField: '20100531-230238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17563',
internalId:  '',
customField: '20100425-234721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17584',
internalId:  '',
customField: '20100818-232140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17605',
internalId:  '',
customField: '20100424-114508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23779',
internalId:  '',
customField: '20100505-191515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27179',
internalId:  '',
customField: '20100511-224948'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INZAWY';
var companyName   = '%22Expanding+Your+Pets+Horizons%22';
var htmlTitle	  = 'Quality+Pet+Doors%2C+Habitats%2C+Pet+Wheelchairs%2C+for+your+pets+sales+and+installation+.';
var metaKeywords  = 'dog+dogs+doggie+pet+cat+cats+kitty+kity+pet+door+patio+door+window+glass+habitat+haven+plexidor+electronic+energy+efficient+kitty+condo+doggie+digs+pet+peeks+dog+runs+kennel+biteguard+Wheelchair+walkin+wheels+disabled+rental+sales+wheel+chair+vancouver+abbotsford+west+vancouver+north+vancouver++british+columbia+surrey+burnaby+port+coquitlam+maple+ridge+chilliwack+langley+aldergrove+kennelplex+north+shore+delta+white+rock+mission+petsafe+pet+safe+mud+flap+cat+mate+patio+door+glass+install+installation+window+';
var metaContents  = 'Quality+Pet+Doors+and+products+for+Expanding+Your+Pets+Horizons%2C+Habitats+for+for+cat+or+dog.+Professional+Installations+Services+';
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();
};
