<html>
<head>
<title>Тестовая форма</title>
<script type="text/javascript" src="http://yandex.st/jquery/1.4.4/jquery.min.js"></script>
<style type="text/css">
span.Data-Hidden{
display:none;
}
</style>
</head>
<body>
<form action="lalala.php">
<table>
<tr>
<td width="500" colspan="2" class="FirstInp"><input type="text" name="тест" maxlength="25" style="width: 400px; height: 20px; font-family: verdana; font-size: 12px;"></td>
</tr>
<tr>
<td class="InsertData">
<img style="cursor: pointer;" src="buttonred.jpg">
<span class="Data-Hidden">Данные Левой кнопки</span>
</td>
<td class="InsertData" width="100%">
<img style="cursor: pointer;" src="buttongreen.jpg">
<span class="Data-Hidden">Данные Правой кнопки</span>
</td>
</tr>
<tr>
<td height="50" valign="bottom" align="center" colspan="2"><input type="submit" name="кнопка" value="отправить" style="width: 60px; height: 18px; font-family: verdana; font-size: 8px;"></td>
</tr>
</table>
</form>
<script type="text/javascript">
$('td.InsertData img').click(function() {
var Inp = $(this).parents('table:first').find('td.FirstInp input');
var ThisText = $(this).next('.Data-Hidden').text();
Inp.val(ThisText);
});
</script>
</body>
</html>