function putMsgHTML(msg,user) {
	var msgHTML = "";
	var body = "";
	var nick = "";
	var err = false;
	if (msg.getType() == "error") {
		var error = aJSJaCPacket.getNode().getElementsByTagName("error").item(0);
		if (error && error.getElementsByTagName("text").item(0)) {
			body = error.getElementsByTagName("text").item(0).firstChild.nodeValue;
		}
		err = true;
	} else {
		body = msg.getBody();
	}
	var now = msg.jwcTimestamp ? msg.jwcTimestamp : new Date();
	var mtime = ("0" + now.getHours()).slice(-2) + ":";
	mtime += ("0" + now.getMinutes()).slice(-2) + ":";
	mtime += ("0" + now.getSeconds()).slice(-2);
	if (msg.getTo() == user.jid) { // msg sent by me
		nick = htmlEnc(roster.nick);
		nickcolor = "blue";
		dir = "to";
	} else {
		nick = user.name;
		nickcolor = "red";
		dir = "from";
	}
	var mid = msg.getTo() + user.msgid++;
	msgHTML += "<div title=\"" + mtime + "\" cDate=\"" + now.getTime() + "\" dir=\"" + dir + "\"><span class=time>[" + mtime + "] </span>";
	body = msgFormat(body);
	if (err) {
		msgHTML += "<span style=\"color:red;\">&nbsp;";
	} else {
		msgHTML += "<span >&nbsp;";
		if (body.match(/^\/me /)) {
			body = body.replace(/^\/me /, "<span style=\"color:green;font-weight:bold;font-size:12px;font-family:Tahoma;\" class=msgnick>*&nbsp;" + nick + "</span>");
		} else {
			msgHTML += "<span style=\"color:" + nickcolor + ";font-size:12px;font-family:Tahoma;\" class=msgnick>&lt;" + nick + "&gt;</span>&nbsp;";
		}
	}
	msgHTML += "<span id=\"" + mid + "\">" + body + "</span>";
	msgHTML += "</span></div>";
	var auto_scroll = false;
	if (user.cFrame.body.scrollTop + user.cFrame.body.clientHeight >= user.cFrame.body.scrollHeight) { // scrollbar at bottom
		auto_scroll = true;
	}
	var frag = user.cFrame.createElement("div");
	frag.innerHTML = msgHTML;
	user.cFrame.body.appendChild(frag.firstChild);
	if (!err) {
		var font = msg.getNode().getElementsByTagName("font").item(0);
		var obj = user.cFrame.getElementById(mid);
		if (font && obj != null) {
			for (var j = 0; j < font.childNodes.length; j++) {
				if (font.childNodes[j].nodeName == "fontname") {
					obj.style.fontFamily = font.childNodes[j].firstChild.nodeValue;
				}
				if (font.childNodes[j].nodeName == "size") {
					obj.style.fontSize = font.childNodes[j].firstChild.nodeValue + "pt";
				}
				if (font.childNodes[j].nodeName == "color") {
					var iColor = ("000000" + (parseInt(font.childNodes[j].firstChild.nodeValue)).toString(16)).slice(-6);
					iColor = iColor.substr(4,2) + iColor.substr(2,2) + iColor.substr(0,2);
					obj.style.color = "#" + iColor;
				}
				if (font.childNodes[j].nodeName == "style") {
					if (font.childNodes[j].firstChild) {
						var temp = font.childNodes[j].firstChild.nodeValue.toLowerCase().split(":");
						var temp1 = "";
						for (var m = 0; m < temp.length; m++) {
							if (temp[m] == "fsbold") {
								obj.style.fontWeight = "bold";
							}
							if (temp[m] == "fsitalic") {
								obj.style.fontStyle = "italic";
							}
							if (temp[m] == "fsunderline") {
								temp1 += " underline";
							}
							if (temp[m] == "fsstrikeout") {
								temp1 += " line-through";
							}
						}
						if (temp1) {
							obj.style.textDecoration = temp1.replace(/(^\s*)|(\s*$)/g, "");
						}
					}
				}
			}
		}
	}
	if (auto_scroll) {
		document.getElementById(user.windowId + "_chat").contentWindow.scrollTo(0, user.cFrame.body.scrollHeight);
	}
}
function popMsgs(user) {
	if ((typeof orgid == "undefined" || orgid == "") && (typeof pass == "undefined" || pass == "")) {
		document.getElementById(user.windowId + "_login_div").style.display = "block";
	}
	if(user.fileMsg != ""){
		var frag = user.cFrame.createElement("div");
		frag.innerHTML = user.fileMsg;
		user.fileMsg = "";
		user.cFrame.body.appendChild(frag.firstChild);
	}
	while (user.chatmsgs.length > 0) {
		var msg = user.chatmsgs.shift();
		putMsgHTML(msg,user);
	}
	if (focusWindows) {
		document.getElementById(user.windowId + "_msgbox").focus();
	}
	if (user.lastsrc != null && user.messages.length == 0) {
		var images = roster.getUserIcons(user.jid);
		for (var i = 0; i < images.length; i++) {
			images[i].src = user.lastsrc;
		}
		user.lastsrc = null;
		if (roster.usersHidden && user.status == "unavailable") { // remove user from roster if not available any more 
			roster.print();
		}
	}
	try {
		document.getElementById(windowId + "_editName").value = t_editName;
	}
	catch (e) {
	}
	try {
		document.getElementById(windowId + "_editTel").value = t_editTel;
	}
	catch (e) {
	}
}
function updateUserPresence(user) {
	if ((typeof orgid == "undefined" || orgid == "") && (typeof uin == "undefined" || uin == "")) {
		document.getElementById("contact" + user.jid + "_im_ownInfo").style.display = "none";
	}
	var awaymsg = document.getElementById("contact" + user.jid + "awaymsg");
	document.getElementById("contact" + user.jid + "user_name").innerHTML = user.name;
	if (user.mind) {
		awaymsg.innerHTML = htmlEnc(user.mind);
	} else {
		if (user.statusMsg) {
			awaymsg.innerHTML = htmlEnc(user.statusMsg);
		}
	}
	document.getElementById("contact" + user.jid + "_windowheadContent").style.backgroundImage = "url(" + eval(user.status + "Led").src + ")";
	if (document.getElementById("contact" + user.jid + "taskbarItemContent")) {
		document.getElementById("contact" + user.jid + "taskbarItemContent").style.backgroundImage = "url(" + eval(user.status + "Led").src + ")";
	}
	if (user.status == "unavailable" && user.status != user.oldStatus) {
		var now = new Date();
		var mtime = now.getFullYear() + "-";
		mtime += ("0" + (now.getMonth() + 1)).slice(-2) + "-";
		mtime += ("0" + now.getDate()).slice(-2) + " ";
		mtime += ("0" + now.getHours()).slice(-2) + ":";
		mtime += ("0" + now.getMinutes()).slice(-2) + ":";
		mtime += ("0" + now.getSeconds()).slice(-2);
		var msgHTML = "<div cdate=\"" + now.getTime() + "\" style=\"background: url(" + eval(user.status + "Led").src + ") no-repeat scroll 3px center transparent;text-indent:20px;line-height:20px;\"><span style=\"font-family: \u5b8b\u4f53; font-size: 12px;\">";
		msgHTML += "\u5bf9\u65b9\u72b6\u6001\u4e3a\u79bb\u7ebf(\u8bf7\u5728\u6b64\u7559\u8a00)";
		user.oldStatus = user.status;
		msgHTML += "[" + mtime + "]</span></div>";
		var frag = user.cFrame.createElement("div");
		frag.innerHTML = msgHTML;
		user.cFrame.body.appendChild(frag.firstChild);
		for (var i = 0; i <apperceive_users.length; i++) {
			if (apperceive_users[i].offlineMessage != "" && cutResource(user.jid) == (apperceive_users[i][1] + "@" + UMWEBSERVER)) {
				var aMessage = new JSJaCMessage();
				aMessage.setType("chat");
				aMessage.setFrom(user.jid);
				aMessage.setTo(jid);
				aMessage.setBody(apperceive_users[i].offlineMessage);
				putMsgHTML(aMessage);
			}
		}
	} else if (user.status != "unavailable" && user.status != "stalker" && user.oldStatus != "available") {
		var now = new Date();
		var mtime = now.getFullYear() + "-";
		mtime += ("0" + (now.getMonth() + 1)).slice(-2) + "-";
		mtime += ("0" + now.getDate()).slice(-2) + " ";
		mtime += ("0" + now.getHours()).slice(-2) + ":";
		mtime += ("0" + now.getMinutes()).slice(-2) + ":";
		mtime += ("0" + now.getSeconds()).slice(-2);
		var msgHTML = "<div cdate=\"" + now.getTime() + "\" style=\"background: url(" + eval(user.status + "Led").src + ") no-repeat scroll 3px center transparent;text-indent:20px;line-height:20px;\"><span style=\"font-family: \u5b8b\u4f53; font-size: 12px;\">";
		msgHTML += "\u5bf9\u65b9\u72b6\u6001\u4e3a\u5728\u7ebf";
		user.oldStatus = "available";
		msgHTML += "[" + mtime + "]</span></div>";
		var frag = user.cFrame.createElement("div");
		frag.innerHTML = msgHTML;
		user.cFrame.body.appendChild(frag.firstChild);
		for (var i = 0; i <apperceive_users.length; i++) {
			if (apperceive_users[i].onlineMessage != "" && cutResource(user.jid) == (apperceive_users[i][1] + "@" + UMWEBSERVER)) {
				var aMessage = new JSJaCMessage();
				aMessage.setType("chat");
				aMessage.setFrom(user.jid);
				aMessage.setTo(jid);
				aMessage.setBody(apperceive_users[i].onlineMessage);
				putMsgHTML(aMessage);
			}
		}
	}
}
function submitClicked(jid) {
	var user = roster.getUserByJID(cutResource(jid));
	if (user == null) {
        user = roster.addUser(new RosterUser(jid));
        roster.print();
    }
	if(user.windowId == ""){
		user.windowId = "contact" + cutResource(jid);
		user.cFrame = document.getElementById(user.windowId + "_chat").contentWindow.document;
	}
	var obj = document.getElementById(user.windowId + "_msgbox");
	var body = obj.value;
	if (body == "") { // don"t send empty message
		return false;
	}
	
	sendMessage(user,body);
	
	obj.value = ""; // empty box
	obj.focus(); // set focus back on input field
	return false;
}
function chatInit(windowId,jid) {
	var user =  roster.getUserByJID(jid);
	user.windowId = windowId;
	user.cFrame = document.getElementById(user.windowId + "_chat").contentWindow.document;
	user.cFrame.body.className='chatbox';
	user.cFrame.body.style.wordWrap='break-word';
	updateUserPresence(user);
	popMsgs(user);
	displayTimestamp(user);
	document.getElementById(user.windowId + "_msgbox").style.fontFamily=messageFontFamily;
	document.getElementById(user.windowId + "_msgbox").style.fontSize=messageFontSize;
	document.getElementById(user.windowId + "_msgbox").style.fontStyle=messageFontStyle;
	document.getElementById(user.windowId + "_msgbox").style.fontWeight=messageFontWeight;
	document.getElementById(user.windowId + "_msgbox").style.color=messageColor;
	document.getElementById(user.windowId + "_msgbox").style.textDecoration=messageTextDecoration;
	userInfo(user);
}
function userInfo(user) {
  	var iq = new JSJaCIQ();
	iq.setType("get");
	iq.setTo(user.jid);
	try{
		var vCard = iq.getNode().appendChild(iq.getDoc().createElementNS("vcard-temp","vCard"));
	}catch(e){
		var vCard = iq.getNode().appendChild(iq.getDoc().createElement("vCard"));
		vCard.setAttribute("xmlns","vcard-temp");
	}
	con.send(iq,handleVCard,user);
}
function handleVCard(iq,user) {
	if (!iq) {
		Debug.log("got empty iq result",1);
		return;
	}
	Debug.log(iq.getDoc().xml,3);
	if (iq.getNode().getElementsByTagName("vCard").item(0)) {
		for (var i=0; i<iq.getNode().getElementsByTagName("vCard").item(0).childNodes.length; i++) {
			var token = iq.getNode().getElementsByTagName("vCard").item(0).childNodes.item(i);
			tokenname = "_" + token.nodeName;
			if (token.firstChild && token.firstChild.nodeType != 3) { // found a container
				for (var j=0; j<token.childNodes.length; j++) {
					if (document.getElementById(user.windowId + tokenname+"."+token.childNodes.item(j).nodeName) && token.childNodes.item(j).firstChild){
						document.getElementById(user.windowId + tokenname+"."+token.childNodes.item(j).nodeName).innerHTML = token.childNodes.item(j).firstChild.nodeValue;
						document.getElementById(user.windowId + tokenname+"."+token.childNodes.item(j).nodeName).setAttribute("title",token.childNodes.item(j).firstChild.nodeValue);
					}
				}
	
      		} else{
				if (document.getElementById(user.windowId + tokenname) && token.firstChild){
					document.getElementById(user.windowId + tokenname).innerHTML = token.firstChild.nodeValue;
					document.getElementById(user.windowId + tokenname).setAttribute("title",token.firstChild.nodeValue);
				}
			}
		}
	}
	document.getElementById(user.windowId + "_URL").href=(document.getElementById(user.windowId + "_URL").innerHTML.indexOf("http://")>=0 ? document.getElementById(user.windowId + "_URL").innerHTML:"http://"+document.getElementById(user.windowId + "_URL").innerHTML);
	if(iq.getNode().getElementsByTagName("autoanswer").item(0)){
		var i = "online";
		var autoanswer = iq.getNode().getElementsByTagName("autoanswer").item(0);
		if(user.status == "unavailable"){
			i = "offline";
		}
		if(autoanswer.getElementsByTagName(i).item(0).firstChild.firstChild && autoanswer.getElementsByTagName(i).item(0).firstChild.firstChild.nodeValue=="1"){
			var aMessage = new JSJaCMessage();
			aMessage.setType("chat");
			aMessage.setTo(roster.jid);
			aMessage.setBody(autoanswer.getElementsByTagName(i).item(0).childNodes.item(1).firstChild?autoanswer.getElementsByTagName(i).item(0).childNodes.item(1).firstChild.nodeValue:"");
			putMsgHTML(aMessage,user);
		}
	}
}
function displayTimestamp(user) {
	var tstyle;
	if (is.ie) {
		tstyle = user.cFrame.styleSheets("timestampstyle");
		tstyle.disabled = timestamps;
	} else {
		tstyle = user.cFrame.getElementById("timestampstyle");
		tstyle.sheet.disabled = timestamps;
	}
}
function msgboxKeyDown(el, e, jid) {
	var keycode = e.keyCode ? e.keyCode : e.which;
	switch (keycode) {
	  case 13:
		if (!!changeway == e.ctrlKey) {
			return submitClicked(jid);
		}
		break;
	  case 38:				// shift+up
		if (e.ctrlKey) {
			el.value = getHistory("up", el.value);
			el.focus();
			el.select();
		}
		break;
	  case 40:				// shift+down 
		if (e.ctrlKey) {
			el.value = getHistory("down", el.value);
			el.focus();
			el.select();
		}
		break;
	  case 76:
		if (e.ctrlKey) {   // ctrl+l
			document.getElementById("contact" + jid + "_chat").document.body.innerHTML = "";
			return false;
		}
		break;
	  case 27:
		windowClose("contact" + jid);
		break;
	}
	return true;
}
function downloadFile(obj, realfilename) {
	if (downloading) {
		alert("\u5df2\u6709\u6587\u4ef6\u5728\u4e0b\u8f7d\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01");
		return false;
	} else {
		var iq = new JSJaCIQ();
		iq.setIQ(jid, "result", "file_" + con._rid);
		var query = iq.setQuery("jabber:iq:umofflinefiles");
		var xmldoc = XmlDocument.create("body", "jabber:iq:umofflinefiles");
		xmldoc.loadXML("<body xmlns=\"jabber:iq:umofflinefiles\"><type>201</type><result>true</result><realfilename>" + realfilename + "</realfilename></body>");
		for (var i = 0; i < xmldoc.documentElement.childNodes.length; i++) {
			query.appendChild(xmldoc.firstChild.childNodes.item(i).cloneNode(true));
		}
		con.send(iq);
		obj.parentNode.style.visibility = "hidden";
		return false;
	}
}
function noDownloadFile(obj, realfilename) {
	var iq = new JSJaCIQ();
	iq.setIQ(jid, "result", "file_" + con._rid);
	var query = iq.setQuery("jabber:iq:umofflinefiles");
	var xmldoc = XmlDocument.create("body", "jabber:iq:umofflinefiles");
	xmldoc.loadXML("<body xmlns=\"jabber:iq:umofflinefiles\"><type>201</type><result>false</result><realfilename>" + realfilename + "</realfilename></body>");
	for (var i = 0; i < xmldoc.documentElement.childNodes.length; i++) {
		query.appendChild(xmldoc.firstChild.childNodes.item(i).cloneNode(true));
	}
	con.send(iq);
	obj.parentNode.style.visibility = "hidden";
	cFrame.body.innerHTML += "<div>&nbsp;<span style=\"color:blue;font-size:12px;font-family:Tahoma;font-style: normal;font-weight: normal; \" class=msgnick>&lt;" + htmlEnc(roster.nick) + "&gt;</span>&nbsp;\u5df2\u62d2\u7edd\u63a5\u6536\u6587\u4ef6&nbsp;[" + fileDownload[realfilename][1] + "]</div>";
	delete fileDownload[realfilename];
	return false;
}
function saveas(windowId) {
	try {
		var savestyle = "<style type=\"text/css\"> <!--body{margin: 0px; padding: 0px 0px 0px 0px; border: 0px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma;}td { font-family: Tahoma; font-size: 9pt; }p { margin-top:0px;margin-bottom:0px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma; }.dialog_content{ width:471px; height:276px;border:2px solid #e3ebf8; word-wrap: break-word; word-break: break-all; font-size:14px;padding-left:5px;padding-top:5px; text-align:left;}--></style>";
		var time = new Date();
		var filename = time.toLocaleDateString();
		filename = "UM\u5ba2\u670d\u8bb0\u5f55" + filename + ".htm";
		var winSave = window.open("about:blank", "_blank", "top=10000");
		winSave.document.open("text/html", "utf-8");
		winSave.document.write("<html><head><base target=\"_blank\">" + savestyle + "</head><body>" + document.getElementById(windowId +"_chat").contentWindow.document.body.innerHTML + "</body></html>");
		winSave.document.execCommand("saveas", true, filename);
		winSave.close();
	}
	catch (e) {
	}
}
function handleClick(e,windowId) {
	var firingObj = (is.ie) ? e.srcElement : e.target;
	if (firingObj.id != windowId + "_editName" && firingObj.id != windowId + "_editTel" && (document.getElementById(windowId + "_editName").value != t_editName || document.getElementById(windowId + "_editTel").value != t_editTel)) {
		setOwnInfo(windowId);
	}
}
function setOwnInfo(windowId) {
	t_editName = document.getElementById(windowId + "_editName").value;
	t_editTel = document.getElementById(windowId + "_editTel").value;
	new JSJaCCookie("editname", escape(t_editName), 10 * 24 * 3600).write();
	new JSJaCCookie("edittel", escape(t_editTel), 10 * 24 * 3600).write();
	var iq = new JSJaCIQ();
	iq.setIQ(null, "set", "owninfo_1");
	iq.appendNode("query", {xmlns:"jabber:iq:owninfo"}, [["linkman", t_editLinkMan], ["username", t_editName], ["usertel", t_editTel]]);
	con.send(iq);
	return true;
}
function getChatBody(windowId,jid){
	var A = new Array();
	A[A.length] = "	<div onclick=\"handleClick(event,\'" + windowId + "\');\" style=\"height: 100%;width: 100%;border:0px;padding:0px;margin:0px;\">";
	A[A.length] = "		<div id=\"" + windowId + "_schedulebar\" style=\"position:absolute;top:0px;left:0px;background-color: #ffffff;\">";
	A[A.length] = "			<table style=\"height: 100%;width: 100%;border:0px;padding:0px;margin:0px;\" cellspacing=\"0\">";
	A[A.length] = "				<tr style=\"display: none;\">";
	A[A.length] = "					<td style=\"border-width: 0px 1px 1px 0px;border-style: solid;border-color: #c1e5f3;line-height: 15px;\">";
	A[A.length] = "						<img src=\"" + basePath + "images\/up.gif\" width=\"14\" height=\"14\" \/>";
	A[A.length] = "					<\/td>";
	A[A.length] = "					<td id=\"" + windowId + "_up_schedule\" width=\"90%\" style=\"border-width: 0px 1px 1px 0px;border-style: solid;border-color: #c1e5f3;\">&nbsp;";
	A[A.length] = "					<\/td>";
	A[A.length] = "					<td class=\"btn\" onclick=\"stopSend();\" style=\"text-decoration: underline;color: blue;\">";
	A[A.length] = "						<nobr>中止<\/nobr>";
	A[A.length] = "					<\/td>";
	A[A.length] = "				<\/tr>";
	A[A.length] = "				<tr style=\"display: none;\">";
	A[A.length] = "					<td style=\"border-width: 0px 1px 1px 0px;border-style: solid;border-color: #c1e5f3;line-height: 15px;\">";
	A[A.length] = "						<img src=\"" + basePath + "images\/down.gif\" width=\"14\" height=\"14\"\/>";
	A[A.length] = "					<\/td>";
	A[A.length] = "					<td id=\"" + windowId + "_down_schedule\" width=\"90%\" style=\"border-width: 0px 1px 1px 0px;border-style: solid;border-color: #c1e5f3;\">&nbsp;";
	A[A.length] = "					<\/td>";
	A[A.length] = "					<td class=\"btn\" onclick=\"FlashHelper.getFlash().stopReceive();\" style=\"text-decoration: underline;color: blue;\">";
	A[A.length] = "						<nobr>中止<\/nobr>";
	A[A.length] = "					<\/td>";
	A[A.length] = "				<\/tr>";
	A[A.length] = "			<\/table>";
	A[A.length] = "		<\/div>";
	A[A.length] = "		<table style=\"height: 100%;width: 100%;border:0px;padding:0px;margin:0px;\" cellspacing=\"0\">";
	A[A.length] = "			<tr>";
	A[A.length] = "				<td style=\"height: 100%;padding:0px;margin:0px;\">";
	A[A.length] = "					<table style=\"height: 100%;width: 100%;padding:0px;margin:0px;\" cellspacing=\"0\" cellpadding=0>";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td style=\"border: 1px solid #c1e5f3;background-color:#ffffff;padding:0px;margin:0px;\" colspan=\"3\">";
	A[A.length] = "								<iframe id=\"" + windowId + "_chat\" class=\"chat\" name=\"" + windowId + "_chat\" style=\"margin:0px;\" onload=\"chatInit(\'"+ windowId + "\',\'"+ jid + "\');\" frameborder=0><\/iframe>";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td class=\"chatmenubar\" colspan=\"3\">";
	A[A.length] = "								<img src=\"" + basePath + "images\/emotion.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"showEmotionSelection(\'contact"+ jid + "\',event);\">";
	A[A.length] = "								<img src=\"" + basePath + "images\/font.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"showFontNameSelection(\'contact"+ jid + "\',event);\">";
	A[A.length] = "								<img src=\"" + basePath + "images\/file.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"showFileSelection(\'contact"+ jid + "\',event);\">";
	A[A.length] = "								<img src=\"" + basePath + "images\/capture.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"showCaptureSelection(\'contact"+ jid + "\',event);\">";
	if(typeof orgid != "undefined" && orgid !=""){
		A[A.length] = "							<img src=\"" + basePath + "images\/appraise.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"showAppraiseSelection(\'contact"+ jid + "\',event);\">";
	}
	A[A.length] = "								<img src=\"" + basePath + "images\/save.gif\" style=\"margin-left: 5px;cursor: pointer;\" onclick=\"saveas(\'"+ windowId + "\');\">";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td  style=\"border: 1px solid #c1e5f3;background-color:#ffffff;overflow:hidden;\" colspan=\"3\">";
	A[A.length] = "								<textarea id=\"" + windowId + "_msgbox\" style=\"width:100%;height:50px;overflow: auto;border: 0px;font-family: Tahoma;font-size: 12pt;color:#000000;\" onKeyDown=\"return msgboxKeyDown(this,event,\'"+ jid + "\');\"><\/textarea>";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td colspan=\"3\">";
	A[A.length] = "								<table border=0 cellpadding=0 cellspacing=0 style=\"width: 100%;height: 100%;\">";
	A[A.length] = "									<tr>";
	A[A.length] = "										<td id=\"" + windowId + "_im_ownInfo\" class=\"im_ownInfo\">";
	A[A.length] = "											署名<input type=\"text\" style=\"margin-top: 3px;width: 50px;color: #5F6A7B;\" id=\"" + windowId + "_editName\" class=\"myMindMsg\">";
	A[A.length] = "											电话<input type=\"text\" style=\"margin-top: 3px;width: 55px;color: #5F6A7B;\" id=\"" + windowId + "_editTel\" class=\"myMindMsg\">";
	A[A.length] = "										<\/td>";
	A[A.length] = "										<td align=right style=\"padding-top:5px;\">";
	A[A.length] = "											<span onClick=\"submitClicked(\'" + jid + "\'); return false;\" class=\"wrap_span\" style=\"background-image:url(" + basePath + "images/btn_chat.png);\"";
	A[A.length] = "												onmouseover=\"this.style.backgroundImage=\'url(" + basePath + "images/btn_chat_over.png)\';\"";
	A[A.length] = "												onmouseout=\"this.style.backgroundImage=\'url(" + basePath + "images/btn_chat.png)\';\"><div class=\"wrap_btn common_color\">发送</div></span>";
	A[A.length] = "											<span class=\"wrap_span\" style=\"background-image:url(" + basePath + "images/send_option.png);width:12px;margin-right:4px;\"";
	A[A.length] = "												onmouseover=\"this.style.backgroundImage=\'url(" + basePath + "images/send_option_over.png)\';\"";
	A[A.length] = "												onmouseout=\"this.style.backgroundImage=\'url(" + basePath + "images/send_option.png)\';\" onclick=\"showChangewaySelection(\'contact"+ jid + "\',event);\"><div class=\"wrap_btn\" style=\"visibility: hidden;\">选</div></span>";
	A[A.length] = "										<\/td>";
	A[A.length] = "									<\/tr>";
	A[A.length] = "								<\/table>";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "					<\/table>";
	A[A.length] = "				<\/td>";
	A[A.length] = "				<td style=\"height: 100%;width:140px;padding:0px;margin:0px;\">";
	A[A.length] = "					<table style=\"height: 100%;background-color:#ffffff;width: 100%;border: #c1e5f3 1px solid;\">";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td style=\"vertical-align: top;height: 116px;text-align: center;padding-top: 10px;\">";
	A[A.length] = "								<img src=\"" + basePath + "images\/c_service.gif\"\/>";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "						<tr>";
	A[A.length] = "							<td style=\"vertical-align: top;padding:0px;margin:0px;\">";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">姓名：<span style=\"color: #5F6A7B;\"><span id=\"" + windowId + "_N.FAMILY\"><\/span><span style=\"color: #5F6A7B;\" id=\"" + windowId + "_N.GIVEN\"><\/span><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">职位：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_TITLE\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">部门：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_ORG.ORGUNIT\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">单位：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_ORG.ORGNAME\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">地址：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_Street_Add\"><\/span><span style=\"color: #5F6A7B;\" id=\"" + windowId + "_Zip_Add\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">电话：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_Voice_Add\"><\/span><span style=\"color: #5F6A7B;\" id=\"" + windowId + "_Fax_Add\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">手机：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_Mobile_Add\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 5px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">邮箱：<span style=\"color: #5F6A7B;\" id=\"" + windowId + "_EMAIL\"><\/span><\/div>";
	A[A.length] = "								<div style=\"padding: 0px 0px 15px 5px;WHITE-SPACE: nowrap;TEXT-OVERFLOW: ellipsis;OVERFLOW: hidden;width:140px;\">网址：<a href=\"http:\/\/www.cccme.org.cn\" id=\"" + windowId + "_URL\" target=\"_blank\">www.cccme.org.cn<\/a><\/div>";
	A[A.length] = "								<div id=\"" + windowId + "_login_div\" style=\"display:none;padding: 15px 0px 5px 5px;word-wrap: break-word;overflow:hidden;width:140px;border-top:#C1E5F3 solid 1px;line-height:1.5em;\">您现在是匿名用户，要获取更多服务请先&nbsp;&nbsp;<a onclick=\"handleLog('','',dd.elements['" + windowId + "_frame'].x+(dd.elements['" + windowId + "_frame'].w-dd.elements['login_frame'].w)/2,dd.elements['" + windowId + "_frame'].y+(dd.elements['" + windowId + "_frame'].h-dd.elements['login_frame'].h)/2);return false;\" href=\"\" id=\"URL\" target=\"_blank\">登录<\/a></div>";
	A[A.length] = "							<\/td>";
	A[A.length] = "						<\/tr>";
	A[A.length] = "					<\/table>";
	A[A.length] = "				<\/td>";
	A[A.length] = "			<\/tr>";
	A[A.length] = "		<\/table>";
	A[A.length] = "	<\/div>";
	return A;
}