/**
  * Initialisation d'un Objet TChampSelect
  */
 var TIHAS = new TImageHtmlAreaSelect();

 function TIHASPopup(doc, editor) {
        this.docsource = doc;
        this.editor = editor;
        var w = 500, h = 80,
        move = screen ?
                ',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '',
        win = window.open(contextpath+'/jscript/HTMLArea-3.0-rc1/insertImage.jsp', null, "help=no,status=no,scrollbars=yes,resizable=no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true);
        win.opener = window;
        win.focus();
}

function TIHASInit(o_win, o_doc) {
        this.win = o_win;
        this.doc = o_doc;
}

function TIHASSelect(valeur) {
    editor.insertHTML("<img src=\""+contextpath+"/servletrecupereimagedevector?nomImage="+valeur+"\"/>");
}

function TIHASSelectSignature() {
    editor.insertHTML("<img src=\""+srcsignature+"\"/>");
}

function TImageHtmlAreaSelect() {
   this.Popup   = TIHASPopup;
   this.Select  = TIHASSelect;
   this.Init    = TIHASInit;
   this.SelectSignature = TIHASSelectSignature;
}

