/* [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','4598',jdecode('Bienvenidos'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','10229',jdecode('Ejecutivo+y+Filiales'),jdecode(''),'/10229.html','true',[],'',''],
	['PAGE','21333',jdecode('Eventos+Cientificos'),jdecode(''),'/21333.html','true',[],'',''],
	['PAGE','64932',jdecode('CERTIFICACION'),jdecode(''),'/64932.html','true',[],'',''],
	['PAGE','127901',jdecode('Dentistas+Certificados'),jdecode(''),'/127901.html','true',[],'',''],
	['PAGE','96501',jdecode('Enfermedades'),jdecode(''),'/96501.html','true',[],'',''],
	['PAGE','65829',jdecode('Dentista%3A++Tips+nuevos'),jdecode(''),'/65829.html','true',[],'',''],
	['PAGE','41532',jdecode('Libro+de+visitas'),jdecode(''),'/41532/index.html','true',[ 
		['PAGE','41533',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/41532/41533.html','false',[],'','']
	],'',''],
	['PAGE','69218',jdecode('Enlaces+de+inter%C3%A9s'),jdecode(''),'/69218.html','true',[],'',''],
	['PAGE','71401',jdecode('Sesiones+Delegados'),jdecode(''),'/71401.html','true',[],'',''],
	['PAGE','95901',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/95901.html','true',[],'',''],
	['PAGE','135501',jdecode('Fotos+Fecideson'),jdecode(''),'/135501.html','true',[],'',''],
	['PAGE','137501',jdecode('Informaci%C3%B2n+en+video'),jdecode(''),'/137501.html','true',[],'',''],
	['PAGE','141001',jdecode('Chistes%3A+Dentistas'),jdecode(''),'/141001.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Digital';
theSitetree.paletteFamily='010128';
theSitetree.keyvisualId='354';
theSitetree.keyvisualName='abschluss.jpg';
theSitetree.fontsetId='37';
theSitetree.graphicsetId='42';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='010128';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Digital',
				paletteFamily: 	'010128',
				keyvisualId: 	'354',
				keyvisualName: 	'abschluss.jpg',
				fontsetId: 		'37',
				graphicsetId: 	'42',
				contentColor: 	'FFFFFF',
				contentBGColor: '010128',
				a_color: 		'010128',
				b_color: 		'DEFDFB',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21333',
internalId:  '',
customField: '20100119-131921'
};
webappMappings['1002']=webappMappings['1002-41532AVEC10INXLQB']={
webappId:    '1002',
documentId:  '41532',
internalId:  '41532AVEC10INXLQB',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10229',
internalId:  '',
customField: '20091112-183649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64932',
internalId:  '',
customField: '20080802-133041'
};
webappMappings['7060']=webappMappings['7060-ca6b93b78ec4b7d03744b11e36629a67']={
webappId:    '7060',
documentId:  '135501',
internalId:  'ca6b93b78ec4b7d03744b11e36629a67',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20090330-192412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127901',
internalId:  '',
customField: '20090215-182512'
};
webappMappings['1501']=webappMappings['1501-206241']={
webappId:    '1501',
documentId:  '4598',
internalId:  '206241',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96501',
internalId:  '',
customField: '20090501-174935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65829',
internalId:  '',
customField: '20090113-191007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41532',
internalId:  '',
customField: '20070719-131832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41533',
internalId:  '',
customField: '20060505-201330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69218',
internalId:  '',
customField: '20090330-135612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71401',
internalId:  '',
customField: '20100119-132220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95901',
internalId:  '',
customField: '20090204-161234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135501',
internalId:  '',
customField: '20090214-193353'
};
webappMappings['7060']=webappMappings['7060-998d960ba3245cfca9c5794ebba4eecd']={
webappId:    '7060',
documentId:  '137501',
internalId:  '998d960ba3245cfca9c5794ebba4eecd',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137501',
internalId:  '',
customField: '20090217-182034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141001',
internalId:  '',
customField: '20090911-200242'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXLQB';
var companyName   = 'FECIDESON';
var htmlTitle	  = 'Federaci%C3%B2n+de+Cirujanos+Dentistas+de+Sonora+A.C.';
var metaKeywords  = 'Federacion+de+Cirujanos+Dentistas+de+Sonora';
var metaContents  = 'Federacion+de+Cirujanos+Dentistas+de+Sonora+A.C.++Dentistas+Certificados+por+la+Asociacion+Dental+Mexicana%2C+informacion+por+ciudades+en+el+Estado+de+Sonora.++Informacion+de+los+Colegios+Dentales+que+pertenecen+a+Fecideson.++Te+brinda+informacion+de+eventos+cientificos+en+Sonora.';
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();
};
