textosp="Versión en Español"; textopt="Versão em Português"; textoen="English Version"; nombreDeLaCookie='idiomaPreferido'; function locacion (){ actual= location.href; english= actual.indexOf('/en/'); spanish= actual.indexOf('/sp/'); portugues= actual.indexOf('/pt/'); } function verificacion (){ locacion(); if (english!=-1){ lang="en"; dividir=actual.split("/en/"); }else { if(portugues!=-1){ lang="pt"; dividir=actual.split("/pt/"); }else { lang="sp"; dividir=actual.split("/sp/"); } } return lang; } function confirmacion (){ verificacion(); if((lang=="sp")){ idioma1="en"; idioma2="pt"; idioma3="sp"; } if ((lang=="pt")){ idioma1="en"; idioma2="sp"; idioma3="pt"; } if ((lang=="en")){ idioma1="pt"; idioma2="sp"; idioma3="en"; } texto1=eval("texto"+idioma1); texto2=eval("texto"+idioma2); texto3=eval("texto"+idioma3); } function id1(){ confirmacion(); document.write(""+texto1+""); } function id2(){ confirmacion(); document.write(""+texto2+""); } function ida(){ confirmacion(); document.write(""+texto3+""); } function idb(){ confirmacion(); document.write(""+texto1+""); } function idc(){ confirmacion(); document.write(""+texto2+""); } function raiz( value ){ confirmacion(); document.write( "" ); } function raizsitio( value ){ confirmacion(); document.write( "" ); } var expDays = 180; var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = exp; var path = "/"; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function setLanguage(){ language=verificacion(); SetCookie (nombreDeLaCookie, language); } setLanguage();