/* [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 theSitetree=[ 
	['PAGE','901',jdecode('HOME'),jdecode(''),'/901.html','true',[],''],
	['PAGE','48122',jdecode('AVAILABLE+Presa+Puppies'),jdecode(''),'/48122.html','true',[],''],
	['PAGE','106401',jdecode('AVAILABLE+Mastiff+Puppies'),jdecode(''),'/106401.html','true',[],''],
	['PAGE','48101',jdecode('OUR+PRESA+CANARIO%26%23x27%3BS'),jdecode(''),'/48101.html','true',[],''],
	['PAGE','124301',jdecode('MALES+-+VITORIAN'),jdecode(''),'/124301.html','true',[],''],
	['PAGE','124401',jdecode('FEMALES+-+ISIS'),jdecode(''),'/124401.html','true',[],''],
	['PAGE','124901',jdecode('FEMALES+-+TESS'),jdecode(''),'/124901.html','true',[],''],
	['PAGE','125101',jdecode('FEMALES+-+LACI'),jdecode(''),'/125101.html','true',[],''],
	['PAGE','69801',jdecode('OUR+ENGLISH+MASTIFF%26%23x27%3BS'),jdecode(''),'/69801.html','true',[],''],
	['PAGE','158301',jdecode('MALES+-+ZEUS'),jdecode(''),'/158301.html','true',[],''],
	['PAGE','156801',jdecode('FEMALES+-+SIERRA'),jdecode(''),'/156801.html','true',[],''],
	['PAGE','158601',jdecode('FEMALES+-+RAYNE'),jdecode(''),'/158601.html','true',[],''],
	['PAGE','121101',jdecode('PRESA+CANARIO+INFO'),jdecode(''),'/121101.html','true',[],''],
	['PAGE','84001',jdecode('PRESA+CANARIO+HISTORY'),jdecode(''),'/84001.html','true',[],''],
	['PAGE','97601',jdecode('PRESA+CANARIO+STANDARD'),jdecode(''),'/97601.html','true',[],''],
	['PAGE','98201',jdecode('ENGLISH+MASTIFF+HISTORY'),jdecode(''),'/98201.html','true',[],''],
	['PAGE','99401',jdecode('ENGLISH+MASTIFF+STANDARD'),jdecode(''),'/99401.html','true',[],''],
	['PAGE','103901',jdecode('ABOUT+US'),jdecode(''),'/103901.html','true',[],''],
	['PAGE','151101',jdecode('GUESTBOOK+%2F+COMMENTS'),jdecode(''),'/151101.html','true',[],''],
	['PAGE','129401',jdecode('PUPPY+CONTRACT'),jdecode(''),'/129401.html','true',[],''],
	['PAGE','130401',jdecode('CONTACT++US'),jdecode(''),'/130401.html','true',[],''],
	['PAGE','2748',jdecode('LINKS'),jdecode(''),'/2748.html','true',[],''],
	['PAGE','123401',jdecode('PRESA+CANARIO+BREEDERS'),jdecode(''),'/123401.html','true',[],''],
	['PAGE','132601',jdecode('ENGLISH+MASTIFF+BREEDERS'),jdecode(''),'/132601.html','true',[],''],
	['PAGE','74101',jdecode('LINK+EXCHANGE'),jdecode(''),'/74101.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Elegant';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32899';
theSitetree.graphicsetId='13971';
theSitetree.contentColor='cab397';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Elegant',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32899',
				graphicsetId: 	'13971',
				contentColor: 	'cab397',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100223-145921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48122',
internalId:  '',
customField: '20100223-145814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20100102-215633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2748',
internalId:  '',
customField: '20100110-182254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69801',
internalId:  '',
customField: '20100131-225213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74101',
internalId:  '',
customField: '20090328-112001'
};
webappMappings['4001']=webappMappings['4001-15484674']={
webappId:    '4001',
documentId:  '48122',
internalId:  '15484674',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99401',
internalId:  '',
customField: '20100103-182852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97601',
internalId:  '',
customField: '20100103-182015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98201',
internalId:  '',
customField: '20100103-182442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84001',
internalId:  '',
customField: '20100103-181211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103901',
internalId:  '',
customField: '20100105-193050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106401',
internalId:  '',
customField: '20100105-192313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121101',
internalId:  '',
customField: '20100103-180720'
};
webappMappings['7060']=webappMappings['7060-9546cf0ef942faedb12c3ec72cbb7c7b']={
webappId:    '7060',
documentId:  '901',
internalId:  '9546cf0ef942faedb12c3ec72cbb7c7b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123401',
internalId:  '',
customField: '20100106-103657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124301',
internalId:  '',
customField: '20100102-220332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124401',
internalId:  '',
customField: '20100102-220835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124901',
internalId:  '',
customField: '20100102-221733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125101',
internalId:  '',
customField: '20100102-222329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129401',
internalId:  '',
customField: '20100105-195005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130401',
internalId:  '',
customField: '20100106-102130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132601',
internalId:  '',
customField: '20100106-104325'
};
webappMappings['1002']=webappMappings['1002-151101abri10in2qpg']={
webappId:    '1002',
documentId:  '151101',
internalId:  '151101abri10in2qpg',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151101',
internalId:  '',
customField: '20100105-193918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156801',
internalId:  '',
customField: '20100131-225403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158301',
internalId:  '',
customField: '20100103-173211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158601',
internalId:  '',
customField: '20100103-175532'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10IN2QPG';
var companyName   = 'BEARCLAW+KENNELS+%2F+Presa+Canarios+%2F+English+Mastiffs+';
var htmlTitle	  = 'BearClaw+Kennels%2F+Perro+De+Presa+Canario%2F+Presa+Canario+puppies%2F+Presa+Canario+Breeder%2F+English+Mastiffs%2F+English+Mastiff+Puppies%2F+English+Mastiff+Breeder';
var metaKeywords  = 'presa+canario%2C+perro+de+presa+canario%2C+english+mastiff%2C+old+english+mastiff%2C+dogs%2C+puppies%2C+breeders%2C+kennels%2C+free+link+exchange';
var metaContents  = 'BearClaw+Kennels+is+a+Top+Breeder+of+Presa+Canarios+and+English+mastiffs%2C+Championship+Bloodlines%2C+Presa+Canarios+are+UKC%2C+UPPCC+Registered+%2C+English+Mastiffs+are+AKC+Registered%2C+puppies+availabe%2C+free+link+exchange';
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();
};
