b=navigator.appName
addScroll = false;
var off=0;
var txt="";
var pX=0;
var pY=0;

document.onmousemove = mouseMove;

function ML()
{
   doIt=false;
   if (document.all['ToolTip'].style.visibility=="hidden") 
   {
      doIt=true;
   }
   if (doIt!=false)
   {	
	   args=ML.arguments;
	   ttl=args[0];
	   txt=args[1];
       img=args[2];
doc = '<table width="230" height="55" border="0" cellpadding="0" cellspacing="1" bgcolor="#74726E">'
+'  <tr>'
+'    <td bgcolor="#ECEBE7"><table width="230" height="54" border="0" cellpadding="0" cellspacing="0">'
+'        <tr> '
+'          <td height="27" background="/command/images/icon/ml_tip_bg.gif" nowrap><img src="' + img + '" width="36" height="27" align="absmiddle">&nbsp;<font color="#000000">当前功能：</font><font color="#ff0000">' + ttl + '</font>&nbsp;&nbsp;</td>'
+'        </tr>'
+'        <tr> '
+'          <td height="1" align="center" bgcolor="#E4E1DC"><table width="98%" border="0" cellspacing="0" cellpadding="0">'
+'              <tr> '
+'                <td height="1" bgcolor="#808080"></td>'
+'              </tr>'
+'            </table></td>'
+'        </tr>'
+'        <tr> '
+'          <td height="26" bgcolor="#FFFFFF" nowrap>&nbsp;<font size="3"><font color="#000000">请</font><font color="#ff0000"><strong>双击</strong></font><font color="#000000">鼠标管理当前内容！</font></font>&nbsp;&nbsp;</td>'
+'        </tr>'
+'      </table></td>'
+'  </tr>'
+'</table>';

	    document.all['ToolTip'].innerHTML=doc;
		
	    PopTip();
	}
}

function mouseMove(evn) 
{
	pX=event.x-125;
	pY=event.y;
	if (document.all['ToolTip'].style.visibility=='visible') 
    {
       PopTip();
    }

}

//定义位置
function PopTip()
{   
    theLayer = eval('document.all[\'ToolTip\']');
    var docBody=document.body;

	if (theLayer)
	{
		pX=event.x;
		pY=event.y; 
        var wBody=docBody.clientWidth+docBody.scrollLeft;
        var hBody=docBody.clientHeight+docBody.scrollTop;
        var wMenu=theLayer.offsetWidth;
        var hMenu=theLayer.offsetHeight;

        x = pX + docBody.scrollLeft;
        x -= docBody.leftMargin;
        x = (x+wMenu+10>wBody)?(wBody-wMenu+parseFloat(docBody.rightMargin)-15):(x+8)
        y = pY + docBody.scrollTop;
        y -= docBody.topMargin;
        y = (y+hMenu+5>hBody)?(hBody-hMenu-docBody.bottomMargin):(y+8);
		//if(y+hMenu+5<hBody)
		//{
			//alert(hBody +"+"+ hMenu +"+"+ docBody.bottomMargin )
				//alert(pY)
		//}
		
		theLayer.style.pixelLeft=x;
		theLayer.style.pixelTop=y;		
		theLayer.style.visibility='visible';
	}
}

function HideTip()
{
	document.all['ToolTip'].style.visibility='hidden'; 
}

//弹出新窗口
function window_open(url,name,width,height,top,left) 
{
     var docBody=parent.leftFrame.document.body;
	 var menuHeight = screen.height - parent.top.document.body.clientHeight;
	 //var left = parent.leftFrame.document.body.clientWidth+docBody.scrollLeft;
	 //var top = menuHeight - 64;
	 //var width = parent.mainFrame.document.body.clientWidth;
	 //var height = parent.mainFrame.document.body.clientHeight -50; 
	 var left = 100;
	 var top = 60;
	 var width = 840;
	 var height = 550; 

var newwin = window.open(url,name,
'location=0,resizable=1,status=0,titlebar=1,directories=0,toolbar=0,menubar=0,scrollbars=no,status=1,width='+width+',height='+height+',top='+top+',left='+left);
    newwin.focus();
    return;
}

//新闻弹出新窗口
function news_open(url,name,width,height,top,left) 
{
     //var docBody=parent.leftFrame.document.body;
	 //var menuHeight = screen.height - parent.top.document.body.clientHeight;
	 //var left = parent.leftFrame.document.body.clientWidth+docBody.scrollLeft;
	 //var top = menuHeight - 64;
	 //var width = parent.mainFrame.document.body.clientWidth;
	 //var height = parent.mainFrame.document.body.clientHeight -50; 
	 var left = 100;
	 var top = 60;
	 var width = 600;
	 var height = 450; 

var newwin = window.open(url,name,
'location=0,resizable=1,status=0,titlebar=1,directories=0,toolbar=0,menubar=0,scrollbars=no,status=1,width='+width+',height='+height+',top='+top+',left='+left);
    newwin.focus();
    return;
}


//新闻弹出新窗口
function news_open(url,name,width,height,top,left) 
{    
	 var left = 100;
	 var top = 60;
	 var width = 600;
	 var height = 450; 

	var newwin = window.open(url,name,'location=0,resizable=1,status=0,titlebar=1,directories=0,toolbar=0,menubar=0,scrollbars=yes,status=1,width='+width+',height='+height+',top='+top+',left='+left);
    newwin.focus();
    return;
}

//产品弹出新窗口
function produce_open(url,name,width,height,top,left) 
{    
	 var left = 100;
	 var top = 60;
	 var width = 600;
	 var height = 450; 

	var newwin = window.open(url,name,'location=0,resizable=1,status=0,titlebar=1,directories=0,toolbar=0,menubar=0,scrollbars=yes,status=1,width='+width+',height='+height+',top='+top+',left='+left);
    newwin.focus();
    return;
}
