ink_url = prompt('Enter the full URL for the link:'+'\n[url=xxx][/url]',"http://");
                if ( (link_url != null) ) {
                        // Get selected text
                        var link_text = getSelectedText(theform);
                        if (link_text == '') {
                                // Display prompt if no text is selected
                                link_text = prompt('Enter the text to be displayed for the link (Optional):'+'\n[url=]xxx[/url]',"");
            