/* [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','22',jdecode('Home'),jdecode(''),'/22.html','true',[],'',''],
	['PAGE','1088',jdecode('About+us'),jdecode(''),'/1088/index.html','true',[ 
		['PAGE','6323',jdecode('Blizzard'),jdecode(''),'/1088/6323.html','true',[],'','']
	],'',''],
	['PAGE','1471',jdecode('Available+Dogs'),jdecode(''),'/1471/index.html','true',[ 
		['PAGE','1489',jdecode('Adoption+Application'),jdecode(''),'/1471/1489.html','true',[],'','']
	],'',''],
	['PAGE','8524',jdecode('Foster+Care%21'),jdecode(''),'/8524.html','true',[],'',''],
	['PAGE','6810',jdecode('Fundraisers'),jdecode(''),'/6810/index.html','true',[ 
		['PAGE','38701',jdecode('Hope+For+Hope%21'),jdecode(''),'/6810/38701.html','true',[],'',''],
		['PAGE','8653',jdecode('Wish+List'),jdecode(''),'/6810/8653.html','true',[],'',''],
		['PAGE','6846',jdecode('Donate+Old+Cell+Phones'),jdecode(''),'/6810/6846.html','true',[],'',''],
		['PAGE','7376',jdecode('Candies+Critter+Sitters'),jdecode(''),'/6810/7376.html','true',[],'',''],
		['PAGE','7385',jdecode('Gentle+Touch+Canine+Massage'),jdecode(''),'/6810/7385.html','true',[],'',''],
		['PAGE','21401',jdecode('Photo+Contest%21'),jdecode(''),'/6810/21401.html','true',[],'','']
	],'',''],
	['PAGE','1516',jdecode('Links+We+Love%21'),jdecode(''),'/1516.html','true',[],'',''],
	['PAGE','7991',jdecode('Special+Thanks%21'),jdecode(''),'/7991.html','true',[],'',''],
	['PAGE','1590',jdecode('Guestbook'),jdecode(''),'/1590/index.html','true',[ 
		['PAGE','1589',jdecode('Read+Guestbook'),jdecode(''),'/1590/1589.html','false',[],'','']
	],'',''],
	['PAGE','7833',jdecode('In+Memory+Of...'),jdecode(''),'/7833.html','true',[],'',''],
	['PAGE','1124',jdecode('Contact+Us'),jdecode(''),'/1124.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='2F952F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16612';
theSitetree.graphicsetId='12210';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2F952F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'2F952F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16612',
				graphicsetId: 	'12210',
				contentColor: 	'FFFFFF',
				contentBGColor: '2F952F',
				a_color: 		'000000',
				b_color: 		'59AA59',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22',
internalId:  '',
customField: '20100524-185506'
};
webappMappings['1002']=webappMappings['1002-1590AHW050INXSEV']={
webappId:    '1002',
documentId:  '1590',
internalId:  '1590AHW050INXSEV',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-26537']={
webappId:    '1501',
documentId:  '22',
internalId:  '26537',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100524-205251'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '_1',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1088',
internalId:  '',
customField: '20080708-200007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6323',
internalId:  '',
customField: '20080512-174936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1471',
internalId:  '',
customField: '20100825-215258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1489',
internalId:  '',
customField: '20080407-145206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8524',
internalId:  '',
customField: '20080617-171027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6810',
internalId:  '',
customField: '20100524-204550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8653',
internalId:  '',
customField: '20091122-210414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6846',
internalId:  '',
customField: '20100524-172728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7376',
internalId:  '',
customField: '20080205-005142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7385',
internalId:  '',
customField: '20080205-005035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20100524-172903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1516',
internalId:  '',
customField: '20100524-184837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7991',
internalId:  '',
customField: '20091122-205528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1590',
internalId:  '',
customField: '20060605-150737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1589',
internalId:  '',
customField: '20060605-150737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7833',
internalId:  '',
customField: '20100524-201502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1124',
internalId:  '',
customField: '20080205-003358'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSEV';
var companyName   = 'Gentle+Giants%2C+Inc.';
var htmlTitle	  = 'www.gentlegiantsinc.org';
var metaKeywords  = 'dog+rescue++giant+breed++great+dane++great+pyrnees%2C+mastiff%2C+komondor+bernase+mountain+dog+newfoundland++saint+bernard+';
var metaContents  = 'Non+profit+giant+breed+dog+rescue';
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();
};
