  var oRelationDiv = null;
  var oBodyDiv     = null;
  var oTable       = null;
  var oContentDiv  = null;
  
  function fnShowRelationCall()
  {
  	if(oRelationDiv.style.display != "")
  	{
		oRelationDiv.style.display = "";
	}
  }
  function _ShowRelation(strHTML)
  {
	if(oRelationDiv == null)
	{
		oRelationDiv = document.createElement("div");
		oRelationDiv.style.display  = 'none';
		oRelationDiv.style.position = "absolute";
		oRelationDiv.style.left     = "0px";
		oRelationDiv.style.top      = "0px";
		oRelationDiv.style.width    = "262px"
		oRelationDiv.style.height   = "20px";
		oTable = document.createElement("table");
		oTable.style.width       = '100%';
		oTable.style.borderWidth ='0';
		oTable.cellpadding       ='3';
		oTable.cellspacing       ='1';
		oTable.appendChild(document.createElement("tbody"));
		var root = oTable.tBodies[0];
		var oTr = document.createElement("tr");
		var oTd = document.createElement("td");
		oTr.appendChild(oTd);
		root.appendChild(oTr);
		oRelationDiv.appendChild(oTable);
		document.body.appendChild(oRelationDiv);
		var oBorderDiv = document.createElement("div");
		oBorderDiv.style.paddingTop    = "20px";
		oBorderDiv.style.paddingBottom = "20px";
		oBorderDiv.style.paddingLeft   = "20px";
		oBorderDiv.style.paddingRight  = "20px";
		oBorderDiv.style.width         = "100%";
		oContentDiv = document.createElement("div");
		oContentDiv.style.styleFloat      = "left";
		oContentDiv.style.borderWidth     = "1px";
		oContentDiv.style.borderStyle     = "solid";
		oContentDiv.style.borderColor     = "#A2AFD1";
		oContentDiv.style.width           = "100%";
		oContentDiv.style.backgroundColor = "#ffffff";
		var oHeadDiv   = document.createElement("div");
		oHeadDiv.style.styleFloat      = "left";
		oHeadDiv.style.height = "20px";
		oHeadDiv.style.width  = "100%";
		oHeadDiv.style.backgroundImage = "url(/images/bkg_top_01.gif)";
		oHeadDiv.style.paddingTop      = "3px";
		oHeadDiv.innerHTML = "&nbsp;相关信息";
		oContentDiv.appendChild(oHeadDiv);
		oBodyDiv = document.createElement("div");
		oContentDiv.appendChild(oBodyDiv);
		var oBottomDiv = document.createElement("div");
		oBottomDiv.style.height = "20px";
		oBottomDiv.style.styleFloat = "left";
		oBottomDiv.style.width  = "100%";
		oBottomDiv.style.backgroundImage = "url(/images/bkg_top_03.gif)";
		oContentDiv.appendChild(oBottomDiv);
		oBorderDiv.appendChild(oContentDiv);
		oContentDiv.style.height = oTable.clientHeight.toString() + "px";
		oTd.appendChild(oBorderDiv);
		AttachEvent(oTable, "mouseover", fnShowRelationCall);
		AttachEvent(oTable, "mouseout",  _DisabledRelation);
	}
	if(oRelationDiv.style.display == "")
	{
		//return;
	}
	oBodyDiv.innerHTML         = strHTML;
	//oBorderDiv.style.height   = (oTable.clientHeight - 66).toString() + "px";
	oRelationDiv.style.display = "";
	var tempx;
	var tempy;
	var e = null;
	if(window.event)
	{
		e = window.event;
	}
	else
	{
		e = fnSearchEvent();
	}
	if(e.pageX)
	{
		tempx = e.pageX;
		tempy = e.pageY;
	}
	else
	{
		tempx = e.clientX;
		tempy = e.clientY;
	}
	/*
	if((tempy + oTable.clientHeight - 10 + 4) > document.body.clientHeight)
	{
		tempy = tempy - oTable.clientHeight + 10 - 4;
		if((tempy + oTable.clientHeight + 4) > document.body.clientHeight)
		{
			tempy = document.body.clientHeight - oTable.clientHeight - 4;
		}
	}
	else
	{
		tempy -= 8;
	}
	*/
	if((tempy - oTable.clientHeight + 6) > 0)
	{
		tempy = tempy - oTable.clientHeight + 6;
	}
	else
	{
		tempy -= 8;
	}
	
	if((tempx + oTable.clientWidth - 10 + 4) > document.body.clientWidth)
	{
		tempx = tempx - oTable.clientWidth - 4 + 10;
		if((tempx + oTable.clientWidth + 4) > document.body.clientWidth)
		{
			tempx = document.body.clientWidth - oTable.clientWidth - 4;
		}
	}
	else
	{
		tempx -= 8;
	}
	if(window.ActiveXObject)
	{
		oRelationDiv.style.top  = (document.body.scrollTop  + tempy).toString() + "px";
		oRelationDiv.style.left = (document.body.scrollLeft + tempx).toString() + "px";
	}
	else
	{
		oRelationDiv.style.top  = (tempy).toString() + "px";
		oRelationDiv.style.left = (tempx).toString() + "px";
	}
  }
  function _DisabledRelation()
  {
	if(oRelationDiv != null)
	{
		oRelationDiv.style.display = "none";
	}
  }
  function ShowKey(KeyName)
	{	
		var InParam = new ParamClass();
		InParam.SetValue("Name",KeyName);
		var sResult = Call("GetKeyInnerHTML", InParam, "得到失败", "/transfer.aspx");	
		_ShowRelation(sResult);
	}
	
	function GetXML()
	{	
		if(JsKey == "")
		{
			return ;
		}
		if(JSid < 144380 )
		{
			return ;
		}
		var Fields = JsKey.split(",");	
		var ttContent = document.getElementById('ContentReplace').innerHTML;
		var tc = 0;
		for(var ikey=0;ikey < Fields.length; ikey++)
		{	
			var IContent = '' ; 
			if(Fields[ikey] != '')
			{
		IContent = ttContent.replace(Fields[ikey],'<a  class=RelationCss  style="font-size:14px;cursor:hand;" onmouseout="_DisabledRelation();" onMouseOver=ShowKey("'+Fields[ikey]+'") >' + Fields[ikey]+ '</a>');
			ttContent  = IContent ; 
			
			}
		}
		document.getElementById('ContentReplace').innerHTML = ttContent;
	}
function LookCount()
	{
		var InParam = new ParamClass();
		InParam.SetValue("Sid", JSid);
		Call("NewLookCount", InParam, "error", "/transfer.aspx");
	}