Quando in una textarea seleziono una parola e premo il tasto che mi mette il bold, l'italics ecc,
in explorer mi mette il bold e rimane al punto della textarea selezionata, mentre
con mozilla mi torna in alto nella textarea, cosa fastidiosa se è lunga e con la scrollbar.

Credo che il pezzo incriminato sia questo, qualcuno mi sa aiutare?

Codice PHP:
if ((clientVer >= 4) && is_ie && is_win)
    {
        
theSelection document.selection.createRange().text// Get text selection
        
if (theSelection) {
            
// Add tags around selection
            
document.selection.createRange().text bbtags[bbnumber] + theSelection bbtags[bbnumber+1];
            
txtarea.focus();
            
theSelection '';
            return;
        }
    }
    else if (
txtarea.selectionEnd && (txtarea.selectionEnd txtarea.selectionStart 0))
    {
        
mozWrap(txtareabbtags[bbnumber], bbtags[bbnumber+1]);
        return;
    }