/* [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','17',jdecode('ATENDIMENTO'),jdecode(''),'/17.html','true',[],'',''],
	['PAGE','204907',jdecode('ANS'),jdecode(''),'/204907.html','true',[],'',''],
	['PAGE','204949',jdecode('GLOSS%C3%81RIO'),jdecode(''),'/204949/index.html','true',[ 
		['PAGE','22106',jdecode('SOLICITE+COTA%C3%87%C3%83O+%28p%C3%A1gina+seguir%29'),jdecode(''),'/204949/22106.html','false',[],'',''],
		['PAGE','18296',jdecode('Individual+%28p%C3%A1gina+seguir%29'),jdecode(''),'/204949/18296.html','false',[],'',''],
		['PAGE','18332',jdecode('Empresarial+%28p%C3%A1gina+seguir%29'),jdecode(''),'/204949/18332.html','false',[],'',''],
		['PAGE','1766',jdecode('Saiba+como+solicitar+cota%C3%A7%C3%A3o+%28p%C3%A1gina+seguir%29'),jdecode(''),'/204949/1766.html','false',[],'','']
	],'',''],
	['PAGE','14675',jdecode('COTA%C3%87%C3%83O+VIA+EMAIL'),jdecode(''),'/14675.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Nurseries';
theSitetree.paletteFamily='93B9F3';
theSitetree.keyvisualId='7904';
theSitetree.keyvisualName='kv_7904.jpg';
theSitetree.fontsetId='16878';
theSitetree.graphicsetId='12317';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='93B9F3';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'true',
				name: 			'Nurseries',
				paletteFamily: 	'93B9F3',
				keyvisualId: 	'7904',
				keyvisualName: 	'kv_7904.jpg',
				fontsetId: 		'16878',
				graphicsetId: 	'12317',
				contentColor: 	'000000',
				contentBGColor: '93B9F3',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '17',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-3018']={
webappId:    '7008',
documentId:  '17',
internalId:  '3018',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-3017']={
webappId:    '7008',
documentId:  '14675',
internalId:  '3017',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17',
internalId:  '',
customField: '20100517-215948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204907',
internalId:  '',
customField: '20100209-064338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204949',
internalId:  '',
customField: '20100517-210911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22106',
internalId:  '',
customField: '20060813-231951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18296',
internalId:  '',
customField: '20060722-010352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18332',
internalId:  '',
customField: '20060722-011919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1766',
internalId:  '',
customField: '20060630-120557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14675',
internalId:  '',
customField: '20081101-222819'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '17',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '204907',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '204949',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '22106',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '18296',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '18332',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1766',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['1501']=webappMappings['1501-938031']={
webappId:    '1501',
documentId:  '17',
internalId:  '938031',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14675',
internalId:  '',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2T2Y';
var companyName   = '+Previna-se%21++LIGUE+%3A+%2841%29+3079-4242++++ad+MSN';
var htmlTitle	  = 'PLANOS+DE++SAUDE+CURITIBA+%2841%29++3079-4242%2F9157-7730+AMIL+UNIMED+FLEX++CLINIPAM++DIX+SUL+AMERICA+BRADESCO.+MSN+%3A+vendasonlinedeplanosdesaude%40hotmail.com';
var metaKeywords  = '+planos+de+saude+%2C+plano+de+saude%2C+plano+de+saude+curitiba%2C+curitiba%2C+AMIL%2C+AMIL+CURITIBA+%2C+amail%2Cunimed%2Cdix%2C%2C%2Cclinipam+flex+unimed%2C+unimed+para+empresas%2C+dix+saude%2C+plano%2Cp+plano+de+saude+curitiba%2C+PRIMER+BROKER%2C+VENDA%2C+CURITIBA%2C+AMil+Dr.+Muricy%2C+1019+planos%2C++VENDAS+CURITIA%2C+sa%C3%BAde%2C++rede%2C+onix%2C+clinipam%2C+clinipan%2C+unimed%2C+amigo%2C+blue+life%2C++clinihauer%2C+batel%2C+cota%C3%A7%C3%A3o%2C+amil%2C+curitiba%2C+%2C+ALLCROSS%2C+allcros%2Cseguros%2Cans%2Cmarketing.+rede%2C++unidade%2C+odontol%C3%B3gicos%2C+guia%2C+servi%C3%A7os%2C+anuncios%2C++gratu%C3%ADtos%2C++%2C+paranalise%2C+dental%2C+empresas%2C+planos%2C+cota%C3%A7%C3%A3o%2C+on+line%2C+individuais%2C+familiares%2C++BRADESCO%2C+ginecologistas%2C+pediatras%2C+exames%2C+paranalise%2C+GUIA%2C+outros%2C+google%2C++%2C+coleta%2C+domiciliar%2C+domic%C3%ADlio%2C+exames%2Csangue%2C+gestantes%2C+rec%C3%A9m-nascido%2C+empresas%2C+m%C3%A9dias+empresas%2C%2C+guaratuba%2C+paranagua%2C+morretes%2C+antonina%2C+cosm%C3%A9ticos%2C+representantes%2C+gratis%2C+gratuitamente%2C+clinipan%2Cparanalise%2Cfrediani%2C+persianas%2C+or%C3%A7amento%2C+verticais%2C+horizontais%2Ccosm%C3%A9ticos%2Cseguros%2Cbradesco%2C+sul+america%2C+clinicas%2Cangelina%2Ccaron%2Ccruz%2Cvermelha%2Cpequeno%2Ccampo%2Clargo%2Cfazenda%2Crio%2Cgrande%2C+foz%2Cigua%C3%A7u%2Cmaring%C3%A1%2Cassistencia%2C+m%C3%A9dica%2C+area%2C+protegida%2C+odonto%2C+agendamento%2C+rede%2C+credenciada%2Cguia%2C+m%C3%A9dico%2C+escolar%2Cpessoa%2C+protegida%2C+CLT%2C+multas%2C+minist%C3%A9rio+do+trabalho%2C+ufirs%2C+qualidade%2C+vida%2C+doen%C3%A7as%2C+cronicas%2C+centro%2Cgloss%C3%A1rio%2Ccifose%2Cmochila%2Clombar%2Cescoliose%2Cescolar%2Crevista%2C+fonte%2CORTOPEDISTA%2CCL%C3%8DNICA%2C+cidade%2C+cidades%2C+almirante+tamandar%C3%A9%2C+s%C3%A3o+jose+dos+pinhais%2C+rio+branco+do+sul%2C+campo+magro%2C+colombo%2C+pinhais%2C+curitiba%2C+clinipan+%2Cvendas%2C+clinipam+%2Cvendas%2Cclinihauer%2C+vendas%2C+unimed%2C+vendas%2C+unimede%2Camil%2C+vendas%2C+amilvendas%2C+clinipamvendas%2Cclinipanvendas%2Cclinihauervendas%2Cclini+%2Chauer%2Cunimedevendas%2Cunimedvendas%2Camilvendas%2Cecografia%2Cultrasonagrafia%2Csangue%2Cexames%2Cunimede%2C+AMIL%2C+DESCONTOS%2C+EMPRESAS%2C+EMPRESARIAIS%2C+INDIVIDUAIS%2C+FAMILIARES%2C+CONVENIO%2C+depress%C3%A3o%2C+comidas%2Calimentos%2Castral%2Cmel%2Cespinafre%2CSa%C3%BAde+Bradesco%2C+em%2C+Santa%2C+Catarina%2Ce+em+todo+Brasil%2C+sa%C3%BAde%2Cbradesco+AAUG%2C+PROMO%C3%87AO%2C+PERFEITO%2CGENIAL%2C+dix%2C+clinihauer%2C+AMIL+ASSISTENCIA+MEDICA';
var metaContents  = 'PLANOS+DE+SAUDE+CURITIBA+%2C+AMIL%2C++UNIMED+FLEX++%2C+CLINIPAM+%2C+CLINIHAUER+DIX+SUL+AMERICA+BRADESCO+%2CSEGUROS+.+Consultores+ONLINE+.+Fones%3A3079-4242+%2F+9157-7730+msn%3A+vendasonlinedeplanosdesaude%40hotmail.com';
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();
};
