document.writeln("<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\">");
document.writeln("<html>");
document.writeln("  <head>");
document.writeln("    <meta http-equiv=\"content-type\" content=\"text\/html; charset=gbk\">");
document.writeln("    <title>联信UM - 用户属性<\/title>");
document.writeln("		<style type=\"text/css\">");
document.writeln("			body{background-color: transparent;}");
document.writeln("			.common_color{color:#000000;}");
document.writeln("		</style>");
document.writeln("		<!--[if IE 6]>");
document.writeln("			<script type=\"text\/javascript\" src=\"http:\/\/" + parent.hostPath + "\/umservice_gbk\/dd_belatedpng.js\" ><\/script>");
document.writeln("		<![endif]-->");
document.writeln("    <script src=\"http:\/\/" + parent.hostPath + "\/umservice_gbk\/shared.js\"><\/script>");
document.writeln("    <script src=\"http:\/\/" + parent.hostPath + "\/umservice_gbk\/switchStyle.js\"><\/script>");
document.writeln("    <script src=\"http:\/\/" + parent.hostPath + "\/umservice_gbk\/jsjac.js\"><\/script>");
document.writeln("    <script>");
document.writeln("      <!--");
document.writeln("		var srcW;");
document.writeln("		var user;");
document.writeln("		var allgrpbox;");
document.writeln("		var curgrpbox;");
document.writeln("		function submitClicked() {");
document.writeln("			var iq = new JSJaCIQ();");
document.writeln("			iq.setType(\"set\");");
document.writeln("			var query = iq.setQuery(\"jabber:iq:roster\");");
document.writeln("			var aItem = query.appendChild(iq.getDoc().createElement(\"item\"));");
document.writeln("			aItem.setAttribute(\"jid\", jid);");
document.writeln("			aItem.setAttribute(\"name\", document.userprops.nickname.value);");
document.writeln("			if (curgrpbox.length > 0) {");
document.writeln("				for (var i = 0; i < curgrpbox.length; i++) {");
document.writeln("					aItem.appendChild(iq.getDoc().createElement(\"group\")).appendChild(iq.getDoc().createTextNode(curgrpbox.options[i].value));");
document.writeln("				}");
document.writeln("			}");
document.writeln("			srcW.con.send(iq);");
document.writeln("			srcW.windowClose(\'openProps\');");
document.writeln("			return false;");
document.writeln("		}");
document.writeln("		function addgroup() {");
document.writeln("			if (document.userprops.newgrp.value != \"\") {");
document.writeln("				for (var i = 0; i < curgrpbox.length; i++) {");
document.writeln("					if (curgrpbox.options[i].value == document.userprops.newgrp.value) {");
document.writeln("						return false;");
document.writeln("					} \/\/ nothin to do");
document.writeln("				}");
document.writeln("				curgrpbox.options[curgrpbox.length] = new Option(document.userprops.newgrp.value, document.userprops.newgrp.value);");
document.writeln("			}");
document.writeln("			return false;");
document.writeln("		}");
document.writeln("		function remgroup() {");
document.writeln("			if (curgrpbox.selectedIndex < 0) {");
document.writeln("				return false;");
document.writeln("			}");
document.writeln("			curgrpbox.options[curgrpbox.selectedIndex] = null;");
document.writeln("			return false;");
document.writeln("		}");
document.writeln("		function setNewGrp(idx) {");
document.writeln("			document.userprops.newgrp.value = allgrpbox.options[idx].value;");
document.writeln("		}");
document.writeln("		function init() {");
document.writeln("		  \/\/ determine source window");
document.writeln("			if(typeof(DD_belatedPNG) != \'undefined\'){DD_belatedPNG.fix(\'span\');}");
document.writeln("			srcW = top;");
document.writeln("			document.title = \"\\u7f16\\u8f91 \" + jid + \" \\u7684\\u5c5e\\u6027\";");
document.writeln("			document.getElementById(\"nickjid\").innerHTML = jid;");
document.writeln("			document.getElementById(\"groupjid\").innerHTML = jid;");
document.writeln("			user = srcW.roster.getUserByJID(jid);");
document.writeln("			curgrpbox = document.userprops.curgrps;");
document.writeln("			allgrpbox = document.userprops.allgrps;");
document.writeln("			for (var i = 0; i < user.groups.length; i++) {");
document.writeln("				if (user.groups[i].name != \"临时好友\") {");
document.writeln("					curgrpbox.options[curgrpbox.length] = new Option(user.groups[i].name, user.groups[i].name);");
document.writeln("				}");
document.writeln("			}");
document.writeln("			for (var i = 0; i < srcW.roster.groups.length; i++) {");
document.writeln("				if (srcW.roster.groups[i].name != \"\\u672a\\u5f52\\u7c7b\") {");
document.writeln("					allgrpbox.options[allgrpbox.length] = new Option(srcW.roster.groups[i].name, srcW.roster.groups[i].name);");
document.writeln("				}");
document.writeln("			}");
document.writeln("			document.userprops.nickname.value = user.name;");
document.writeln("		}");
document.writeln("		function keyPressed(e) {");
document.writeln("			if (e.ctrlKey && e.keyCode == 13) {");
document.writeln("				submitClicked();");
document.writeln("			} else {");
document.writeln("				if (e.keyCode == 27) {");
document.writeln("					srcW.windowClose(\'openProps\');");
document.writeln("				}");
document.writeln("			}");
document.writeln("		}");
document.writeln("		onload = init;");
document.writeln("      \/\/-->");
document.writeln("    <\/script>");
document.writeln("  <\/head>");
document.writeln("");
document.writeln("  <body onkeydown=\"keyPressed(event);\">");
document.writeln("    <form name=\"userprops\" action=\"\" style=\"margin:0px;\">");
document.writeln("			<table width=\"100%\" height=\"100%\" border=0 cellpadding=0 cellspacing=0>");
document.writeln("				<tr><td height=\"100%\">");
document.writeln("      <fieldset style=\"margin:0px;\">");
document.writeln("        <legend>编辑 <span id=\"nickjid\"><\/span> 的称呼<\/legend>");
document.writeln("        <table border=0 cellspacing=0 cellpadding=0 width=\"100%\">");
document.writeln("            <tr>");
document.writeln("              <td nowrap>昵称:&nbsp;<\/td><td width=\"100%\"><input type=\"text\" name=\"nickname\" style=\"width:98%\"><\/td><\/tr>");
document.writeln("        <\/table>");
document.writeln("      <\/fieldset>");
document.writeln("      <br>");
document.writeln("      <fieldset style=\"margin:0px;background-color:#ffffff;\">");
document.writeln("        <legend>编辑 <span id=\"groupjid\"><\/span> 的组<\/legend>");
document.writeln("        <table>");
document.writeln("            <tr>");
document.writeln("              <td>");
document.writeln("                <fieldset>");
document.writeln("                  <legend>可用的组<\/legend>");
document.writeln("                  <table border=0 cellspacing=0 cellpadding=0 width=\"100%\">");
document.writeln("                      <tr>");
document.writeln("                        <tr><td>组:&nbsp;<\/td><td width=\"100%\"><input type=\"text\" name=\"newgrp\"><\/td><\/tr>");
document.writeln("                        <tr><td colspan=2 height=10><\/td><\/tr>");
document.writeln("                        <tr>");
document.writeln("                          <td colspan=2 width=\"100%;\"><select size=\"9\" name=\"allgrps\" style=\"width:100%\" onChange=\"setNewGrp(this.selectedIndex);\"><\/select><\/td><\/tr>");
document.writeln("                  <\/table>");
document.writeln("                <\/fieldset>");
document.writeln("              <\/td>");
document.writeln("              <td><button onClick=\"return addgroup();\">&gt;<\/button><br><button onClick=\"return remgroup();\">&lt;<\/button><\/td>");
document.writeln("              <td>");
document.writeln("                <fieldset>");
document.writeln("                  <legend>当前组<\/legend>");
document.writeln("                  <select size=\"11\" name=\"curgrps\" style=\"width:165px\"><\/select>");
document.writeln("                <\/fieldset>");
document.writeln("              <\/td>");
document.writeln("            <\/tr>");
document.writeln("        <\/table>");
document.writeln("      <\/fieldset>");
document.writeln("				<\/td><\/tr>");
document.writeln("				<tr><td align=\"right\" id=\"buttonbox\" style=\"padding-top:4px;\">");
document.writeln("					<span style=\"background-image:url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat.png);margin-right:4px;\"");
document.writeln("						onmouseover=\"this.style.backgroundImage=\'url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat_over.png)\';\"");
document.writeln("						onmouseout=\"this.style.backgroundImage=\'url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat.png)\';\" class=\"wrap_span\" onClick=\"return submitClicked();\"><div class=\"wrap_btn common_color\">确定<\/div></span>");
document.writeln("					<span style=\"background-image:url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat.png);\"");
document.writeln("						onmouseover=\"this.style.backgroundImage=\'url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat_over.png)\';\"");
document.writeln("						onmouseout=\"this.style.backgroundImage=\'url(http://" + parent.hostPath + "/umservice_gbk/images/btn_chat.png)\';\" class=\"wrap_span\" onClick=\"srcW.windowClose(\'openProps\');return false;\"><div class=\"wrap_btn common_color\">取消<\/div></span>");
document.writeln("				<\/td><\/tr>");
document.writeln("			<\/table>");
document.writeln("    <\/form>");
document.writeln("  <\/body>");
document.writeln("<\/html>");
document.writeln("");