I think the child portal problem is caused by the user being logged off when the pop-up window opens. This happens in other modules as well and has been noted in these forums.
The TabID is not being included in the querystring.
FreeTextBox will only allow one parameter to be passed to the openwindow function and that is the ftbname.
This is the current command for the imagegallery button.
myButton9.ScriptBlock = "function FTB_InsertGalImage(ftbName) {myWindow = window.open('controls/ftb2/ImageGal3.aspx?textboxname=' + ftbName, 'window', 'width=600,height=450');}"
I have changed it to this:
myButton9.ScriptBlock = "function FTB_InsertGalImage(tabid,ftbName) {myWindow = window.open('controls/ftb2/ImageGal3.aspx?tabid=' + tabid + '&textboxname=' + ftbName, 'window', 'width=600,height=450');}"
As I look at the source for the page. FTB generates the following:
<script type="text/javascript">function FTB_InsertGalImage(tabid,ftbName) {myWindow = window.open('controls/ftb2/ImageGal3.aspx?tabid=' + tabid + '&textboxname=' + ftbName, 'window', 'width=600,height=450');}</script>
And the source command when the button is clicked:
<td id="_ctl0__ctl6__ctl0_TextEditor1_FtbCntrl_Button_Insert Gallery Image" class="ctl0__ctl6__ctl0_TextEditor1_FtbCntrl_ButtonNormal" onclick="FTB_InsertGalImage('_ctl0__ctl6__ctl0_TextEditor1_FtbCntrl');"
Only one parameter is sent.
When the button is clicked, an error is generated : Input string was not in correct format.
I do not know if there is a solution to this or not.