﻿function checkRows(textArea) {

    if (navigator.appName.indexOf("Microsoft Internet Explorer") == 0) {
        textArea.style.overflow = 'visible';
    }

    while (textArea.rows > 7 && textArea.scrollHeight < textArea.offsetHeight) {
        textArea.rows--;
    }

    while (textArea.scrollHeight > textArea.offsetHeight) {
        textArea.rows++;
    }

    textArea.rows++;

    return;
}