/* [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','4606',jdecode('INICIO'),jdecode(''),'/4606/index.html','true',[ 
		['PAGE','147436',jdecode('Misi%C3%B3n-Visi%C3%B3n'),jdecode(''),'/4606/147436.html','true',[],'','']
	],'',''],
	['PAGE','9099',jdecode('L%C3%ADnea+%22Mascotas%22'),jdecode(''),'/9099/index.html','true',[ 
		['PAGE','160124',jdecode('Desparasitante'),jdecode(''),'/9099/160124.html','true',[],'',''],
		['PAGE','9126',jdecode('L%C3%ADnea+Antipulgas'),jdecode(''),'/9099/9126.html','true',[],'',''],
		['PAGE','9153',jdecode('L%C3%ADnea+Est%C3%A9tica'),jdecode(''),'/9099/9153.html','true',[],'',''],
		['PAGE','19401',jdecode('Arena+para+Gatos'),jdecode(''),'/9099/19401.html','true',[],'',''],
		['PAGE','9180',jdecode('Accesorios'),jdecode(''),'/9099/9180.html','true',[],'','']
	],'',''],
	['PAGE','19428',jdecode('L%C3%ADnea+%22Ganadera%22'),jdecode(''),'/19428/index.html','true',[ 
		['PAGE','19455',jdecode('Mosca+R.I.P.'),jdecode(''),'/19428/19455.html','true',[],'',''],
		['PAGE','19482',jdecode('Shampoo+p%2FCaballos'),jdecode(''),'/19428/19482.html','true',[],'',''],
		['PAGE','19509',jdecode('Aretes+y+Pinzas'),jdecode(''),'/19428/19509.html','true',[],'','']
	],'',''],
	['PAGE','9207',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/9207/index.html','true',[ 
		['PAGE','9234',jdecode('Tel%C3%A9fonos'),jdecode(''),'/9207/9234.html','true',[],'','']
	],'',''],
	['PAGE','20121',jdecode('Bolsa+de+trabajo'),jdecode(''),'/20121.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='435';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'435',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9099',
internalId:  '',
customField: '20071206-175659'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4606',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-171983']={
webappId:    '1501',
documentId:  '4606',
internalId:  '171983',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4606',
internalId:  '',
customField: '20090108-123749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147436',
internalId:  '',
customField: '20061017-180421'
};
webappMappings['7008']=webappMappings['7008-2627']={
webappId:    '7008',
documentId:  '20121',
internalId:  '2627',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-2628']={
webappId:    '7008',
documentId:  '9207',
internalId:  '2628',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160124',
internalId:  '',
customField: '20100210-171641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9126',
internalId:  '',
customField: '20100210-171802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9153',
internalId:  '',
customField: '20100210-172240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20100210-172408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9180',
internalId:  '',
customField: '20100210-172442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19428',
internalId:  '',
customField: '20070725-142809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19455',
internalId:  '',
customField: '20100210-172528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19482',
internalId:  '',
customField: '20100210-173032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19509',
internalId:  '',
customField: '20100210-173348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9207',
internalId:  '',
customField: '20061023-155451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9234',
internalId:  '',
customField: '20080222-094607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20121',
internalId:  '',
customField: '20080222-094343'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INX34I';
var companyName   = 'STARPET+%2F+ROSCO+%2F+STARTAG';
var htmlTitle	  = 'Starpet%2FRosco%2FStartag';
var metaKeywords  = 'STARPET++MASCOTA++IDENTIFICADORES+PARA+GANADO++STARTAG++ROSCO++COLLARES+ANTIPULGAS++TALGO+ANTIPULGAS++MOSCA+RIP++GANADO++CERDOS++CABALLOS++BOVINOS++COLLARES++MOSQUICIDA+++FEROMONA++Z-9-TRICOSENE++MUSCAMONE++MUSCALURE++MOSQUICIDA++INSERTICIDA++MUSCA+DOMESTICA++PIRETRO++PIRETRINA+%E2%80%93+PIRENONA++FLORES+DE+PIRETRO++BUTOXIDO+DE+PIPERONILO++REPELENTE++INSECTOS++PULGAS++CTENOCEFALIS+CANIS+Y+FELIS++GARRAPATA++DERMACENTOR++PIOJOS++ACAROS++TRICHODECTES++SCABIEI++DEMODEX++ARGACIDOS++HORMIGAS++METODOS+DE+IDENTIFICACI%C3%93N++ARETES++MARCADORES++BORREGOS++OVINOS++BOVINOS++VACAS++CABALLOS++EQUINOS++MONTURA++CABALLERIA++MACHERO++CUADRA++CABALLERIZA++HIPICO++LIENZO+CHARRO++PICADERO++TENSO+ACTIVOS++TEXAPON++COMPERLAN++ACONDICIONADORES++POLIQUART++DEHYTON++ESPUMA++VISCOSIDAD++P.H.++++';
var metaContents  = 'Productos+para+mascota%2C+identificadores+para+ganado%2C+Antipulgas%2C+Collares+Antipulgas%2C+Mosca+RIP%2C+Shampoo+para+Caballos%2C+STARPET++MASCOTA++IDENTIFICADORES+PARA+GANADO++STARTAG++ROSCO++COLLARES+ANTIPULGAS++TALGO+ANTIPULGAS++MOSCA+RIP++GANADO++CERDOS++CABALLOS++BOVINOS++COLLARES++MOSQUICIDA+++FEROMONA++Z-9-TRICOSENE++MUSCAMONE++MUSCALURE++MOSQUICIDA++INSERTICIDA++MUSCA+DOMESTICA++PIRETRO++PIRETRINA+%E2%80%93+PIRENONA++FLORES+DE+PIRETRO++BUTOXIDO+DE+PIPERONILO++REPELENTE++INSECTOS++PULGAS++CTENOCEFALIS+CANIS+Y+FELIS++GARRAPATA++DERMACENTOR++PIOJOS++ACAROS++TRICHODECTES++SCABIEI++DEMODEX++ARGACIDOS++HORMIGAS++METODOS+DE+IDENTIFICACI%C3%93N++ARETES++MARCADORES++BORREGOS++OVINOS++BOVINOS++VACAS++CABALLOS++EQUINOS++MONTURA++CABALLERIA++MACHERO++CUADRA++CABALLERIZA++HIPICO++LIENZO+CHARRO++PICADERO++TENSO+ACTIVOS++TEXAPON++COMPERLAN++ACONDICIONADORES++POLIQUART++DEHYTON++ESPUMA++VISCOSIDAD++P.H.++++';
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();
};
