/* LOCALIZED STRINGS *******************************************************/
var s_Cut="Cortar";
var s_Copy="Copiar";
var s_Paste="Pegar";
var s_Print="Imprimir";
var s_Delete="Borrar";
var s_Help="Ayuda";
var s_Other="Otros";
var s_HowToBookmark="CÃ³mo agregar esta pÃ¡gina a sus Favoritos:\n\nEn la opciÃ³n \"Favoritos\" de su navegador, haga clic en \"Agregar a Favoritos\".\n\nAcceso directo para PC:\tCtrl+D\n\nAcceso directo para Mac:\tCommand+D.";
var s_HowToCopy="CÃ³mo copiar el texto en su portapapeles:\n\n- Seleccione el texto que desea copiar.\n- En la opciÃ³n \"EdiciÃ³n\" de su navegador, haga clic en \"Copiar\".\n\nAcceso directo para PC:\tCtrl+C\n\nAcceso directo para Mac:\tCommand+";
var s_HowToCut="CÃ³mo pegar (o mover) el texto a su portapapeles:\n\n- Seleccione el texto que desea copiar.\n- En la opciÃ³n \"EdiciÃ³n\" de su navegador, haga clic en \"Cortar\".\n\nAcceso directo en PC:\tCtrl+X\n\nAcceso directo en Mac:\tCommand+X";
var s_HowToPaste="CÃ³mo pegar el texto en nuestro sitio Web:\n\n- Haga clic dentro del Ã¡rea donde desea colocar el texto.\n- En la opciÃ³n \"EdiciÃ³n\" de su navegador, haga clic en \"Pegar\".\n\nAcceso directo para PC:\tCtrl+V\n\nAcceso directo para Mac:\tCommand+V";
var s_HowToPrint="CÃ³mo imprimir esta pÃ¡gina:\n\n- En la opciÃ³n \"Archivo\" de su navegador, haga clic en \"Imprimir\".\n\nAcceso directo para PC:\tCtrl+P\n\nAcceso directo para Mac:\tCommand+P";
var s_FeatureNotAvailable="Su aplicaciÃ³n no tiene esta funciÃ³n. Consulte el menÃº de \"Ayuda\" de su navegador.";
var s_YourOriginalText="Texto original";
var s_YourTranslationResults="Resultados de la traducciÃ³n de SDL";
var s_PleaseWait="Se estÃ¡ procesando su pedido. Espere, por favor.";
var s_EnterSomeText="Ingrese un texto para traducir.";
var s_EnterURL="Ingrese la direcciÃ³n de la pÃ¡gina Web que desea traducir.";
var s_ExtensionNotSupported="El sistema no es compatible con este tipo de documento. Ingrese una direcciÃ³n de pÃ¡gina Web distinta.";
var s_LimitExceededPlatinum="Para el Platinum Club, el texto para traducir no podrÃ¡ exceder los 60 mil caracteres (10 mil palabras aproximadamente).\n\nBorre parte del texto y vuelva a intentarlo.";
var s_LimitExceededHuman="El texto para traducir no podrÃ¡ exceder los 102400 bytes.\n\nBorre parte del texto y vuelva a intentarlo.";
var s_Translating="Traduciendo...";
var s_AdvancedTranslationOptions="Opciones avanzadas de traducciÃ³n";
var s_HideAdvancedTranslationOptions="Ocultar opciones avanzadas de traducciÃ³n";
var s_ShowAdvancedTranslationOptions="Mostrar opciones avanzadas de traducciÃ³n";
var s_TranslationChanged="Su traducciÃ³n ha cambiado.\n\nHaga clic en \"Aceptar\" para perder los cambios y enviar el correo electrÃ³nico o en \"Cancelar\" para cerrar este mensaje.";
var s_Loading="Cargando...";
var s_EmailThisTranslation="EnvÃ­e esta traducciÃ³n por correo a sus amigos o a usted mismo...";
var s_FinishedSearching="AcabÃ³ de buscar el documento.";
var s_HaveThisTextTranslated="<b>Reciba este texto traducido por un profesional por sÃ³lo [price]</b>";
var s_TranslationChangedOrder="Ha cambiado el texto o el idioma.\n\nVuelva a traducir el texto y haga su pedido.";
var s_PlaceOrder="Enviar pedido";
var s_ProfessionalTranslation="Traducciones profesionales";
var s_ConfirmLogout="¿Desea salir de la sesiÃ³n?";
/* LOCALIZED VARIABLES *****************************************************/
var s_TemplateResults="results_es-xl.htm";
var s_TemplateResultsPlatinum="results_es-xl_platinum.htm";
var s_TemplateResultsHuman="results_es-xl_humantranslation.htm";
/* VARIABLES FOR COOKIES, LINKS, POPUPS, FORM ACTIONS, ETC. ****************/
var sDomain="freetranslation.com";
var sRoot="http://traducciongratis.freetranslation.com/";
var sRootPlatinum="http://platinum.freetranslation.com/";
var sRootSecure="https://secure.freetranslation.com/"
var sExpress="https://www.click2translate.com/es_xl/ssl/express/default.asp";
var sETS="http://ets.freetranslation.com/"; // TEXT TRANSLATIONS
var sETS6="http://ets6.freetranslation.com/"; // CHINESE / RUSSIAN TEXT TRANSLATIONS
var sETS8="http://sets8.freetranslation.com/"; // PLATINUM TEXT TRANSLATIONS
/* BROWSER SNIFFING ********************************************************/
var sBrowser=navigator.appVersion;
var iBrowser=parseFloat(sBrowser);
var isWin=(sBrowser.lastIndexOf("Win95")!=-1||sBrowser.lastIndexOf("Win98")!=-1||sBrowser.lastIndexOf("WinNT")!=-1||sBrowser.lastIndexOf("Windows")!=-1);
var isMac=(sBrowser.indexOf("Mac")!=-1);
var isUnixLinux=(sBrowser.lastIndexOf('X11')!=-1);
var isIE=(navigator.appName.indexOf("Microsoft Internet Explorer")!=-1);
var isNS=(navigator.appName.indexOf("Netscape")!=-1);
var isOpera=(navigator.userAgent.indexOf("Opera")!=-1);
var isKonqueror=(navigator.userAgent.indexOf("Konqueror")!=-1);
var isXPSP2=(navigator.userAgent.indexOf("SV1")!=-1);
/* COMMON FUNCTIONS ********************************************************/
function focusField(oElement){if(oElement.value==oElement.defaultValue)oElement.value="";return true;}
function blurField(oElement){if(oElement.value=="")oElement.value=oElement.defaultValue;return true;}
function strTrim(){return this.replace(/^\s+/,"").replace(/\s+$/,"");}
String.prototype.trim=strTrim;
function URLEncode(str){
	str=escape(str);
	str=str.replace(/[\*]/gi,"%2A");
	str=str.replace(/[\+]/gi,"%2B");
	str=str.replace(/[-]/gi,"%2D");
	str=str.replace(/[\.]/gi,"%2E");
	str=str.replace(/[\/]/gi,"%2F");
	str=str.replace(/[@]/gi,"%40");
	str=str.replace(/[_]/gi,"%5F");
	return str;
}
function isEmpty(str){
	if(!str)return true;
	if(str.length==0)return true;
	if(str.search(/\S/)==-1)return true;
	return false;
}
function isValidURL(sURL){
	sURL=sURL.trim();
	var sExtension = sURL.split("/");
	var regEx=/\.(avi|bmp|class|css|doc|exe|gif|java|jpeg|jpg|js|m3u|mp3|mov|mpg|mpeg|pdf|png|ra|rar|rm|rtf|swf|tif|wav|wma|wmv|zip)$/i;
	return !regEx.test(sExtension[sExtension.length-1]);
}
function setCookie(sName,sValue){
	var dtmExpires=new Date(2015,9,21,12,0,0);
	document.cookie=sName+"="+escape(sValue)+"; expires="+dtmExpires.toGMTString()+"; domain="+sDomain+"; path=/";
}
function deleteCookie(sName){
	var dtmExpires=new Date(1985,9,26,1,0,0);
	document.cookie=sName+"=; expires="+dtmExpires.toGMTString()+"; domain="+sDomain+"; path=/";
}
function getCookie(sName){
	var dc=document.cookie;
	var prefix=sName+"=";
	var begin=dc.indexOf(";"+" "+prefix);
	if (begin==-1){
		begin=dc.indexOf(prefix);
		if(begin!=0){return null;}
	}else{
		begin+=2;
	}
	var end=document.cookie.indexOf(";",begin);
	if(end==-1)end=dc.length;
	return unescape(dc.substring(begin+prefix.length,end));
}
var oPopup;
function doPopup(sURL,iWidth,iHeight){
	if(oPopup&&!oPopup.closed)oPopup.close();
	oPopup=window.open(sURL,"popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+iWidth+",height="+iHeight+",top="+((screen.height-iHeight)/2-50)+",left="+((screen.width-iWidth)/2));
	oPopup.focus();
}
function selectItem(oElement,sValue){
	if(oElement&&sValue){for(var i=0;i<oElement.length;i++){if(oElement[i].value.toLowerCase()==sValue.toLowerCase()){oElement[i].selected=true;}}}
}
function doClipboard(oElement,sCmd){
	oElement.focus();
	oElement.select();
	if(document.all){
		var oRange=oElement.createTextRange();
		oRange.execCommand(sCmd);
	}else{
		switch(sCmd){
			case "Copy":
				alert(s_HowToCopy);
				break;
			case "Cut":
				alert(s_HowToCut);
				break;
			case "Paste":
				alert(s_HowToPaste);
				break;
		}
	}
}
function printPage(){
	window.focus();
	if(window.print){window.print();}
	else{alert(s_HowToPrint);}
}
function onLoaded(){
	if(document.referrer&&document.referrer!=""&&isEmpty(getCookie("referrer")))setCookie("referrer",document.referrer);
}
function makeHomePage(sURL,oLink){
	if(isIE){oLink.style.behavior='url(#default#homepage)';oLink.setHomePage(sURL);}
	else{alert(s_FeatureNotAvailable);}
}
function addToFavourites(sURL,sTitle){
	if(window.external){window.external.AddFavorite(sURL,sTitle);}
	else if(isNS&&iBrowser>=5){alert(s_HowToBookmark);}
	else{alert(s_FeatureNotAvailable);}
}
function toggleOption(oElement){
	if(oElement.checked&&getCookie(oElement.id)!="true")setCookie(oElement.id,"true");
	else deleteCookie(oElement.id);
}
function showAdvanced(oForm,sElement,bReload){
	oForm.project.disabled=true;
	document.getElementById(sElement+"-off").style.display="none";
	document.getElementById(sElement+"-on").style.display="block";
	oForm.sequence.disabled=false;
	selectItem(oForm.sequence,getCookie("sequence"));
	for(i=0;i<oForm.option.length;i++){oForm.option[i].disabled=false;if(getCookie(oForm.option[i].id)=="true"){oForm.option[i].checked=true;}}
	if(getCookie(sElement)!="true")setCookie(sElement,"true");
	if(bReload&&isNS)history.go(0);
}
function hideAdvanced(oForm,sElement,bReload){
	for(i=0;i<oForm.option.length;i++){oForm.option[i].disable=true;}
	oForm.sequence.disabled=true;
	document.getElementById(sElement+"-on").style.display="none";
	document.getElementById(sElement+"-off").style.display="block";
	oForm.project.disabled=false;
	selectItem(oForm.project,getCookie("project"));
	if(getCookie(sElement)!=null)deleteCookie(sElement);
	if(bReload&&isNS)history.go(0);
}
function toggleAdvanced(oForm,sElement){
	if(getCookie(sElement)=="true"){showAdvanced(oForm,sElement);}
	else{hideAdvanced(oForm,sElement);}
}
function trk(oL,sQS){
	var sT; // BUILD LINK TEXT
	if (document.getElementById){
		if(oL.innerText){ // FOR INTERNET EXPLORER
			sT=oL.innerText.replace(/\s+/gi," ");
		}else if(oL.textContent){ // FOR MOZILLA
			sT=oL.textContent.replace(/\s+/gi," ");
		}else if(oL.text){ // FOR NETSCAPE, BUT IT DOESN'T WORK PROPERLY
			sT=oL.text.replace(/\s+/gi," ");
		}else if(oL.innerHTML.search(/<img/i) == 0){ // FOR IMAGES
			sT=oL.firstChild.alt.replace(/\s+/gi," ")+" "+"<"+oL.firstChild.src+">";
		}
	}
	var sQ="p="+URLEncode(window.location)+"&t="+URLEncode(sT); // BUILD QUERY STRING
	if(oL.href.search(sQ)==-1){ // IF URL NOT ALREADY MODIFIED
		if(!isEmpty(sQS)){ // IF TRACKING QUERY STRING PASSED TO FUNCTION
			oL.search=(!isEmpty(oL.search))?oL.search+"&"+sQS:"?"+sQS; // CREATE OR APPEND
		}
		if(document.images){(new Image()).src=sRoot+"trk/?r="+URLEncode(oL.href)+"&"+sQ;} // TRACK CLICK
		if(oL.search&&oL.href.search(/\?/)==-1){oL.href=oL.href+oL.search;} // HACK FOR BROWSERS THAT DON'T INCLUDE THE QUERY STRING IN THE HREF (i.e. OPERA)
		if(oL.href.search(sRoot)==-1){ // ONLY IF DESTINATION PAGE IS NOT ON THE SAME DOMAIN
			oL.href=(oL.search)?oL.href+"&"+sQ:oL.href+"?"+sQ; // APPEND QUERY STRING USING AN AMPERSAND IF QUERY STRING ALREADY EXISTS
		}
	}
	return true;
}