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("		<style type=\"text/css\">");
document.writeln("			body{background-color: #50bbff;}");
document.writeln("		</style>");
document.writeln("		<script src=\"http:\/\/" + window.parent.parent.hostPath + "\/umservice_gbk\/switchStyle.js\"><\/script>");
/* set this variable to 1 if you wish the URLs of the highlighted menu
			 * to be displayed in the status bar 
			 */
var ie5 = document.all && document.getElementById;
var ns6 = document.getElementById && !document.all;
var selobj;
function showmenuie5(e) {
	parent.parent.hideAllChatSelecitons();
	var firingobj = ie5 ? event.srcElement : e.target;
	while (firingobj && (!firingobj.className || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected"))) {
		firingobj = firingobj.parentNode;
	}
	if (!firingobj || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected")) {
		return false;
	}
	selobj = firingobj;
	selectUser(selobj);
	var user = parent.parent.roster.getUserByJID(parent.parent.cutResource(firingobj.id));
	if (user && typeof (user.type) != "undefined" && user.type == "groupchat") {
		menuobj = gChatMenu;
	} else {
		menuobj = document.getElementById("ie5menu");
	}
			
			  //Find out how close the mouse is to the corner of the window
	var rightedge = ie5 ? document.body.clientWidth - event.clientX : window.innerWidth - e.clientX;
	var bottomedge = ie5 ? document.body.clientHeight - event.clientY : window.innerHeight - e.clientY;
			  
			  //if the horizontal distance isn"t enough to accomodate the width of the context menu
	if (rightedge < menuobj.offsetWidth) {
			    //move the horizontal position of the menu to the left by it"s width
		menuobj.style.left = (ie5 ? document.body.scrollLeft + event.clientX - menuobj.offsetWidth : window.pageXOffset + e.clientX - menuobj.offsetWidth) + "px";
		if (menuobj.style.left < "2px") {
			menuobj.style.left = "2px";
		}
	} else {
			    //position the horizontal position of the menu where the mouse was clicked
		menuobj.style.left = (ie5 ? document.body.scrollLeft + event.clientX : window.pageXOffset + e.clientX) + "px";
	}
			      
			  //same concept with the vertical position
	if (bottomedge < menuobj.offsetHeight) {
		menuobj.style.top = (ie5 ? document.body.scrollTop + event.clientY - menuobj.offsetHeight : window.pageYOffset + e.clientY - menuobj.offsetHeight) + "px";
		if (menuobj.style.top < "2px") {
			menuobj.style.top = "2px";
		}
	} else {
		menuobj.style.top = (ie5 ? document.body.scrollTop + event.clientY : window.pageYOffset + e.clientY) + "px";
	}
	if (typeof (top.loghost) == "undefined") {
		document.getElementById("hist_menuitem").style.display = "none";
	}
	menuobj.style.visibility = "visible";
	return false;
}

function hidemenuie5(e) {
	parent.parent.hideAllChatSelecitons();
}
function highlightie5(e) {
	var firingobj = ie5 ? event.srcElement : e.target;
	if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
		if (ns6 && firingobj.parentNode.className == "menuitems") {
			firingobj = firingobj.parentNode;
		} //up one node
		firingobj.style.backgroundColor = "Highlight";
		//     firingobj.style.color="HighlightText";
		firingobj.style.color = "black";
	}
}
function lowlightie5(e) {
	var firingobj = ie5 ? event.srcElement : e.target;
	if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
		if (ns6 && firingobj.parentNode.className == "menuitems") {
			firingobj = firingobj.parentNode;
		} //up one node
		firingobj.style.backgroundColor = "Menu";
		//     firingobj.style.color="MenuText";
		firingobj.style.color = "black";
		window.status = "";
	}
}
function jumptoie5(e) {
	var firingobj = ie5 ? event.srcElement : e.target;
	if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
		if (ns6 && firingobj.parentNode.className == "menuitems") {
			firingobj = firingobj.parentNode;
		}
		if (firingobj.getAttribute("func")) {
			var jid = selobj.id.substring(0, selobj.id.indexOf("/"));
			eval("parent.parent." + firingobj.getAttribute("func") + "('" + jid + "')");
		}
		if (firingobj.getAttribute("function")) {
			var jid = selobj.id.substring(0, selobj.id.indexOf("/"));
			eval("parent.parent." + firingobj.getAttribute("function") + "()");
		}
	}
}
function toggleGrp(name) {
	parent.parent.roster.toggleGrp(name);
}
function selectUser(el) {
	parent.parent.roster.selectUser(el);
}
function userClicked(el, jid) {
	return parent.parent.roster.userClicked(el, jid);
}
if ((ie5 || ns6) && (typeof parent.parent.orgid == "undefined") && parent.parent.isBlog == 0) {
	document.oncontextmenu = showmenuie5;
	document.onclick = hidemenuie5;
}
window.onblur = window.parent.parent.windowBlur;
window.onfocus = window.parent.parent.windowFocus;
document.writeln("	<\/head>");
document.writeln("	<body class=\"roster\">");
document.writeln("		<div id=\"ie5menu\" class=\"skin0\" onMouseover=\"highlightie5(event)\"");
document.writeln("			onMouseout=\"lowlightie5(event)\" onClick=\"jumptoie5(event)\">");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"roster.openChat\">");
document.writeln("					开始聊天");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<div class=\"menuitems\" func=\"openSubscription\">");
document.writeln("				重新邀请");
document.writeln("			<\/div>");
document.writeln("			<div style=\"margin: 1px; background-color: #000000; line-height: 1px;\">&nbsp;<\/div>");
document.writeln("			<!-- <nobr>");
document.writeln("				<div class=\"menuitems\" func=\"roster.openMessage\">");
document.writeln("					发送消息");
document.writeln("				<\/div>");
document.writeln("			<\/nobr> ");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openCustomPresence\">");
document.writeln("					在线状态");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>-->");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserProps\">");
document.writeln("					修改好友");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserInfo\">");
document.writeln("					查看资料");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserHistory\" id=\'hist_menuitem\'>");
document.writeln("					历史");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<!--<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserNote\">");
document.writeln("					编辑备注");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>-->");
document.writeln("			<div style=\"margin: 1px; background-color: #000000; line-height: 1px;\">&nbsp;<\/div>");
document.writeln("			<div class=\"menuitems\" function=\"openSubscription\">");
document.writeln("				添加好友");
document.writeln("			<\/div>");
document.writeln("			<div class=\"menuitems\" func=\"removeUser\">");
document.writeln("				删除好友");
document.writeln("			<\/div>");
document.writeln("		<\/div>");
document.writeln("		<div id=\"gwMenu\" class=\"skin0\" onMouseover=\"highlightie5(event)\"");
document.writeln("			onMouseout=\"lowlightie5(event)\" onClick=\"jumptoie5(event)\">");
document.writeln("			<!-- <nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openCustomPresence\">");
document.writeln("					在线状态");
document.writeln("				<\/div>");
document.writeln("			<\/nobr> -->");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserProps\">");
document.writeln("					编辑");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<!-- <nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserInfo\">");
document.writeln("					查看资料");
document.writeln("				<\/div>");
document.writeln("			<\/nobr> -->");
document.writeln("		<\/div>");
document.writeln("		<div id=\"gChatMenu\" class=\"skin0\" onMouseover=\"highlightie5(event)\"");
document.writeln("			onMouseout=\"lowlightie5(event)\" onClick=\"jumptoie5(event)\">");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openGroupchat\">");
document.writeln("					显示");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<!-- <nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openCustomPresence\">");
document.writeln("					在线状态");
document.writeln("				<\/div>");
document.writeln("			<\/nobr>");
document.writeln("			<nobr>");
document.writeln("				<div class=\"menuitems\" func=\"openUserInfo\">");
document.writeln("					查看资料");
document.writeln("				<\/div>");
document.writeln("			<\/nobr> -->");
document.writeln("		<\/div>");
document.writeln("		<div id=\"roster\" class=\"roster\"><table style=\"vertical-align:middle;height:100%;width:100%;text-align: center;color:#4B6995;\"><tr><td>欢迎使用um800<br\/><br\/><br\/><img src=\"http:\/\/" + window.parent.parent.hostPath + "\/umservice_gbk\/images\/loading.gif\"\/><br\/><br\/>网络客服接入中&#8230;<\/td><\/tr><\/table><\/div>");
document.writeln("		<script type=\"text\/javascript\">	");
document.writeln("			if (ie5 || ns6) {");
document.writeln("				var menuobj = document.getElementById(\"ie5menu\");");
document.writeln("			}");
document.writeln("			if (ie5 || ns6) {");
document.writeln("				var gwMenu = document.getElementById(\"gwMenu\");");
document.writeln("			}");
document.writeln("			if (ie5 || ns6) {");
document.writeln("				var gChatMenu = document.getElementById(\"gChatMenu\");");
document.writeln("			}");
document.writeln("    	<\/script>")
document.writeln("	<\/body>");
document.writeln("<\/html>");
document.writeln("");