var xmlhttp
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
tipo ='firefox';
} catch (e) {
try {
tipo = 'explorer';
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp=false;
}
}
@else
xmlhttp=false
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false
}
}
google.load("language", "1");
google.setOnLoadCallback(init);
var texto1actual ="";
var texto1 ="";
var cont1=0;
var traducido="no";
function comprobacion(){
texto1=document.getElementById('texto1').value;
if (texto1actual==texto1)
{
if (texto1actual!='')
{
if (traducido=="no")
{
submitChange();
traducido="yes";
}
}
}
cont1++;
document.getElementById('info').innerHTML=cont1+'
textoactual: '+ texto1actual + '
texto comprobado antes:' + texto1;
document.getElementById('sp1').innerHTML='';
setTimeout("comprobacion()",3000);
}
function borrar(campo){
document.getElementById(campo).value='';
document.getElementById(campo).focus();
}
function copia_portapapeles(obj)
{
var textRange = document.body.createTextRange();
textRange.moveToElementText(obj);
textRange.execCommand("Copy");
}
function escribir(){
texto1actual=document.getElementById('texto1').value;
traducido="no";
}
function nl2br(text){
alert(text);
text=escape(text);
return unescape(text.replace(/(%5Cr%5Cn)|(%5Cn%5Cr)|%5Cr|%5Cn/g,'
'));
}
function strrpos (haystack, needle, offset) {
var i = -1;
if (offset) {
i = (haystack+'').slice(offset).lastIndexOf(needle);
if (i !== -1) {
i += offset;
}
} else {
i = (haystack+'').lastIndexOf(needle);
}
return i >= 0 ? i : false;
}
function skDeterminarIdiomaNaveg() {
var idiomaNavegador = new String;
if (navigator.language){
idiomaNavegador = navigator.language;
// En este caso, el idioma devuelto puede contener el
// subcódigo de idioma (p.ej. "es-ES").
} else {
idiomaNavegador = navigator.browserLanguage;
// En este caso, el idioma devuelto solo conteniene el
// código de idioma (p.ej. "es")
}
return idiomaNavegador;
}
function ucWords(string){
var arrayWords;
var returnString = "";
var len;
arrayWords = string.split(" ");
len = arrayWords.length;
for(i=0;i < len ;i++){
if(i != (len-1)){
returnString = returnString+ucFirst(arrayWords[i])+" ";
}
else{
returnString = returnString+ucFirst(arrayWords[i]);
}
}
return returnString;
}
function detectaridiomanavegador(){
idiomanavegador= 'es';
combo = document.getElementById('idioma1');
for (var i=0;i
Traduciendo...