/* [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','3401',jdecode('Victory+Bulldogs'),jdecode(''), jdecode('%2F3401.html'), 'true',[],'',''],
	['PAGE','373120',jdecode('2012+Calendars'),jdecode(''), jdecode('%2F373120.html'), 'true',[],'',''],
	['PAGE','3452',jdecode('Victorys+Kings'),jdecode(''), jdecode('%2F3452.html'), 'true',[],'',''],
	['PAGE','3473',jdecode('Victorys+Queens'),jdecode(''), jdecode('%2F3473.html'), 'true',[],'',''],
	['PAGE','3515',jdecode('Available+Puppies'),jdecode(''), jdecode('%2F3515.html'), 'true',[],'',''],
	['PAGE','3494',jdecode('Up+Coming+Litters'),jdecode(''), jdecode('%2F3494.html'), 'true',[],'',''],
	['PAGE','133812',jdecode('French+Bulldogs'),jdecode(''), jdecode('%2F133812.html'), 'true',[],'',''],
	['PAGE','201312',jdecode('French+Kings'),jdecode(''), jdecode('%2F201312.html'), 'true',[],'',''],
	['PAGE','201333',jdecode('French+Queens'),jdecode(''), jdecode('%2F201333.html'), 'true',[],'',''],
	['PAGE','203012',jdecode('French+Breedings'),jdecode(''), jdecode('%2F203012.html'), 'true',[],'',''],
	['PAGE','251012',jdecode('Available+Frenchies'),jdecode(''), jdecode('%2F251012.html'), 'true',[],'',''],
	['PAGE','289512',jdecode('Video+Channel'),jdecode(''), jdecode('%2F289512.html'), 'true',[],'',''],
	['PAGE','3536',jdecode('Past+Puppies'),jdecode(''), jdecode('%2F3536.html'), 'true',[],'',''],
	['PAGE','3557',jdecode('Testimonials+1'),jdecode(''), jdecode('%2F3557.html'), 'true',[],'',''],
	['PAGE','97412',jdecode('Testimonials+2'),jdecode(''), jdecode('%2F97412.html'), 'true',[],'',''],
	['PAGE','393720',jdecode('Testimonials+3'),jdecode(''), jdecode('%2F393720.html'), 'true',[],'',''],
	['PAGE','3578',jdecode('Retired+Bullies'),jdecode(''), jdecode('%2F3578.html'), 'true',[],'',''],
	['PAGE','3599',jdecode('Rainbow+Bridge'),jdecode(''), jdecode('%2F3599.html'), 'true',[],'',''],
	['PAGE','5601',jdecode('About+Bulldogs'),jdecode(''), jdecode('%2F5601.html'), 'true',[],'',''],
	['PAGE','145812',jdecode('What+We+Feed'),jdecode(''), jdecode('%2F145812.html'), 'true',[],'',''],
	['PAGE','209612',jdecode('Bulldog+Health'),jdecode(''), jdecode('%2F209612.html'), 'true',[],'',''],
	['PAGE','79901',jdecode('BULLS+%26+HEAT'),jdecode(''), jdecode('%2F79901.html'), 'true',[],'',''],
	['PAGE','273812',jdecode('Summer+Tips'),jdecode(''), jdecode('%2F273812.html'), 'true',[],'',''],
	['PAGE','177512',jdecode('Bulldog+Poem'),jdecode(''), jdecode('%2F177512.html'), 'true',[],'',''],
	['PAGE','5701',jdecode('Bulldog+Harnesses'),jdecode(''), jdecode('%2F5701.html'), 'true',[],'',''],
	['PAGE','5622',jdecode('About+Us'),jdecode(''), jdecode('%2F5622.html'), 'true',[],'',''],
	['PAGE','17401',jdecode('Sales+Contract'),jdecode(''), jdecode('%2F17401.html'), 'true',[],'',''],
	['PAGE','3620',jdecode('Puppy+Application'),jdecode(''), jdecode('%2F3620.html'), 'true',[],'',''],
	['PAGE','398520',jdecode('Payment+'),jdecode(''), jdecode('%2F398520.html'), 'true',[],'',''],
	['PAGE','3662',jdecode('Contact+Us'),jdecode(''), jdecode('%2F3662.html'), 'true',[],'',''],
	['PAGE','247412',jdecode('Buyer+Beware'),jdecode(''), jdecode('%2F247412.html'), 'true',[],'',''],
	['PAGE','353820',jdecode('Links'),jdecode(''), jdecode('%2F353820.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Fantasy';
theSitetree.paletteFamily='515C92';
theSitetree.keyvisualId='9901';
theSitetree.keyvisualName='kv1.swf';
theSitetree.fontsetId='17703';
theSitetree.graphicsetId='13067';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Fantasy',
				paletteFamily: 	'515C92',
				keyvisualId: 	'9901',
				keyvisualName: 	'kv1.swf',
				fontsetId: 		'17703',
				graphicsetId: 	'13067',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97412',
internalId:  '',
customField: '20120105-133728'
};
webappMappings['7008']=webappMappings['7008-24521']={
webappId:    '7008',
documentId:  '3662',
internalId:  '24521',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20120204-101056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20110207-093943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3452',
internalId:  '',
customField: '20120124-194249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3473',
internalId:  '',
customField: '20111213-181630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3494',
internalId:  '',
customField: '20120201-100806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3620',
internalId:  '',
customField: '20100301-092015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3557',
internalId:  '',
customField: '20110809-004143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3515',
internalId:  '',
customField: '20120204-122539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3536',
internalId:  '',
customField: '20120113-090410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3578',
internalId:  '',
customField: '20110805-215625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3599',
internalId:  '',
customField: '20111225-004817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20110901-202111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20120102-122315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20101128-142655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3662',
internalId:  '',
customField: '20110621-192607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20100301-092200'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133812',
internalId:  '',
customField: '20110112-103817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145812',
internalId:  '',
customField: '20111126-144400'
};
webappMappings['1501']=webappMappings['1501-27695630']={
webappId:    '1501',
documentId:  '3401',
internalId:  '27695630',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201312',
internalId:  '',
customField: '20120105-133320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177512',
internalId:  '',
customField: '20110107-104450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201333',
internalId:  '',
customField: '20120116-162820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203012',
internalId:  '',
customField: '20120116-162848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209612',
internalId:  '',
customField: '20111125-233133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247412',
internalId:  '',
customField: '20111120-000125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251012',
internalId:  '',
customField: '20120122-165906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '273812',
internalId:  '',
customField: '20110901-203218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '289512',
internalId:  '',
customField: '20110620-223202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '353820',
internalId:  '',
customField: '20111128-203435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373120',
internalId:  '',
customField: '20120204-100905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '393720',
internalId:  '',
customField: '20120202-175517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '398520',
internalId:  '',
customField: '20120116-083903'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVE8X';
var companyName   = 'VICTORY+BULLDOGS';
var htmlTitle	  = 'Victory+Home+Champion+English+and+French+Bulldogs';
var metaKeywords  = 'Bulldogs%0D%0AChampion%0D%0ARare%0D%0ABlack%0D%0ABronze%0D%0AChocolate+french+Bulldog';
var metaContents  = 'Champion+european+bulldogs+';
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();
};

