        var editBox;
        document.addEvent('domready', function ()
        {
                $$('span.spanTextEdit').each(function(item)
                {
                        /*if (item.parentNode) {
                                item.parentNode.addEvent('click', function (e) { if (e['alt']) return false; });
                        }*/

                        item.addEvent('click', function(event)
                        {
                                if (!event.alt) return;
                                /*for (idx in e) {
                                        alert (idx + ", " + e[idx]);
                                }*/
                                if (editBox) {
                                        return;
                                }
                                editBox = document.createElement('div');
                                editBox.setAttribute('style', 'bottom: 0; left: 0; z-index: 20000; position:fixed;width:100%;height:100px;background-color:#F3F2F5;border-top:1px solid black;');
                                var button2Box = document.createElement('input');
                                button2Box.setAttribute('type', 'button');
                                button2Box.setAttribute('value', 'Save');
                                button2Box.setAttribute('style', 'font-size: 12px; background-color: #FF9000; color: white; border: 1px double #000000; height: 20px;');
                                button2Box.addEvent('click', function ()
                                {
                                                // The keyword is gonna be saved remotely
                                                var keywordName = item.getElement('.keywordName').value;
                                                var keywordLan  = item.getElement('.keywordLan').value;
                                                var keywordText = editBox.getElement('textarea').value;
                                                var myRequest = new Request({url: '/lab/setKeyword.php',
                                                        onComplete: function(response)
                                                        {
                                                                // The current version of mootols doesn't include JSON, so it's hardcoded to skip any problem
                                                                if (response == 'true') {
                                                                        // updating the edited text
                                                                        item.getElement('.spanKeywordText').innerHTML = keywordText;
                                                                        item.setStyle('background-color', 'green');
                                                                        editBox.parentNode.removeChild(editBox);
                                                                        editBox = null;
                                                                } else {
                                                                        alert ("There has had an error while processing the request!");
                                                                }
                                                        },
                                                        onFailute: function()
                                                        {
                                                                alert ("There has had an error while processing the request!");
                                                        }
                                                });
                                                myRequest.send({method: 'post', data: 'save=true&keywordName='+keywordName+'&keywordLan='+keywordLan+'&keywordText='+keywordText});
                                });

                                var button3Box = document.createElement('input');
                                button3Box.setAttribute('type', 'button');
                                button3Box.setAttribute('value', 'Close');
                                button3Box.setAttribute('style', 'font-size: 12px; background-color: white; color: #0090FF; border: 1px double #0090FF;  width: 75px; height: 20px;');
                                button3Box.addEvent('click', function ()
                                {
                                                editBox.parentNode.removeChild(editBox);
                                                editBox = null;
                                });

                                editBox.appendChild(button2Box);
                                editBox.appendChild(button3Box);

                                var textBox = document.createElement('textarea');
                                textBox.setAttribute('style', 'width: 100%; border: 1px solid #0090FF; margin-top: 10px; height: 68px;');
                                textBox.innerHTML = item.getElement('.keywordText').value;
                                editBox.appendChild(textBox);


                                document.body.parentNode.appendChild(editBox);
                                
                                return false;
                        });
                });
        });


