/* [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','4478',jdecode('Home'),jdecode(''),'/4478.html','true',[],'',''],
	['PAGE','4535',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/4535.html','true',[],'',''],
	['PAGE','4562',jdecode('Servicios'),jdecode(''),'/4562.html','true',[],'',''],
	['PAGE','4589',jdecode('Pr%C3%B3tesis+Dental'),jdecode(''),'/4589.html','true',[],'',''],
	['PAGE','9603',jdecode('Precios+de+Colegiaturas'),jdecode(''),'/9603.html','true',[],'',''],
	['PAGE','5803',jdecode('Especialidades'),jdecode(''),'/5803/index.html','true',[ 
		['PAGE','5830',jdecode('Cursos+Avanzados'),jdecode(''),'/5803/5830.html','true',[],'','']
	],'',''],
	['PAGE','4616',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4616/index.html','true',[ 
		['PAGE','5224',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/4616/5224.html','false',[],'','']
	],'',''],
	['PAGE','6902',jdecode('Libro+de+visitas'),jdecode(''),'/6902/index.html','true',[ 
		['PAGE','6903',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/6902/6903.html','false',[],'','']
	],'',''],
	['PAGE','47612',jdecode('inscripciones+online'),jdecode(''),'/47612.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Stripes';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1610';
theSitetree.keyvisualName='zahnaerztin.jpg';
theSitetree.fontsetId='244';
theSitetree.graphicsetId='304';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCFB';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stripes',
				paletteFamily: 	'003399',
				keyvisualId: 	'1610',
				keyvisualName: 	'zahnaerztin.jpg',
				fontsetId: 		'244',
				graphicsetId: 	'304',
				contentColor: 	'000000',
				contentBGColor: 'FCFCFB',
				a_color: 		'003399',
				b_color: 		'DEDECA',
				c_color: 		'000000',
				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:  '4478',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4535',
internalId:  '',
customField: '20100302-210939'
};
webappMappings['1002']=webappMappings['1002-6902AVEC10INXSH5']={
webappId:    '1002',
documentId:  '6902',
internalId:  '6902AVEC10INXSH5',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4478',
internalId:  '',
customField: '20100106-143542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47612',
internalId:  '',
customField: '20100809-172845'
};
webappMappings['1501']=webappMappings['1501-49710']={
webappId:    '1501',
documentId:  '4478',
internalId:  '49710',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4562',
internalId:  '',
customField: '20100512-131530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4589',
internalId:  '',
customField: '20100831-123236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9603',
internalId:  '',
customField: '20100831-123538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5803',
internalId:  '',
customField: '20100809-172753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5830',
internalId:  '',
customField: '20090324-144516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4616',
internalId:  '',
customField: '20100728-124141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5224',
internalId:  '',
customField: '20060522-124404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6902',
internalId:  '',
customField: '20100728-124102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6903',
internalId:  '',
customField: '20070412-084501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4478',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4535',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4562',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4589',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9603',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5803',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5830',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4616',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5224',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6902',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6903',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-6591']={
webappId:    '7008',
documentId:  '4616',
internalId:  '6591',
customField: 'language:es;country:ES;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXSH5';
var companyName   = '+Escuela+de+Pr%C3%B3tesis+Dental+Taxque%C3%B1a';
var htmlTitle	  = 'ESCUELA+DE+PROTESIS+DENTAL+TAXQUE%C3%91A';
var metaKeywords  = 'Pr%C3%B3tesis+Dental%2C+Escuela+Taxque%C3%B1a%2CEscuela+de+Protesis+dental%2C+EPRODENA%2C+EPRODENT%2C+CEMEDENT%2C+Joel+Guzm%C3%A1n%2C+prostodoncia%2C+ortodoncia%2C+porcelana%2C+removibles%2C+COLEGIO+DE+PROTESIS+DENTAL';
var metaContents  = 'Informaci%C3%B3n+Escuela+de+Pr%C3%B3tesis+dental+Taxque%C3%B1a%2C+ESCUELA+DENTAL%2C+COLEGIO+DE+PROTESIS+DENTAL%2C+MECANICA+DENTAL%2C+PROTESIS%2C+ORTODONCIA%2C+PORCELANA';
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();
};
