Phil:
Please try this way :
var img=document.createElement("IMG");
var url=showModalDialog("CuteSoft_Client/CuteEditor/Dialogs/InsertGallery.aspx?settinghash=<%=Editor1.Setting.GetHashString()%>", img,"dialogWidth:670px;dialogHeight:650px");
if(url)
{
//..
}
Regards , Terry .