/* [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','4520',jdecode('Inicio'),jdecode(''), jdecode('%2F4520.html'), 'true',[],'',''],
	['PAGE','4577',jdecode('Productos+y+Servicios'),jdecode(''), jdecode('%2F4577.html'), 'true',[],'',''],
	['PAGE','4604',jdecode('Ofertas+actuales'),jdecode(''), jdecode('%2F4604.html'), 'true',[],'',''],
	['PAGE','4631',jdecode('Enlaces'),jdecode(''), jdecode('%2F4631.html'), 'true',[],'',''],
	['PAGE','4658',jdecode('Noticias'),jdecode(''), jdecode('%2F4658.html'), 'true',[],'',''],
	['PAGE','4685',jdecode('Pedidos+y+Contacto'),jdecode(''), jdecode('%2F4685.html'), 'true',[],'',''],
	['PAGE','9012',jdecode('Vote'),jdecode(''), jdecode('%2F9012.html'), 'true',[],'',''],
	['PAGE','10117',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F10117%2Findex.html'), 'true',[ 
		['PAGE','10112',jdecode('Leer+el+libro+de+Visitas'),jdecode(''), jdecode('%2F10117%2F10112.html'), 'true',[],'','']
	],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='012253';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='433';
theSitetree.graphicsetId='483';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'012253',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'433',
				graphicsetId: 	'483',
				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:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4520',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-128856']={
webappId:    '1501',
documentId:  '4520',
internalId:  '128856',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-307']={
webappId:    '7005',
documentId:  '9012',
internalId:  '307',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-2644']={
webappId:    '7008',
documentId:  '4685',
internalId:  '2644',
customField: 'language:es;country:ES;'
};
webappMappings['1002']=webappMappings['1002-10117avec10inxejy']={
webappId:    '1002',
documentId:  '10117',
internalId:  '10117avec10inxejy',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4520',
internalId:  '',
customField: '20110209-175029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4577',
internalId:  '',
customField: '20120127-230700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4604',
internalId:  '',
customField: '20120128-125242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4631',
internalId:  '',
customField: '20111215-114252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4658',
internalId:  '',
customField: '20110418-170352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4685',
internalId:  '',
customField: '20120128-131450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9012',
internalId:  '',
customField: '20100521-132959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10117',
internalId:  '',
customField: '20100521-131029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10112',
internalId:  '',
customField: '20080209-032006'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXEJY';
var companyName   = 'Biol%C3%B3gicos+y+Farmac%C3%A9uticos+Veterinarios';
var htmlTitle	  = 'Biol%C3%B3gicos+y+Farmac%C3%A9uticos+Veterinarios';
var metaKeywords  = 'biologicos%2C+farmac%C3%A9uticos%2C+productos+veterinarios%2C+vacunas%2C+medicamentos%2C+virbac%2C+salud+y+bienestar+animal%2C+pisa%2C+fort+dodge%2C+pfizer%2C+canigen%2C+allerderm%2C+C.E.T.+kit%2C+preventef%2C+omega%2C+zoletil%2C+alizin%2C+virbagen+omega%2C+interfer%C3%B3n%2C+romidys%2C+rilexine%2C+dexoryl%2C+allermyl%2C+Le%C3%B3n+T%C3%A9llez%2C+esterilsol%2C+ark+sciences%2C+cortavance%2C+castraci%C3%B3n+quimica%2C+soloxine%2C+anxitane%2C+fleet-green%2C+essential+care%2C+idexx%2C+snap%2C+4+dx%2C+leucemia+felina%2C+dirofilaria%2C+gusano+del+coraz%C3%B3n%2C+enfermedad+de+lyme%2C+sida+felino%2C+parvovirus%2C+giardiasis%2C+anaplasmosis%2C+borreliosis%2C+pyoben%2C+hexadene%2C+vitaminthe%2C+endogard%2C+nutriplus+gel%2C+tiacil%2C+fisio%2C+defendog%2C+preventick%2C+epiotic%2C+allerderm%2C+efa-caps%2C+equimax%2C+ypozane%2C+aquadent%2C+easotic%2C+interfer%C3%B3n+omega%2C+keratolux%2C+dermazole%2C+episoothe%2C+tiacil%2C+allergroom%2C+sedalphorte%2C+pentobarbital+s%C3%B3dico%2C+vitapet-phorte%2C+calpho-pet%2C+hidraphorte%2C+sulfatrimphorte%2C+enroxphorte%2C+crivosin%2C+vincristina%2C+docarpina%2C+carprof%C3%A9n%2C+meloxicam%2C+melocaxyl%2C+ranitidina%2C+ranulin%2C+basken%2C+nolvas%C3%A1n%2C+clorhexidina%2C+vanguard%2C+felocell%2C+leukocell%2C+bronchicine%2C+bronchishield%2C+giardia-vax%2C+revolution%2C+cerenia%2C+convenia%2C+espiranide%2C+triple+felino%2C+rimadyl%2C+restoraflex%2C+torbugesic%2C+zelazol%2C+dopram-v%2C+antirobe%2C+clavamox%2C+amx%2C+nutriplus+tabs%2C+shotapen%2C+shotadex%2C+rilexine%2C+solumedrol%2C+bactrex%2C+domoso%2C+fluvet%2C+norvet%2C+carpropets%2C+cartipets%2C+cartryjet%2C+glucosamina%2C+carprofeno%2C+coindritin+sulfato%2C+ceftiofur%2C+clindamicina%2C+ciclosporina%2C+dexdomitor%2C+antisedan%2C+xilazina%2C+ketamina%2C+anesket%2C+tiopental+s%C3%B3dico%2C+isoflurano%2C+lidoca%C3%ADna%2C+Pentovet%2C+doxiciclina%2C+dermatopic%2C+inmufilt%2C+giardicox%2C+coxipets%2C+toltrazuril%2C+complet+plus%2C+imidocarb%2C+imidopets%2C+dexajet%2C+prednipets%2C+meloxipets%2C+dexametasona%2C+prednisona%2C+ramipril%2C+espronolactona%2C+levotyroxina%2C+itraconapets%2C+itraconazol%2C+bismujet%2C+stopjet%2C+cisapet%2C+cisaprida%2C+ondansetron%2C+ondrapets%2C+omeprazol%2C+omeprapets%2C+omeprajet%2C+atrayente%2C+repelente%2C+oftipets%2C+oftijet%2C+peek%2C+peek+n-puppy%2C+peek+n-5%2C+puppy-jet%2C+lactopets%2C+canine+parvovirus+ag%2C+caninne+distemper+ag.%2C+super+pet+polvo%2C+eliminador+de+olores%2C+clorofila%2C+yucca%2C+anis%2C+yerbabuena%2C+f%C3%B3rmulas+herbales+para+erros+y+gatos%2C+Nueva%2C+motmorillonita%2C+esmectita%2C+Vet-Complex%2C+vet+complex%2C+alimento+para+perros+y+gatos%2C++';
var metaContents  = 'Distrubuci%C3%B3n+de+productos+veterinarios+para+peque%C3%B1as+especies+en+el+%C3%A1rea+metropolitana+de+la+Ciudad+de+M%C3%A9xico+y+zona+conurbada%2C+Estado+de+M%C3%A9xico+y+Morelos';
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();
};

