function xd(t){document.write(t)}
function xe(e){xd("<a href=\"http://"+e+"\">")}

function Carga(cad){
ar3=cad.split(",");
kk=ar3.length;
for(i=0;i<kk;i++){
if(ar3[i].indexOf(">")==-1){xd("<option value="+ar3[i].toLowerCase()+">"+ar3[i])}
else{xd("<option value="+ar3[i])}}}

function getCookie(NameOfCookie)
{if(document.cookie.length>0)
{begin=document.cookie.indexOf(NameOfCookie+"=");
if(begin!=-1)
{begin+=NameOfCookie.length+1;
end=document.cookie.indexOf(";",begin);
if(end==-1) end=document.cookie.length;
return unescape(document.cookie.substring(begin,end))}}return null}

function setCookie(NameOfCookie,value,expiredays)
{ExpireDate=new Date ();
ExpireDate.setTime(ExpireDate.getTime()+(expiredays*24*3600*1000));
document.cookie=NameOfCookie+"="+escape(value)+
((expiredays==null) ? "" : ";expires="+ExpireDate.toGMTString())+
"; domain=www.traducegratis.com";
document.cookie=NameOfCookie+"="+escape(value)+
((expiredays==null) ? "" : ";expires="+ExpireDate.toGMTString())+
"; domain=traducegratis.com";}


var formulario="";

var specialCharacters = [
['&#192;','&#224;','&#193;','&#225;','&#194;','&#226;','&#195;','&#227;','&#196;','&#228;','&#197;','&#229;'],
['&#200;','&#232;','&#201;','&#233;','&#202;','&#234;','&#203;','&#235;'],
['&#204;','&#236;','&#205;','&#237;','&#206;','&#238;','&#207;','&#239;'],
['&#210;','&#242;','&#211;','&#243;','&#212;','&#244;','&#213;','&#245;','&#214;','&#246;'],
['&#217;','&#249;','&#218;','&#250;','&#219;','&#251;','&#220;','&#252;'],
['&#223;','&#199;','&#231;','&#209;','&#241;','&#253;','&#255;','&#191;','&#161;']
];

function pasteCharacter(obj){
if(formulario=="appliedlanguage"){
var transtext=document.getElementById('transtext');
var character=obj.innerHTML;
transtext.value+=character;
transtext.focus();
}else if(formulario=="foreignword"){
var query=document.getElementById('query');
var character=obj.innerHTML;
query.value+=character;
query.focus();
}else if(formulario=="wordreference"){
var word=document.getElementById('word');
var character=obj.innerHTML;
word.value+=character;
word.focus();}}

function showSpecialCharactersPage(page){
if(formulario=="appliedlanguage"){numdiv=3}else{numdiv=0}
var paragraph=document.getElementById('leftSection').getElementsByTagName('div')[numdiv];
var code='';
if(page<1){
code+='<nobr><img style="display:block;float:left" src="arrow-left-disabledt.png" width="20" height="17" alt="" border=0 />';
}else{
code+='<nobr><a href="#left" onclick="showSpecialCharactersPage(' + (page - 1) + '); return false;">';
code+='<img style="display:block;float:left" src="arrow-leftt.png" width="20" height="17" alt="" border=0 />';
code+='</a>'}

var character = null;
for(iterator=0;iterator<12;iterator++){
if(formulario=="appliedlanguage"){lettersize="14";buttonwidth="18"}else{numdiv=lettersize="13";buttonwidth="15"}
if(typeof(specialCharacters[page][iterator])!='undefined'){
character=specialCharacters[page][iterator];
code+='<a href="#letter" onclick="pasteCharacter(this);return false;" style="border: 1px solid #ffffcc;color:#000;display:block;float:left;font: normal '+lettersize+'px tahoma;height:17px;line-height:17px;text-align:center;text-decoration:none;width:'+buttonwidth+'px"';
code+=' onmouseover="this.style.backgroundColor=\'#f0f0f0\';this.style.borderColor=\'#cccccc\';"';
code+=' onmouseout="this.style.backgroundColor=\'transparent\';this.style.borderColor=\'#ffffcc\';"';
code+='>'+character+'</a>';
}else{
code+='<span style="border: 1px solid #ffffcc;color:#000;display:block;float:left;font: normal '+lettersize+'px tahoma;height:17px;line-height:17px;text-align:center;text-decoration:none;width:'+buttonwidth+'px; "';
code+='>&nbsp;</span>';}}

if(page>=specialCharacters.length-1){
code+='<img style="display:block;float:left;" src="arrow-right-disabledt.png" width=20 height=17 alt="" border=0 /></nobr>';
}else{
code+='<a href="#right" onclick="showSpecialCharactersPage(' +(page+1)+ '); return false;">';
code+='<img style="display:block;float:left;" src="arrow-rightt.png" width=20 height=17 alt="" border=0 />';
code+='</a></nobr>';}
code+='<br /><img src=pt.gif width=1 height=5><br />';

if(formulario=="appliedlanguage"){
paragraph.innerHTML=code+'<IMG src=pt.gif width=1 height=7><br><input id=submit2 type=submit value="Traducir Texto" />';}
else{paragraph.innerHTML=code;}
}