function aboft(){ var xmlhttp=false; try{xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){ try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(E){xmlhttp = false;}} if(!xmlhttp && typeof XMLHttpRequest!='undefined'){ xmlhttp = new XMLHttpRequest();} return xmlhttp;} // -----pops------ \\ function abrir(pagina,largura,altura,top,left) { w = screen.width; h = screen.height; meio_w = w/2; meio_h = h/2; altura2 = altura/2; largura2 = largura/2; meio1 = meio_h-altura2; meio2 = meio_w-largura2; window.open(pagina,'','height=' + altura + ', width=' + largura + ', top=' + top + ', left=' + left + ''); } // -votao-\\ function vota(object,cod,cod_instr){ var cont; cont = document.getElementById('res-rating'); ajax_vota=aboft(); ajax_vota.open("GET", '/ajax/votacao.php?votacao='+object+'&cod_cifra='+cod+'&cod_instrumento='+cod_instr+'',true); ajax_vota.setRequestHeader("Cache-Control", "no-cache"); ajax_vota.setRequestHeader("Pragma", "no-cache"); ajax_vota.setRequestHeader("Charset", "ISO-8859-1"); cont.innerHTML = '
Votando...
'; ajax_vota.onreadystatechange=function(){ if(ajax_vota.readyState==1){ }else if(ajax_vota.readyState==4){ if(ajax_vota.status==200){ cont.innerHTML = ajax_vota.responseText; setInterval("document.getElementById('thanks').style.display='none'", 5000); }else if(ajax_vota.status==404){ cont.innerHTML = "Pgina no encontrada"; }else{ cont.innerHTML = "Error:".ajax_vota.status; }}} ajax_vota.send(null); } function over(){ document.getElementById('mensagemlogar').style.display = "inline"; } function out(){ document.getElementById('mensagemlogar').style.display = "none"; } //-ajax add favoritos-\\ function add_fav(cod,usu,instr){ var cont, txt_boxFloat; cont = document.getElementById('resp'); cod_usuario = readCookie("cod_usuario_log"); if(cod_usuario!=''){ ajax_fav=aboft(); ajax_fav.open("GET", '/ajax/pag_favoritos.php?cod='+cod+'&cod_usuario_log='+cod_usuario+'&cod_instrumento='+instr+'',true); cont.style.display='block'; txt_boxFloat = '
Adicionando...
'; boxFloat(txt_boxFloat, 'resp', 'Adionando aos favoritos', '250'); ajax_fav.onreadystatechange=function(){ if(ajax_fav.readyState==1){ }else if(ajax_fav.readyState==4){ if(ajax_fav.status==200){ cont.innerHTML = ajax_fav.responseText; if(cont.innerHTML==1){ boxFloat('Adicionanda com sucesso !', 'resp', 'Adicionando aos favoritos', '250'); document.getElementById('fecha_lv').style.display="none"; document.getElementById('mostr_add').innerHTML = "
Adicionada
"; } if(cont.innerHTML==2){ boxFloat('Já existe está cifra em seus favoritos !', 'resp', 'Adicionando aos favoritos', '250'); } if(cont.innerHTML==3){ boxFloat('Você já inseriu 30 músicas em sua lista de favoritos.', 'resp', 'Adicionando aos favoritos', '250'); } setInterval("document.getElementById('resp').style.display='none'", 4000); }else if(ajax_fav.status==404){ cont.innerHTML = "Página no encontrada"; }else{ cont.innerHTML = "Error:".ajax_fav.status; } } } ajax_fav.send(null); }else{ boxFloat('Para adicionar cifras nos favoritos, necessário que esteje logado no site.', 'resp', 'Adionando aos favoritos', '250'); setInterval("document.getElementById('resp').style.display='none'", 5000); }//if(cod_usuario!=''){ } function ocultar_acordes(vez){ var acordes=document.getElementsByTagName("tt"); var tx = document.getElementById('text'); if(vez == 's'){ for(var x=0;x\"\"
Mostrar Acordes"; } }else{ for(var x=0;x\"\"
Ocultar Acordes"; } } } try{ xmlhttp = new XMLHttpRequest(); }catch(ee){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(E){ xmlhttp = false; } } } function videoRelacionado(id_v,q,pg,comeca,q2){ var cont, lista, loaderVR, mais_v; cont = document.getElementById('resultVideosRelacionados'); loaderVR = document.getElementById('preloaderVR'); mais_v = document.getElementById('mais_v'); cont.style.display='block'; //document.getElementById('play').style.display = "none"; ajax=aboft(); ajax.open("GET", '/ajax/lista_videos_relacionados.php?q='+q+'&q2='+q2+'&id_v='+id_v+'&pg='+pg+'&comeca='+comeca,true); if(comeca == '') { cont.innerHTML = '
Carregando...
'; }else{ loaderVR.innerHTML = '
Carregando...
'; } sizeYT('1','z'); cont.style.top = '524px'; mais_v.style.display = 'none'; ajax.onreadystatechange=function(){ if(ajax.readyState==1){ }else if(ajax.readyState==4){ if(ajax.status==200){ lista = ajax.responseText; cont.innerHTML = Utf8.decode(lista); //cont.innerHTML = Utf8.encode(ajax.responseText); }else if(ajax.status==404){ cont.innerHTML = "Pgina no encontrada"; }else{ cont.innerHTML = "Error:".ajax.status; }}} ajax.send(null); } function search_VR(){ videoRelacionado(''+encodeURI(document.getElementById('id_v').value)+'',''+encodeURI(document.getElementById('q_v').value)+'','','1',''+encodeURI(document.getElementById('q2_v').value)+''); } function ocultaVRelac(obj,q,linha,id_video,q2){ sizeYT(1,'z');//Volta com dimensões normais document.getElementById('play').style.display = "block"; //document.getElementById(obj).style.display = "none"; document.getElementById('mais_v').style.display='none'; document.getElementById('icoPlayerTv').innerHTML = 'TV Pegacifras'; focuLista(linha); document.getElementById('l_'+linha).className='hov_li'; } function openVRelac(obj,q,linha,q2){ document.getElementById('play').style.display = "none"; document.getElementById(obj).style.display = "block"; document.getElementById('mais_v').innerHTML = 'Mais vídeos'; } function focuLista(linha){ //Limpa focu da lista var lista = document.getElementById('lista_mais_videos').getElementsByTagName('a'); for(var x=0;x'; }else{ obj.width= '284'; obj.height= '235'; nav.width='281px'; mais_v.width='279px'; pp.left='686px'; pp.width='289px'; objVR.style.top = '524px'; pv.innerHTML = ''; } } function miniMaxYT(obj, acao){ //var obj=document.getElementById('div_obj').style; var mini_max=document.getElementById('mini_max'); var nav=document.getElementById('zoom_video').style; var objVR = document.getElementById('resultVideosRelacionados'); var mais_vp=document.getElementById('mais_v').style; if(objVR.innerHTML != '' && acao == 1){ objVR.style.display = 'none'; }else{ objVR.style.display = 'block'; } sizeLope(obj, '1') if (acao == 1){ //obj.visibility='hidden'; obj.height= '25'; mini_max.innerHTML = ''; nav.display='none'; nav.display='none'; mais_vp.display='none'; }else{ //obj.visibility='visible'; mini_max.innerHTML = ''; obj.height= '235'; nav.display='inline'; nav.display='block'; mais_vp.display='block'; } } function fechaVR(id_video,q2) { //sizeYT('1','');//Posiciona vídeo no padrão var elemento=document.getElementById('resultVideosRelacionados'); //var mais_v = document.getElementById('mais_v'); elemento.style.display='none'; // mais_v.style.display='block'; document.getElementById('icoPlayerTv').innerHTML = 'Ligar TV Pegacifras'; } function fechaYT(id_video,q,q2) { sizeYT('1');//Posiciona vídeo no padrão var elemento=document.getElementById('play'); elemento.innerHTML=''; document.getElementById('icoPlayerTv').innerHTML = elemento.style.display='none'; document.getElementById('icoPlayerTv').innerHTML = 'Ligar TV Pegacifras'; } function idd(id_video){ id_video = id_video.substring(id_video.indexOf("/videos/")+8, id_video.length); return id_video; } function play_yt(id_video,q,acao,q2) { var icoTv = document.getElementById('icoPlayerTv'); var objVR = document.getElementById('resultVideosRelacionados'); var divPlay = document.getElementById('play'); icoTv.style.display='block'; objVR.style.display='block'; icoTv.innerHTML = 'TV Pegacifras'; divPlay.style.display='inline'; divPlay.innerHTML = ''; //sizeYT('1','z');//Volta com dimensões normais } function limp(obj){ document.getElementById(obj).style.display = "none"; } function opacity(id, opacStart, opacEnd) { var speed = Math.round(1500 / 150); var timer = 0; if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } }else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } } function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name){ var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0){ offset = document.cookie.indexOf(search); if (offset != -1){ offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)) } } return cookieValue; } function recCor(){ var tag = document.getElementsByTagName("tt"); for(i=0;i

X

'+titulo+'

'+txt+''; } function afinador(){ scrollTo(0,194); var txt_boxFloat = ''; boxFloat(txt_boxFloat, 'afinador', 'Afine agora mesmo seu Violão ou Guitarra', '520'); } function openTabCores(){ var txt_boxFloat = 'Cor dos acordes:Cor do texto:'; boxFloat(txt_boxFloat, 'resultTableCores', 'Preferências da Cifra', '210'); } function openDivulgaTwitter(url, titulo, width){ scrollTo(0,370); var txt_boxFloat = '

Se já está logado no twitter. Clique aqui.'; boxFloat(txt_boxFloat, 'resultTwitter', titulo, width); } function search_video(tipo){ var h_s = document.getElementById('h_search'); var bt_s = document.getElementById('bt-video'); var querybusca = document.getElementById('q').value; document.getElementById('resultadoSug').style.display='none'; if(tipo=='v'){ bt_s.innerHTML = "Buscar Cifras e Tabs"; h_s.innerHTML = "
"; }else{ bt_s.innerHTML = "Buscar Vídeos Clipes"; h_s.innerHTML = "
"; } } function cima(d) { if(d.className=="baixo") d.className = "cima"; else d.className = "baixo"; } function acao_box(id,alt,type) { if(type!=3) { olpop = document.getElementById("pop" + id); } oc = document.getElementById("boxfloat" + id); if(alt==1) { // transparente if(type!=3) { olpop.style.display="none"; } else { oc.style.display="block"; } } else { // ao if(type!=3) { olpop.style.display="block"; } else { oc.style.display="none"; } } } function openAlbum(cod_album,art){ var cont; cont = document.getElementById('resultDetalhesAlbum'); ajax=aboft(); ajax.open("GET", '/ajax/detalhes_album.php?cod_album='+cod_album+'&art='+art,true); ajax.onreadystatechange=function(){ if(ajax.readyState==1){ cont.innerHTML = '
Carregando...
'; }else if(ajax.readyState==4){ if(ajax.status==200){ cont.innerHTML = ajax.responseText; }else if(ajax.status==404){ cont.innerHTML = "Pgina no encontrada"; }else{ cont.innerHTML = "Error:".ajax.status; }}} ajax.send(null); } /**********************LOGIN*********************/ function openLogin(){ var login, cod_usuario; d = document; cod_usuario = readCookie("cod_usuario_log"); login_membro = readCookie("login"); if( cod_usuario != "" ){ d.write(''); }else{ d.write(''); } } function setLogin(field){ var metho; ajax=aboft(); var cod_usuario = readCookie("cod_usuario_log"); var IE = document.all?true:false; if(!IE){ metho = 'GET'; }else{ metho = 'POST'; } ajax.open(metho, '/ajax/login.php?'+field+'&cod_usuario='+cod_usuario,true); var obj = document.getElementById('boxLogin'); var pre = document.getElementById('objBotao'); ajax.onreadystatechange=function(){ if(ajax.readyState==1){ pre.innerHTML= ''; }else if(ajax.readyState==4){ if(ajax.status==200){ obj.innerHTML = ajax.responseText; var url = window.location.href; t = obj.innerHTML; if(t==1){ window.location.href='http://www.pegacifras.com.br/login.php?action='+url+'&erro=sim'; obj.innerHTML = '
'; } } else if(ajax.status==404){ obj.innerHTML = "Pgina no encontrada"; } else { obj.innerHTML = "Error:".ajax.status; } } } ajax.send(null); } function setFieldLogin() { field = "&acao="+encodeURI(document.getElementById('enviar_usu').value)+"&email="+encodeURI(document.getElementById('email_usu').value)+"&senha="+encodeURI(document.getElementById('senha_usu').value); } function contaClick(cod_titulo,cod_artista,cod_categoria,codigo,tipo){ ajax=aboft(); ajax.open("GET", '/ajax/contaClick.php?cod_titulo_cifra='+cod_titulo+'&cod_artista='+cod_artista+'&cod_categoria='+cod_categoria+'&codigo='+codigo+'&tipo='+tipo,true); ajax.send(null); } function addCookie(tipo,query){ ajax=aboft(); ajax.open("GET", '/ajax/addCookie.php?tipo='+tipo+'&query='+query,true); ajax.send(null); } String.prototype.replaceAll = function(de,para){var str=this;var pos=str.indexOf(de);while (pos>-1){str=str.replace(de,para);pos=str.indexOf(de);}return (str);} function getCookie(tipo){ var lista = readCookie(tipo); lista = lista.replaceAll("+", " "); lista = lista.replaceAll("[1]", "
  • "); lista = lista.replaceAll("[3]", "
  • "); lista = lista.replaceAll("[v]", "\"\""); lista = lista.replaceAll("[g]", "\"\""); lista = lista.replaceAll("[c]", "\"\""); lista = lista.replaceAll("[ga]", "\"\""); lista = lista.replaceAll("[b]", "\"\""); lista = lista.replaceAll("[t]", "\"\""); lista = lista.replaceAll("[l]", "\"\""); lista = lista.replaceAll("[tc]", "\"\""); lista = lista.replaceAll("[cv]", "\"\""); lista = lista.replaceAll("[gp]", "\"\""); var sep_lista = lista.split('|'); var tam_lista = sep_lista.length; monta_lista = ""; if(sep_lista != ""){ monta_lista += '

    Últimas músicas que você acessou nas últimas 24 horas.

      '; } for( i = 0; i <= tam_lista; i++ ){ if(i<30){ monta_lista += sep_lista[i]; } } if(sep_lista != ""){ monta_lista += '
    '; } monta_lista = monta_lista.replace("undefined", ""); document.getElementById('boxListaCookie').innerHTML= monta_lista; } ////// Suggest \\\\\\ var idLine = 0; function ajaxSugestao(q , acao, e) { var tecla = (window.event)?event.keyCode:e.which; var conteudo, preloader, aux; conteudo = document.getElementById('resultadoSug'); preloader = document.getElementById('preloaderSug') var query = document.getElementById("q"); query.setAttribute("autocomplete", "off"); if(tecla == 27) { conteudo.innerHTML=''; conteudo.style.display='none'; } if (tecla ==40 || tecla ==38 || tecla ==13) { checarLista(tecla); } if ( tecla != 27 && tecla != 13 && tecla < 38 || tecla > 40 ) { if ( acao == 'art' && q.length > 0) { ajax=aboft(); ajax.open('GET', '/ajax/sugestao-artistas.php?q='+q, true); //ajax.setRequestHeader("Cache-Control", "no-cache"); //ajax.setRequestHeader("Pragma", "no-cache"); //ajax.setRequestHeader("Charset", "ISO-8859-1"); ajax.onreadystatechange = function() { if(ajax.readyState==1) { idLine = 0; preloader.style.display='block'; preloader.innerHTML = ''; } else if (ajax.readyState==4) { if (ajax.status==200) { conteudo.innerHTML = ajax.responseText; var arrayArtista = (ajax.responseText); var listaArtistas = arrayArtista.split('|'); preloader.style.display='none'; //Limpa if ( conteudo.innerHTML == 1 ) { conteudo.style.display='none'; } else { conteudo.style.display='block'; } sep_lista = ""; sep_lista += '

    Sugestes

      '; ac_Lista = listaArtistas; for ( i=0; i < listaArtistas.length; i++) { //texto = listaArtistas[i].split(":"); texto = listaArtistas[i].split("|"); sep_lista += '
    • '+negril(texto[0],q)+'
    • '; aux++; } sep_lista += '

    [Fechar]

    '; conteudo.innerHTML = sep_lista; } else if (ajax.status==404) { conteudo.innerHTML = "Pgina no encontrada"; } else { conteudo.innerHTML = "Error:".ajax.status; } } } ajax.send(null); } else {//fecha if acao conteudo.style.display='none'; } } } function habilitaSugestao(acao){ var conteudo = document.getElementById('resultadoSug'); if(acao != 'art'){ conteudo.style.display = 'none'; } } function strip_tags(v) { if ( v ) { var re=/<\S[^>]*>/g; v = v.replace(re,""); return v; } } function negril(texto, tprocura) { v=strip_tags(tprocura); v=tprocura.split(' '); for(n in v) { pos=texto.toLowerCase().indexOf(v[n].toLowerCase()); if (pos != -1 && v[n].length > 0) { t=texto.substring(0,pos); t+=''+texto.substring(pos,pos+v[n].length)+''; texto=t+texto.substring(pos+v[n].length); } } return texto; } function doc (id) { return document.getElementById ( id ); } //Altera o valor da pesquisa function setarEscolha ( text ) { doc('q').value = strip_tags(text); } //Controlador de ndice function checarLista(kCode) { total_li = doc('resultadoSug').getElementsByTagName('li').length; texto = ''; liSelect = ''; switch ( kCode) { case 38 : { idLine--; if ( idLine >= 1 ) { if (idLine < total_li) doc("valueLineSug"+( idLine + 1) ).className=''; doc("valueLineSug"+idLine).className='hovSugest'; texto = doc("valueLineSug" + idLine).innerHTML; setarEscolha(texto); } else { idLine = total_li; doc("valueLineSug" + 1 ).className=''; doc("valueLineSug" + idLine).className='hovSugest'; texto = doc("valueLineSug" + idLine).innerHTML; setarEscolha(texto); } break; } case 40 : { idLine++; if (idLine <= total_li) { if (idLine >1 ) doc("valueLineSug"+( idLine - 1) ).className=''; doc("valueLineSug" + idLine).className='hovSugest'; texto = doc("valueLineSug" + idLine).innerHTML; setarEscolha(texto); } else { idLine = 1; document.getElementById("valueLineSug"+total_li).className = ''; document.getElementById("valueLineSug"+idLine).className='hovSugest'; texto = doc("valueLineSug" + idLine).innerHTML; setarEscolha(texto); } break; } case 13 : { if(idLine != '') { var line = document.getElementById("valueLineSug"+idLine); var valor = line.getAttribute('href'); document.location.href = valor; doc('resultadoSug').style.display = 'none'; } break; } } } var browserName = navigator.appName; if ( browserName == "Netscape" ) { HTMLElement.prototype.__defineGetter__("outerHTML", function() { var span = document.createElement("span"); span.appendChild(this.cloneNode(true)); return span.innerHTML; }); HTMLElement.prototype.__defineSetter__("outerHTML", function(html) { var range = document.createRange(); this.innerHTML = html; range.selectNodeContents(this); var frag = range.extractContents(); this.parentNode.insertBefore(frag, this); this.parentNode.removeChild(this); }); } function divideColunas(){ var linhas=''; var cifra = document.getElementById("text").innerHTML; var divisor=/\n/; var tr = cifra.split(divisor); var tot=tr.length; var div=parseInt(tot/2); for (var e = 0; e "); if(lox == '-1'){ linhas+=tr[e]+'
    '; 
      }
      else{
         linhas+='
    '+tr[e]+'\n';
      }
    
    }
    else{
    linhas+=tr[e]+'\n';}
    }
    var ln='
    '+linhas+'
    '; document.getElementById("text").outerHTML = ln; document.getElementById("ico_coluna").innerHTML='Voltar ao padrão
    Voltar ao padrão
    '; acordes.buscarAcordes(); var t = document.getElementById('t').offsetWidth; if(t > 940){ voltarPadraoColuna('ret'); alert('Não foi possível dividir a cifra !'); } } function voltarPadraoColuna(acao){ linha=document.getElementById('text').innerHTML; linha2=document.getElementById('text2').innerHTML; ln='
    '+linha+'\n'+linha2+'
    '; document.getElementById('tmpac').innerHTML = ln; acordes.buscarAcordes(); if(acao=='new'){ document.getElementById("ico_coluna").innerHTML="Dividir em colunas
    Dividir em colunas
    "; }else{ document.getElementById("ico_coluna").innerHTML="
    Dividir em colunas
    "; } } document.onkeydown = myKeyDownHandler; var speed = 0; function scrollwindow() { if (document.all) currentpos=document.documentElement.scrollTop+speed else currentpos=window.pageYOffset+speed window.scroll(0,currentpos) document.getElementById("divAutoRolagem").style.top = (currentpos + 0) + 'px' } var intervalScroll; function autoRolagem(scrollAdd){ if (scrollAdd == 'mais' && speed < 5) speed += 1 if (scrollAdd == 'menos' && speed >= 1) speed -= 1 document.getElementById("bgar").height = 90 * (speed / 5 * 100) / 100 - 1 clearInterval(intervalScroll) intervalScroll = setInterval("scrollwindow()",400) } function fechaAutoRolagem() {document.getElementById("divAutoRolagem").style.display = 'none'; clearInterval(intervalScroll);} function myKeyDownHandler(e){ var tecla = (window.event)?event.keyCode:e.which; if(tecla==109) autoRolagem('menos') if(tecla==107) autoRolagem('mais') if(tecla==27) fechaAutoRolagem() } function openAutoRolagem(){ scrollTo(0,550); document.getElementById("divAutoRolagem").style.display = 'block'; document.getElementById('divAutoRolagem').innerHTML='
    Diminuir velocidade
    Aumentar velocidade
    [Fechar]
    '; autoRolagem('mais'); } String.prototype.formatarAcento = function(){var A=this.toLowerCase();A=A.replace(/[áàâãäÁÀÂÃÄ]/g,"a").replace(/[éèêëÉÈÊË]/g,"e").replace(/[íìîïÍÌÎÏ]/g,"i").replace(/[óòôõöÓÒÔÕÖ]/g,"o").replace(/[úùûüÚÙÛÜ]/g,"u").replace(/[çÇ]/g,"c").replace(/[ñÑ]/g,"n").replace(/ /g,"-").replace(/['"`´.]/g,"");return A}; var Utf8 = { // public method for url encoding encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // public method for url decoding decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } }