// show image selection window and insert chosen image
function websn_image() {

  var imgAttrs = null;
  
    imgAttrs = showModalDialog("imgselect.asp", "", "dialogWidth:400px; dialogHeight:330px; status:no; help:no");
	if (imgAttrs != null) {
	  //editor.ExecCommand(5017,2,imgAttrs); // insert chosen image
	  qStatus = top.editor.queryStatus(5000);
	  if (qStatus == 1 || qStatus == 0) {
	    top.editor.ExecCommand(5004,0);
	  }
	  imgAttrs = replace(imgAttrs, "../", "");
	  selarea = top.editor.DOM.selection.createRange();
	  selarea.pasteHTML("<img src='" + imgAttrs + "' border='0'>");
	}
  }
