﻿// JScript 文件

// JScript 文件
   
            function CountLocation(sender)
            {
                var iLocation=new Array();
                iLocation[0]=ConvertToFloat(sender.offsetTop);
                iLocation[1]=ConvertToFloat(sender.offsetLeft);
                var parentNode=sender.offsetParent;
                iLocation[0]+=ConvertToFloat(parentNode.offsetTop);
                iLocation[1]+=ConvertToFloat(parentNode.offsetLeft);
                while(parentNode=parentNode.offsetParent)
                {
                    iLocation[0]+=ConvertToFloat(parentNode.offsetTop);
                    iLocation[1]+=ConvertToFloat(parentNode.offsetLeft);
                }
                return iLocation;
            }
            function ConvertToFloat(str)
            {
                var f= parseFloat(str)
                if(isNaN(f))
                    return 0;
                else
                    return f;
            }
            
            
            function getlist(a,sender) 
            { 
                try{
                var keyword = a;
                StockList.showBind2(keyword,
                function(result)
                {
                    if(result.value!=""||result.value!=null)
                        {
                        document.getElementById("div1").innerHTML=result.value;
                        var iL= CountLocation(sender);            
                        document.getElementById("eMeng").style.top=(iL[0]+ConvertToFloat(sender.offsetHeight)-5)+"px";
                        document.getElementById("eMeng").style.left=iL[1]+"px"; 
                        document.getElementById("eMeng").style.visibility="visible"; 
                        }
                }
                );
    
            } 
            catch(e){} 
            } 
            function closeDiv() 
            {
                    document.getElementById('eMeng').style.visibility='hidden';
            } 
            function showDiv(){
                document.getElementById("eMeng").style.visibility="visible"; 
            }
