function GetTitle(strText, intSetLength, intSmallPic, intPicLength){
	var tempText = '';
	var textLen = 0;
	var intMaxLength = intSetLength * 2 - intSmallPic * intPicLength;
	if(strText.length*2 > intMaxLength){
		for(var i=0;i<strText.length;i++){
			if(textLen >= intMaxLength)
				return tempText+'...';
			tempText = tempText + strText.charAt(i);
			textLen++;
			if(strText.charCodeAt(i)>128)
				textLen++;
		}
		return tempText;
	}
	return strText;
}

function crlfToBr(strText){
	return strText.replace('\n','<BR>');
}