/* [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','1601',jdecode('Home'),jdecode(''),'/1601.html','true',[],'',''],
	['PAGE','6201',jdecode('Puppies+For+sale'),jdecode(''),'/6201.html','true',[],'',''],
	['PAGE','15901',jdecode('A+Sally+Photo'),jdecode(''),'/15901.html','true',[],'',''],
	['PAGE','23801',jdecode('Bo'),jdecode(''),'/23801.html','true',[],'',''],
	['PAGE','31811',jdecode('another+Bo+photo'),jdecode(''),'/31811.html','true',[],'',''],
	['PAGE','7001',jdecode('Girls'),jdecode(''),'/7001.html','true',[],'',''],
	['PAGE','8101',jdecode('Sally+at+the+Beach'),jdecode(''),'/8101.html','true',[],'',''],
	['PAGE','15301',jdecode('Sally+at+the+Pond'),jdecode(''),'/15301.html','true',[],'',''],
	['PAGE','16501',jdecode('Another+Sally++Photo'),jdecode(''),'/16501.html','true',[],'',''],
	['PAGE','26311',jdecode('Splash'),jdecode(''),'/26311.html','true',[],'',''],
	['PAGE','27211',jdecode('What+fun+%21'),jdecode(''),'/27211.html','true',[],'',''],
	['PAGE','26911',jdecode('The+Rock'),jdecode(''),'/26911.html','true',[],'',''],
	['PAGE','8122',jdecode('Puppy+Questionnaire'),jdecode(''),'/8122.html','true',[],'',''],
	['PAGE','32911',jdecode('Puppies+have+arrived+%21'),jdecode(''),'/32911.html','true',[],'',''],
	['PAGE','33711',jdecode('Sally%26%23x27%3Bs+Puppy+Tiderock+Sea+Star+Salty+Mist+%22+Misty%22'),jdecode(''),'/33711.html','true',[],'',''],
	['PAGE','35032',jdecode('Cooper-+a+boy+named+Sue'),jdecode(''),'/35032.html','true',[],'',''],
	['PAGE','35011',jdecode('Roxy+Goes+to+Arizona+'),jdecode(''),'/35011.html','true',[],'',''],
	['PAGE','35211',jdecode('Maggie%26%23x27%3Bs+Pround+Parents'),jdecode(''),'/35211.html','true',[],'',''],
	['PAGE','37111',jdecode('Abby+goes+to+her+new+home'),jdecode(''),'/37111.html','true',[],'',''],
	['PAGE','8143',jdecode('Contact+Us'),jdecode(''),'/8143.html','true',[],'',''],
	['PAGE','10901',jdecode('Links'),jdecode(''),'/10901.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Elegant';
theSitetree.paletteFamily='223892';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32899';
theSitetree.graphicsetId='13974';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='223892';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Elegant',
				paletteFamily: 	'223892',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32899',
				graphicsetId: 	'13974',
				contentColor: 	'FFFFFF',
				contentBGColor: '223892',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20100404-090635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20091105-184024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20091104-101334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20091206-210942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20091106-122744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20091031-201643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20091103-162416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20091104-174304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20091106-115658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20091106-123352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20091105-184317'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26311',
internalId:  '',
customField: '20091106-124031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26911',
internalId:  '',
customField: '20091106-125032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27211',
internalId:  '',
customField: '20091106-124619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31811',
internalId:  '',
customField: '20091206-212859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32911',
internalId:  '',
customField: '20100404-101031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33711',
internalId:  '',
customField: '20100404-212007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35011',
internalId:  '',
customField: '20100404-213742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35032',
internalId:  '',
customField: '20100404-213719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35211',
internalId:  '',
customField: '20100404-213826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37111',
internalId:  '',
customField: '20100404-213303'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHHAR';
var companyName   = 'Tiderock+Labradors+';
var htmlTitle	  = 'Tiderock+Labradors.net';
var metaKeywords  = '';
var metaContents  = '';
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();
};
