/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','4112',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''), jdecode('%2F4112.html'), 'true',[],'',''],
	['PAGE','4133',jdecode('Nuestras+instalaciones'),jdecode(''), jdecode('%2F4133.html'), 'true',[],'',''],
	['PAGE','8812',jdecode('Machos'),jdecode(''), jdecode('%2F8812%2Findex.html'), 'true',[ 
		['PAGE','8833',jdecode('Samy'),jdecode(''), jdecode('%2F8812%2F8833.html'), 'true',[],'',''],
		['PAGE','8854',jdecode('Tango'),jdecode(''), jdecode('%2F8812%2F8854.html'), 'true',[],'',''],
		['PAGE','8896',jdecode('Santino'),jdecode(''), jdecode('%2F8812%2F8896.html'), 'true',[],'',''],
		['PAGE','21438',jdecode('Donner'),jdecode(''), jdecode('%2F8812%2F21438.html'), 'true',[],'','']
	],'',''],
	['PAGE','8917',jdecode('Hembras'),jdecode(''), jdecode('%2F8917%2Findex.html'), 'true',[ 
		['PAGE','8959',jdecode('Tomasa'),jdecode(''), jdecode('%2F8917%2F8959.html'), 'true',[],'',''],
		['PAGE','8980',jdecode('Pampa'),jdecode(''), jdecode('%2F8917%2F8980.html'), 'true',[],'',''],
		['PAGE','9001',jdecode('Tazzy'),jdecode(''), jdecode('%2F8917%2F9001.html'), 'true',[],'',''],
		['PAGE','9022',jdecode('Samantha'),jdecode(''), jdecode('%2F8917%2F9022.html'), 'true',[],'',''],
		['PAGE','9064',jdecode('Matilda'),jdecode(''), jdecode('%2F8917%2F9064.html'), 'true',[],'',''],
		['PAGE','9085',jdecode('Majo'),jdecode(''), jdecode('%2F8917%2F9085.html'), 'true',[],'','']
	],'',''],
	['PAGE','14512',jdecode('Nuestras+Fotos'),jdecode(''), jdecode('%2F14512.html'), 'true',[],'',''],
	['PAGE','4217',jdecode('Exposiciones'),jdecode(''), jdecode('%2F4217.html'), 'true',[],'',''],
	['PAGE','9106',jdecode('Contactenos'),jdecode(''), jdecode('%2F9106.html'), 'true',[],'',''],
	['PAGE','21459',jdecode('Camada+Disponible'),jdecode(''), jdecode('%2F21459.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Roundabout';
theSitetree.paletteFamily='CC6633';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='210';
theSitetree.graphicsetId='252';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCSYSSSSLY0XJEZ'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Roundabout',
				paletteFamily: 	'CC6633',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'210',
				graphicsetId: 	'252',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'CC6633',
				b_color: 		'993333',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-d5afb0d215ecac6fdbd4e11496697d91']={
webappId:    '7060',
documentId:  '14512',
internalId:  'd5afb0d215ecac6fdbd4e11496697d91',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091009-120944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4112',
internalId:  '',
customField: '20081115-151419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4133',
internalId:  '',
customField: '20091008-195232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8812',
internalId:  '',
customField: '20111123-181119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8833',
internalId:  '',
customField: '20100906-121451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8854',
internalId:  '',
customField: '20100906-121601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21438',
internalId:  '',
customField: '20100906-121351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8896',
internalId:  '',
customField: '20111123-173512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8917',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21459',
internalId:  '',
customField: '20111123-183329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8959',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8980',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9064',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9085',
internalId:  '',
customField: '20081021-151007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14512',
internalId:  '',
customField: '20081101-004027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4217',
internalId:  '',
customField: '20101220-223430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9106',
internalId:  '',
customField: '20111123-173051'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INP505';
var companyName   = 'CIELOGOLDEN+%22Los+perros+son+excelentes+mascotas...el+GOLDEN+ES+FAMILIA%22';
var htmlTitle	  = '';
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();
};

