/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','44401',jdecode('News'),jdecode(''),'/44401.html','true',[],'',''],
	['PAGE','84301',jdecode('STALLIONS'),jdecode(''),'/84301/index.html','true',[ 
		['PAGE','39501',jdecode('Impuesto'),jdecode(''),'/84301/39501.html','true',[],'',''],
		['PAGE','84101',jdecode('Noberto'),jdecode(''),'/84301/84101.html','true',[],'','']
	],'',''],
	['PAGE','30901',jdecode('WARLANDER+MARES'),jdecode(''),'/30901/index.html','true',[ 
		['PAGE','84143',jdecode('Alejandra'),jdecode(''),'/30901/84143.html','true',[],'',''],
		['PAGE','84164',jdecode('Esperanza'),jdecode(''),'/30901/84164.html','true',[],'',''],
		['PAGE','84122',jdecode('Estelita'),jdecode(''),'/30901/84122.html','true',[],'','']
	],'',''],
	['PAGE','84185',jdecode('1%2F2+Andalusian+Sport'),jdecode(''),'/84185.html','true',[],'',''],
	['PAGE','79301',jdecode('Andalusian+History'),jdecode(''),'/79301.html','true',[],'',''],
	['PAGE','79401',jdecode('Friesian+History'),jdecode(''),'/79401.html','true',[],'',''],
	['PAGE','69201',jdecode('Warlander+History'),jdecode(''),'/69201.html','true',[],'',''],
	['PAGE','30985',jdecode('Brood+Mares'),jdecode(''),'/30985.html','true',[],'',''],
	['PAGE','30922',jdecode('Vets+%26+Breeding'),jdecode(''),'/30922.html','true',[],'',''],
	['PAGE','31006',jdecode('Foals+-+2007'),jdecode(''),'/31006.html','true',[],'',''],
	['PAGE','31027',jdecode('Foals+-+2008'),jdecode(''),'/31027.html','true',[],'',''],
	['PAGE','31048',jdecode('Foals+-+2009'),jdecode(''),'/31048.html','true',[],'',''],
	['PAGE','31069',jdecode('Foals+-+2010'),jdecode(''),'/31069.html','true',[],'',''],
	['PAGE','31111',jdecode('Champions'),jdecode(''),'/31111.html','true',[],'',''],
	['PAGE','57701',jdecode('Our+Trainers'),jdecode(''),'/57701.html','true',[],'',''],
	['PAGE','79201',jdecode('We+Remember'),jdecode(''),'/79201/index.html','true',[ 
		['PAGE','79801',jdecode('Hayley'),jdecode(''),'/79201/79801.html','true',[],'',''],
		['PAGE','79901',jdecode('Black+Lady'),jdecode(''),'/79201/79901.html','true',[],'',''],
		['PAGE','80001',jdecode('Robyn'),jdecode(''),'/79201/80001.html','true',[],'',''],
		['PAGE','80101',jdecode('Wenke'),jdecode(''),'/79201/80101.html','true',[],'','']
	],'',''],
	['PAGE','31132',jdecode('Jewellery'),jdecode(''),'/31132.html','true',[],'',''],
	['PAGE','84501',jdecode('Stationary'),jdecode(''),'/84501.html','true',[],'',''],
	['PAGE','63101',jdecode('Gallery'),jdecode(''),'/63101.html','true',[],'',''],
	['PAGE','5173',jdecode('For+Sale+'),jdecode(''),'/5173.html','true',[],'',''],
	['PAGE','31174',jdecode('Sold'),jdecode(''),'/31174/index.html','true',[ 
		['PAGE','84401',jdecode('Yene%26%23x27%3Bs+Xalvadora+T'),jdecode(''),'/31174/84401.html','true',[],'','']
	],'',''],
	['PAGE','31195',jdecode('Links'),jdecode(''),'/31195.html','true',[],'',''],
	['PAGE','31522',jdecode('Contact+Us'),jdecode(''),'/31522.html','true',[],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Leaves';
theSitetree.paletteFamily='545454';
theSitetree.keyvisualId='11704';
theSitetree.keyvisualName='kv_11704.jpg';
theSitetree.fontsetId='32971';
theSitetree.graphicsetId='14002';
theSitetree.contentColor='545454';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Leaves',
				paletteFamily: 	'545454',
				keyvisualId: 	'11704',
				keyvisualName: 	'kv_11704.jpg',
				fontsetId: 		'32971',
				graphicsetId: 	'14002',
				contentColor: 	'545454',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20101130-224529'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3921483']={
webappId:    '1501',
documentId:  '5101',
internalId:  '3921483',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79801',
internalId:  '',
customField: '20101130-214111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20101102-081526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44401',
internalId:  '',
customField: '20110623-085329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31111',
internalId:  '',
customField: '20100510-194726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31195',
internalId:  '',
customField: '20110301-073044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20100802-125043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30985',
internalId:  '',
customField: '20100823-215815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30922',
internalId:  '',
customField: '20100510-141402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31006',
internalId:  '',
customField: '20100831-102901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31027',
internalId:  '',
customField: '20100831-115950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31048',
internalId:  '',
customField: '20100831-112200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31069',
internalId:  '',
customField: '20101101-114316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20100831-112859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20110222-105154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31132',
internalId:  '',
customField: '20101102-081942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69201',
internalId:  '',
customField: '20100902-093233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79201',
internalId:  '',
customField: '20101130-222445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20100831-164736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31174',
internalId:  '',
customField: '20100831-121026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31522',
internalId:  '',
customField: '20100831-121600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20101130-223638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79301',
internalId:  '',
customField: '20101130-213528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79401',
internalId:  '',
customField: '20101130-213602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20101130-214250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80001',
internalId:  '',
customField: '20101130-214314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84122',
internalId:  '',
customField: '20110216-214243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84301',
internalId:  '',
customField: '20110216-225507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84501',
internalId:  '',
customField: '20110222-113240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84101',
internalId:  '',
customField: '20110222-110346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84143',
internalId:  '',
customField: '20110222-111217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84164',
internalId:  '',
customField: '20110222-111823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84185',
internalId:  '',
customField: '20110216-214243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84401',
internalId:  '',
customField: '20110216-215202'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10INXPW6';
var companyName   = 'YENE+STUD';
var htmlTitle	  = 'YENE+STUD';
var metaKeywords  = 'Yene+Stud%2C+Warlander+Stud%2C+Warlander+';
var metaContents  = 'The+First+WARLANDER+Sport+Horses+and+Sport+Ponies+to+be+bred+in+South+Africa+EVER%21+Visit+our+site+to+see+and+read+the+story+of+the+First+Warlander+Sport+Horse+imported+from+the+USA.';
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();
};

