//Save the chat record to local
function save_record()
{
//Get the current date as the file name
var time=new Date();
var filename=time.toLocaleDateString();
//Get part of the current page content
var record=$("#contentList").html();
//Open a new window to save
var winRecord=window.open('about:blank','_blank','top=500') ;
winRecord.document.open("text/html","utf-8");
winRecord.document.write("" record "");
winRecord.document. execCommand("SaveAs", true, filename ".html");
winRecord.close();
}