/* [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','15901',jdecode('+Sally+'),jdecode(''), jdecode('%2F15901.html'), 'true',[],'',''],
	['PAGE','1601',jdecode('Home'),jdecode(''), jdecode('%2F1601.html'), 'true',[],'',''],
	['PAGE','33711',jdecode('Tide+Rock%26%23x27%3Bs+Sea+Star+Salty+Mist+'),jdecode(''), jdecode('%2F33711.html'), 'true',[],'',''],
	['PAGE','66321',jdecode('+Best+of+Breed'),jdecode(''), jdecode('%2F66321.html'), 'true',[],'',''],
	['PAGE','67121',jdecode('Winners+Opposite'),jdecode(''), jdecode('%2F67121.html'), 'true',[],'',''],
	['PAGE','39011',jdecode('+Brags'),jdecode(''), jdecode('%2F39011.html'), 'true',[],'',''],
	['PAGE','65721',jdecode('MORE+BRAGS'),jdecode(''), jdecode('%2F65721.html'), 'true',[],'',''],
	['PAGE','6201',jdecode('Puppies+For+sale'),jdecode(''), jdecode('%2F6201.html'), 'true',[],'',''],
	['PAGE','23801',jdecode('Bo'),jdecode(''), jdecode('%2F23801.html'), 'true',[],'',''],
	['PAGE','7001',jdecode('Girls'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['PAGE','15301',jdecode('Sally+at+the+Pond'),jdecode(''), jdecode('%2F15301.html'), 'true',[],'',''],
	['PAGE','16501',jdecode('Another+Sally++Photo'),jdecode(''), jdecode('%2F16501.html'), 'true',[],'',''],
	['PAGE','26311',jdecode('Splash'),jdecode(''), jdecode('%2F26311.html'), 'true',[],'',''],
	['PAGE','42511',jdecode('+Sally+loves+her+ducks+'),jdecode(''), jdecode('%2F42511.html'), 'true',[],'',''],
	['PAGE','32911',jdecode('Puppies+Expected+%21'),jdecode(''), jdecode('%2F32911.html'), 'true',[],'',''],
	['PAGE','35032',jdecode('Cooper+and+Abby'),jdecode(''), jdecode('%2F35032.html'), 'true',[],'',''],
	['PAGE','35011',jdecode('Roxy+Goes+to+Arizona+'),jdecode(''), jdecode('%2F35011.html'), 'true',[],'',''],
	['PAGE','35211',jdecode('Maggie%26%23x27%3Bs+Proud+Parents'),jdecode(''), jdecode('%2F35211.html'), 'true',[],'',''],
	['PAGE','37111',jdecode('Sally%26%23x27%3Bs+puppies'),jdecode(''), jdecode('%2F37111.html'), 'true',[],'',''],
	['PAGE','57410',jdecode('Misty+and+Maggie'),jdecode(''), jdecode('%2F57410.html'), 'true',[],'',''],
	['PAGE','48166',jdecode('+Roxy+-+a+Sally%2F+Bo+puppy'),jdecode(''), jdecode('%2F48166.html'), 'true',[],'',''],
	['PAGE','72921',jdecode('Roxy+and+Max'),jdecode(''), jdecode('%2F72921.html'), 'true',[],'',''],
	['PAGE','73821',jdecode('+COOPER'),jdecode(''), jdecode('%2F73821.html'), 'true',[],'',''],
	['PAGE','59910',jdecode('Sally+goes+to+work'),jdecode(''), jdecode('%2F59910.html'), 'true',[],'',''],
	['PAGE','8122',jdecode('Puppy+Questionnaire'),jdecode(''), jdecode('%2F8122.html'), 'true',[],'',''],
	['PAGE','8143',jdecode('Contact+Us'),jdecode(''), jdecode('%2F8143.html'), 'true',[],'',''],
	['PAGE','10901',jdecode('Links'),jdecode(''), jdecode('%2F10901.html'), 'true',[],'','']];
var siteelementCount=27;
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 prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
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: '20111001-153016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20111204-092027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20111103-193217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20091206-210942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65721',
internalId:  '',
customField: '20111016-185220'
};
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: '20110122-211000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20111103-193011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20111103-193406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20110121-132353'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26311',
internalId:  '',
customField: '20110122-212500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67121',
internalId:  '',
customField: '20111001-205736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66321',
internalId:  '',
customField: '20111001-145919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59910',
internalId:  '',
customField: '20111001-144043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32911',
internalId:  '',
customField: '20111204-091659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33711',
internalId:  '',
customField: '20111001-202445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35011',
internalId:  '',
customField: '20110123-102435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35032',
internalId:  '',
customField: '20110122-140515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35211',
internalId:  '',
customField: '20110121-215249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37111',
internalId:  '',
customField: '20111204-092214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39011',
internalId:  '',
customField: '20110929-195437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57410',
internalId:  '',
customField: '20110206-122404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42511',
internalId:  '',
customField: '20111016-184308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48166',
internalId:  '',
customField: '20110206-120426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72921',
internalId:  '',
customField: '20111204-110039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73821',
internalId:  '',
customField: '20111204-114541'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHHAR';
var companyName   = 'Tide+Rock+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();
};

