<HTML><HEAD><TITLE>mouse-menu</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 5.50.4916.2300" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<STYLE>.menutable {
BORDER-RIGHT: #307ce8 1px solid; BORDER-TOP: #94bcf3 1px solid; FONT-SIZE: 12px; Z-INDEX: 100; BORDER-LEFT: #307ce8 5px solid; BORDER-BOTTOM: #307ce8 1px solid; POSITION: absolute; BACKGROUND-COLOR: #ffffff
}
.menutrin {
CURSOR: hand; COLOR: #ffffff; BACKGROUND-COLOR: #1a71e6
}
.menutrout {
CURSOR: hand; COLOR: #000000
}
.menutd0 {
WIDTH: 28px; HEIGHT: 25px; TEXT-ALIGN: center; 改变这个修改菜单高度---:
}
.menutd1 {
WIDTH: 46px; FONT-FAMILY: Webdings; TEXT-ALIGN: right
}
.linktd1 {
WIDTH: 46px
}
.menutd2 {
WIDTH: 4px
}
.menuhr {
BORDER-RIGHT: #307ce8 1px inset; BORDER-TOP: #307ce8 1px inset; BORDER-LEFT: #307ce8 1px inset; BORDER-BOTTOM: #307ce8 1px inset
}
</STYLE>
<BGSOUND id=theBS src="" loop=0></HEAD>
<BODY style="FONT-SIZE: 10pt" bgColor=#eaf5fd>
<SCRIPT>
<!----
/*-----------------------------------------------------------
鼠标右键菜单 1.0 Designed By Stroll e-mail: csy-163@163.com
--------------------------------------------------------------*/
//--------------- 有关数据 -----------------//
var IconList = new Array(); // icon图片 集合, 下标从 1 开始
IconList[1] = new Image();
IconList[1].src = "icon/sub.gif";
//---------------- 检测变量 菜单的显示隐藏就靠它了!!! ------------------//
var JustMenuID = "";
var SubMenuList = new Array();
var NowSubMenu = "";
var mouseCanSound = true; //--------------------------- 声音开关 ------ 声音开关 ------------------//
//------------- 构建 主菜单 对象 -------------//
function MouseMenu(objName)
{
this.id = "Menu_"+objName;
this.obj = objName;
this.length = 0;
this.addMenu = addMenu;
this.addLink = addLink;
this.addHR = addHR;
JustMenuID = this.id;
document.body.insertAdjacentHTML('beforeEnd','<table id="'+this.id+'" border="0" cellspacing="0" cellpadding="0" style="top: 0; left: 0; display: none;" class="menutable" onmousedown=event.cancelBubble=true; onmouseup=event.cancelBubble=true></table>');
}
//----------- 构建 子菜单 对象 -------------//
function SubMenu(objName,objID)
{
this.obj = objName;
this.id = objID;
this.addMenu = addMenu;
this.addLink = addLink;
this.addHR = addHR;
this.length = 0;
}
//-------------- 生成 菜单 makeMenu 方法 -----------//
function makeMenu(subID,oldID,word,icon,url,target,thetitle)
{
var thelink = '';
if(icon&&icon!="")
{
icon = '<img border="0" src="'+IconList[icon].src+'">';
}
else
{
icon = '';
}
if(!thetitle||thetitle=="")
{
thetitle = '';
}
if(url&&url!="")
{
thelink += '<a href="'+url+'" ';
if(target&&target!="")
{
thelink += ' ';
thelink += 'target="'+target+'" '
}
thelink += '></a>';
}
var Oobj = document.getElementById(oldID);
/*--------------------------------------------- 菜单html样式
<tr class="menutrout" id="trMenu_one_0" title="I am title">
<td class="menutd0"><img src="icon/sub.gif" border="0" width="16" height="16"></td>
<td><a href="javascript:alert('I am menu');" target="_self"></a><nobr>菜单一</nobr></td>
<td class="menutd1">4</td>
<td class="menutd2"> </td>
</tr>
--------------------------------------------------*/
Oobj.insertRow();
with(Oobj.rows(Oobj.rows.length-1))
{
id = "tr"+subID;
className = "menutrout";
title = thetitle;
}
eventObj = "tr"+subID;
eval(eventObj+'.attachEvent("onmouseover",MtrOver('+eventObj+'))');
eval(eventObj+'.attachEvent("onclick",MtrClick('+eventObj+'))');
var trObj = eval(eventObj);
for(i=0;i<4;i++)
{
trObj.insertCell();
}
with(Oobj.rows(Oobj.rows.length-1))
{
cells(0).className = "menutd0";
cells(0).innerHTML = icon;
cells(1).innerHTML = thelink+'<nobr>'+word+'</nobr>';
cells(2).className = "menutd1";
cells(2).innerHTML = "4";
cells(3).className = "menutd2";
cells(3).innerText = " ";
}
document.body.insertAdjacentHTML('beforeEnd','<table id="'+subID+'" border="0" cellspacing="0" cellpadding="0" style="top: 0; left: 0; display: none" class="menutable" onmousedown=event.cancelBubble=true; onmouseup=event.cancelBubble=true></table>');
}
//---------------- 生成连接 makeLink 方法 ------------//
function makeLink(subID,oldID,word,icon,url,target,thetitle)
{
var thelink = '';
if(icon&&icon!="")
{
icon = '<img border="0" src="'+IconList[icon].src+'">';
}
else
{
icon = '';
}
if(!thetitle||thetitle=="")
{
thetitle = '';
}
if(url&&url!="")
{
thelink += '<a href="'+url+'" ';
if(target&&target!="")
{
thelink += ' ';
thelink += 'target="'+target+'" '
}
thelink += '></a>';
}
var Oobj = document.getElementById(oldID);
/*--------------------------------------------- 连接html样式
<tr class="menutrout" id="trMenu_one_0" title="I am title">
<td class="menutd0"><img src="icon/sub.gif" border="0" width="16" height="16"></td>
<td><a href="javascript:alert('I am link');" target="_self"></a><nobr>连接一</nobr></td>
<td class="linktd1"></td>
<td class="menutd2"> </td>
</tr>
--------------------------------------------------*/
Oobj.insertRow();
with(Oobj.rows(Oobj.rows.length-1))
{
id = "tr"+subID;
className = "menutrout";
title = thetitle;
}
eventObj = "tr"+subID;
eval(eventObj+'.attachEvent("onmouseover",LtrOver('+eventObj+'))');
eval(eventObj+'.attachEvent("onmouseout",LtrOut('+eventObj+'))');
eval(eventObj+'.attachEvent("onclick",MtrClick('+eventObj+'))');
var trObj = eval(eventObj);
for(i=0;i<4;i++)
{
trObj.insertCell();
}
with(Oobj.rows(Oobj.rows.length-1))
{
cells(0).className = "menutd0";
cells(0).innerHTML = icon;
cells(1).innerHTML = thelink+'<nobr>'+word+'</nobr>';
cells(2).className = "linktd1";
cells(2).innerText = " ";
cells(3).className = "menutd2";
cells(3).innerText = " ";
}
}
//-------------- 菜单对象 addMenu 方法 ------------//
function addMenu(word,icon,url,target,title)
{
var subID = this.id + "_" + this.length;
var subObj = this.obj+"["+this.length+"]";
var oldID = this.id;
eval(subObj+"= new SubMenu('"+subObj+"','"+subID+"')");
makeMenu(subID,oldID,word,icon,url,target,title);
this.length++;
}
//------------- 菜单对象 addLink 方法 -------------//
function addLink(word,icon,url,target,title)
{
var subID = this.id + "_" + this.length;
var oldID = this.id;
makeLink(subID,oldID,word,icon,url,target,title);
this.length++;
}
//------------ 菜单对象 addHR 方法 -----------------//
function addHR()
{
var oldID = this.id;
var Oobj = document.getElementById(oldID);
Oobj.insertRow();
/*------------------------------------------
<tr>
<td colspan="4">
<hr class="menuhr" size="1" width="95%">
</td>
</tr>
--------------------------------------------*/
Oobj.rows(Oobj.rows.length-1).insertCell();
with(Oobj.rows(Oobj.rows.length-1))
{
cells(0).colSpan= 4;
cells(0).insertAdjacentHTML('beforeEnd','<hr class="menuhr" size="1" width="95%">');
}
}
//--------- MtrOver(obj)-------------------//
function MtrOver(obj)
{
return sub_over;
function sub_over()
{
var sonid = obj.id.substring(2,obj.id.length);
var topobj = obj.parentElement.parentElement;
NowSubMenu = topobj.id;
HideMenu(1);
SubMenuList[returnIndex(NowSubMenu)] = NowSubMenu;
ShowTheMenu(sonid,MPreturn(sonid))
SubMenuList[returnIndex(obj.id)] = sonid;
if(topobj.oldTR)
{
eval(topobj.oldTR+'.