/**
 * $Id: translate.js,v 1.1 2003/12/23 11:15:01 ths Exp $
 * Translate - uses DOM Tooltip 0.5.3
**/

function transl(obj, event, code, value, lang)
{
    var prehtml = 'Code: ' + code + '<br />'
                + '<form action="/index.php" method="GET" name="dict_tt">'
                + '<input type="hidden" name="dict_code" value="' + code + '">';
    var posthtml = '</form>';
             
    if (value.length < 21) {
        var html = prehtml
                 + '<input type="text" size="20" name="dict_trans" value="' + value + '">'
                 + posthtml;       
    } else {
        var html = prehtml
                 + '<textarea name="dict_trans" cols="60" rows="5" wrap="virtual">' + value + '</textarea>'
                 + '<p align="right"><input type="submit" value="Translate"></p>'
                 + posthtml; 
    }
    return domTT_true(domTT_activate(obj, event, 'content', html, 'caption', 'Translate [' + lang + ']','type', 'sticky','closeLink', '&nbsp;&nbsp;<img src="/images/close.gif" height="14">'));     
}
