function getCharacterWidth(txtArea, fontSize){	var characterWidth = 0;	var temp1 = 0;	var temp2 = 0;			txtArea.attr("style", "font-size:" + fontSize + "px");	txtArea.attr("cols", 1);	temp1 = txtArea.outerWidth();	txtArea.attr("cols", 2);	temp2 = txtArea.outerWidth();	characterWidth = temp2 - temp1;		return characterWidth;}function calculateWidth(){	var txtArea = jQuery("#txtInputArea");	var cols = jQuery("#txtCols").val();	var fontSize = jQuery("#txtFontSize").val();	var borderWidth = 6;	var characterWidth = 0;	var width = 0;		characterWidth = getCharacterWidth(txtArea, fontSize);		width = (characterWidth * cols) + borderWidth;	jQuery("#spnResult").text(width);}