count=0;

function checkNew(id,inputid,html) {
    if (id.selectedIndex==1) {
        //"<b>Name:</b> <input type=\"text\" name=\"new1\" value=\"\">"
        document.getElementById(inputid).innerHTML=html;
    } else {
        document.getElementById(inputid).innerHTML="";
    }
}

function moreEmoticons(id) {
    count+=1;
    retcode="";
    idname="newemote"+count;
    code=document.getElementById(id).innerHTML;
    code=code.replace(/00ID00/g, count+1)
    code=code.replace(/11ID11/g, count)

    //for (var x = 1; x <= count; x++) {
    //    code2=code;
    //    code2.replace(/00ID00/, count)
    //    retcode+=code2;
    //    code2="";
    //}
    
    document.getElementById(idname).innerHTML=code;
}

function removeEmoticon(id) {
    idname="newemote"+id;

    //remove ones after happens auto
    document.getElementById(idname).innerHTML="";
    count=id-1;

}
