/* [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','11501',jdecode('HOME'),jdecode(''),'/11501.html','true',[],'',''],
	['PAGE','23201',jdecode('AVAILABLE++PUPPIES'),jdecode(''),'/23201.html','true',[],'',''],
	['PAGE','47901',jdecode('HORSES+FOR+SALE'),jdecode(''),'/47901.html','true',[],'',''],
	['PAGE','12201',jdecode('OUR+GIRLS+%26+BOYS+'),jdecode(''),'/12201.html','true',[],'',''],
	['PAGE','43501',jdecode('PHOTO+GALLERY'),jdecode(''),'/43501.html','true',[],'',''],
	['PAGE','12601',jdecode('WHY+AUSTRALIAN'),jdecode(''),'/12601.html','true',[],'',''],
	['PAGE','23601',jdecode('CODE+OF+ETHICS'),jdecode(''),'/23601.html','true',[],'',''],
	['PAGE','17501',jdecode('REQUEST+INFORMATION'),jdecode(''),'/17501.html','true',[],'',''],
	['PAGE','14401',jdecode('PUPPY+APPLICATION'),jdecode(''),'/14401.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='3E6E72';
theSitetree.keyvisualId='1737';
theSitetree.keyvisualName='blumen.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='354';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E6E72';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'3E6E72',
				keyvisualId: 	'1737',
				keyvisualName: 	'blumen.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'354',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E6E72',
				a_color: 		'3E6E72',
				b_color: 		'101C1D',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20100812-132413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20090216-145338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20100225-161432'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20090917-105042'
};
webappMappings['7008']=webappMappings['7008-3815']={
webappId:    '7008',
documentId:  '14401',
internalId:  '3815',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-4011']={
webappId:    '7008',
documentId:  '17501',
internalId:  '4011',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20090917-110255'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '11501',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '12601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '12201',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47901',
internalId:  '',
customField: '20090806-153742'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '17501',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14401',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43501',
internalId:  '',
customField: '20100812-131229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20100812-131037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20100812-131354'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '23201',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '23601',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2I3O';
var companyName   = 'English+Manor+Labradoodles';
var htmlTitle	  = 'Labradoodles%2C+Labradoodle+puppies+of+English+Manor+Farm+Puppies+for+sale+';
var metaKeywords  = 'Labradoodles%2C+Puppies%2C+Puppys%2C+Australian+Labradoodles%2C++puppies+for+sale%2C+English+Manor+Farms%2C+Labradoodles+of+NJ%2C+dogs%2Cmulti-gen+Australian+labradoodles%2CRm+Kool+Dude%2C+RM+Kizmet%2C+Non-shedding%2C+Hypo-allergenic%2CObamas+dog%2CWhite+House+puppy%2Cdogs+for+sale%2C+Rutland+Manor%2C+Tegan+Park%2C+Manor+Lake+labradoodles%2C+';
var metaContents  = '+Labradoodles%2C+Labradoodle+Puppies+for+sale+in+N.J.Multi-gen+Australian+Labradoodles%2C+from+Tegan+Park+and+Rutland+Maonr+bloodlines+Labradoodles+coming+soon+.Non+shedding++allergy+friendly+Labradoodles.+Englishmanorfarms.com++Labradoodle-nj.commeta+name%3Dverify-v1+content%3DiRT7a2IDrDLXvQMF0rDaAypd9TraO5i0QuvTP%2BY%2BHAI%3D+%2Fcentera+href%3Dhttp%3A%2F%2Fwww.submitexpress.com%2Fimg+HEAD+TITLElabradoodle%2FTITLEMETAname%3Ddescription+content%3Dlabradoodle+puppies+for+saleMETAnamekeyword+content%3D+labradoodle%2C+labradoodle+puppies%2C+labradoodles+for+sale%2C+australian+labradoodles%2FHEAD';
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();
};
