function insertEmoticons(obj) {
    if(typeof(opener)=='undefined') return;

    var url = obj.src.replace(request_uri,'');
    var text = "<img editor_component=\"emoticons\" src=\""+url+"\" border=\"0\" class=\"emoticon\" alt=\"emoticon\" />";

    var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)

    opener.editorReplaceHTML(iframe_obj, text);
    opener.editorFocus(opener.editorPrevSrl);
}


var initialtab=[1, "emo1"]

var previoustab=""

function expandcontent(cid, aobject){
    if (document.getElementById){
        highlighttab(aobject)
        if (previoustab!="") document.getElementById(previoustab).style.display="none"
        document.getElementById(cid).style.display="block"
        previoustab=cid
    }
}

function highlighttab(aobject){
    if (typeof tabobjlinks=="undefined")
    collecttablinks()
    for (i=0; i<tabobjlinks.length; i++)
    tabobjlinks[i].className=""
    aobject.className="current"
}

function collecttablinks(){
    var tabobj=document.getElementById("tablist")
    tabobjlinks=tabobj.getElementsByTagName("span")
}

function do_onload(){
    collecttablinks()
    expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

xAddEventListener(window, "load", do_onload);

window.resizeTo(620, 490)