function stripSpaces(x) {
   // x = document.myForm.myText.value;
    while (x.substring(0,1) == ' ') x = x.substring(1);
    while (x.substring(x.length-1,x.length) == ' ') x = x.substring(0,x.length-1);
	//alert(x.length);
	trimmedPara = x;
    return x;
}
//replace funny word doc characters
function cleanText(text){
	text = text.replace(/–/g, '-');
	text = text.replace(/“/g, '"');
	text = text.replace(/”/g, '"');
	text = text.replace(/‘/g, '\'');
	text = text.replace(/’/g, '\'');
	return text;
}
function sz(t) {
	a = t.value.split('\n');
	b=1;
	for (x=0;x < a.length; x++) {
	 if (a[x].length >= t.cols) b+= Math.floor(a[x].length/t.cols);
	 }
	b+= a.length;
	if (b > t.rows) t.rows = b;
}