
function countLines(strtocount, cols) {
    var hard_lines = 1;
    var last = 0;
    while ( true ) {
        last = strtocount.indexOf("\n", last+1);
        hard_lines ++;
        if ( last == -1 ) break;
    }
    var soft_lines = Math.round(strtocount.length / (cols-1));
    var hard = eval("hard_lines  " + unescape("%3e") + "soft_lines;");
    if ( hard ) soft_lines = hard_lines;
    return soft_lines;
}

function resizeTextArea(textArea){
	nCols = textArea.cols;
	sVal = textArea.value;
	var rows = countLines(sVal, nCols);
	if (rows > 30) {
		rows = 30;
	}
	textArea.rows = rows;
}

 
function previewImage(src) {
}

function previewClear() {
}
