// JScript 文件
function ShowBalance()
{
spot = document.getElementById('txtSpot');
if(!spot.div)
{
spot.div = document.createElement("div");
spot.div.className = "treeDiv";
spot.div.style.width = "150px";
spot.div.style.position = "absolute";
spot.div.style.zIndex = 101;
spot.parentNode.appendChild(spot.div);
var textPos = RicoUtil.toDocumentPosition(spot);
spot.div.style.top = (textPos.y + 15) + "px";
spot.div.style.left = textPos.x + "px";
}
spot.div.innerHTML = "读取中... ...";
spot.div.style.display = "block";
var data;
data = '<?xml version="1.0" encoding="utf-8" ?>';
data = data + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
data = data + '<soap:Body>';
data = data + '<GetBalance xmlns="http://tempuri.org/">';
data = data + '<id>'+document.getElementById('txtID').value+'</id>';
data = data + '</GetBalance>';
data = data + '</soap:Body>';
data = data + '</soap:Envelope>';
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
var URL="/WebService.asmx?op=GetBalance";
xmlhttp.Open("POST",URL, false);
xmlhttp.SetRequestHeader ("Content-Type","text/xml; charset=gb2312");
xmlhttp.SetRequestHeader ("SOAPAction","http://tempuri.org/GetBalance");
xmlhttp.Send(data);
var doc = xmlhttp.responseText;
var str=doc.replace("您的余额为:","您的余额为:<font style='color:#FF0000'>").replace("元","元<br/>").replace("元","元</font>");
spot.div.innerHTML=str.replace("元","元</font>");
}
function HideBalance()
{
spot = document.getElementById('txtSpot');
if(spot.div)
spot.div.style.display = "none";
}