透明菜单
var preloaded = [];
// here is a lame preloading script i am putting in just for demonstration
for (var i = 1; i <= 5; i++) {
preloaded[i] = [loadImage(i + "-0.gif"), loadImage(i + "-1.gif")];
}
function init() {
// whatever stuff you need to do onload goes here.
//==========================================================================================
// if supported, initialize mtdropdowns
//==========================================================================================
// Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
// This is better than server-side checking because it will also catch browsers which would
// normally support the menus but have javascript disabled.
//
// If supported, call initialize() and then hook whatever image rollover code you need to do
// to the .onactivate and .ondeactivate events for each menu.
//==========================================================================================
if (mtDropDown.isSupported()) {
mtDropDown.initialize();
// hook all the image swapping of the main toolbar to menu activation/deactivation
// instead of simple rollover to get the effect where the button stays hightlit until
// the menu is closed.
/* menu1.onactivate = function() { swapImage("button1", preloaded[1][1].src) };
menu1.ondeactivate = function() { swapImage("button1", preloaded[1][0].src) };
menu2.onactivate = function() { swapImage("button2", preloaded[2][1].src) };
menu2.ondeactivate = function() { swapImage("button2", preloaded[2][0].src) };
menu3.onactivate = function() { swapImage("button3", preloaded[3][1].src) };
menu3.ondeactivate = function() { swapImage("button3", preloaded[3][0].src) };
menu4.onactivate = function() { swapImage("button4", preloaded[4][1].src) };
menu4.ondeactivate = function() { swapImage("button4", preloaded[4][0].src) };
menu5.onactivate = function() { swapImage("button5", preloaded[5][1].src) };
menu5.ondeactivate = function() { swapImage("button5", preloaded[5][0].src) };
*/
}
}
// this is a crappy example preloader. Use whichever one you want.
function loadImage(sFilename) {
var img = new Image();
img.src ="/_images/nav/" + sFilename;
return img;
}
// this is a crappy example image swapper. Use whichever you want.
function swapImage(imgName, sFilename) {
document.images[imgName].src = sFilename;
}
//mt_dropdownC_c.js
/* =================================================================================================
* (mt) Media Temple DropDown
*
* Javascript library responsible for the semi-transparent multi-level dropdown menus on the
* (mt) Media Temple website.
*
* Copyright 2003, Aaron Boodman (aaron@youngpup.net)
* =================================================================================================
* "Can I use this?"
*
* Use of this library is governed by the Creative Commons Attribution-NonCommercial-ShareAlike 1.0
* License. You can check it out at: http://creativecommons.org/licenses/by-nc-sa/1.0
*
* Basically:
* - You may copy, distribute, and eat this code as you wish. But you must give me credit for
* writing it. You may not misrepresent yourself as the author of this code.
* - You may not use this code in a commercial setting without prior consent from me.
* - If you make changes to this code, you must make the changes available under a license like
* this one.
* =================================================================================================
* "It's kinda hard to read, though"
*
* The uncompressed, commented version of this script can be found at:
* http://youngpup.net/code/mtDropDowns
* ============================================================================================== */
mtDropDown.spacerGif = "images/x.gif";
mtDropDown.dingbatOn = "images/expand-1.gif";
mtDropDown.dingbatOff = "images/expand-0.gif";
mtDropDown.dingbatSize = 14;
mtDropDown.menuPadding = 1;
mtDropDown.itemPadding = 4;
mtDropDown.shadowSize = 2;
mtDropDown.shadowOffset = 3;
mtDropDown.shadowColor = "#646464";
mtDropDown.shadowPng = "/_images/grey-40.png";
mtDropDown.backgroundColor = "#f5f5f5";
mtDropDown.backgroundPng = "/_images/white-90.png";
mtDropDown.hideDelay = 1000;
mtDropDown.slideTime = 200;
mtDropDown.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};
mtDropDown.direction = {down:1,right:2};
mtDropDown.registry = [];
mtDropDown._maxZ = 100;
mtDropDown.isSupported = function() {
if (typeof mtDropDown.isSupported.r == "boolean")
return mtDropDown.isSupported.r;
var ua = navigator.userAgent.toLowerCase();
var an = navigator.appName;
var r = false;
if (ua.indexOf("gecko") > -1) r = true;
else if (an == "Microsoft Internet Explorer") {
if (document.getElementById) r = true;
}
mtDropDown.isSupported.r = r;
return r;
}
mtDropDown.initialize = function() {
for (var i = 0, menu = null; menu = this.registry[i]; i++) {
menu.initialize();
}
}
mtDropDown.renderAll = function() {
var aMenuHtml = [];
for (var i = 0, menu = null; menu = this.registry[i]; i++) {
aMenuHtml[i] = menu.toString();
}
document.write(aMenuHtml.join(""));
}
function mtDropDown(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) {
this.addItem = addItem;
this.addMenu = addMenu;
this.toString = toString;
this.initialize = initialize;
this.isOpen = false;
this.show = show;
this.hide = hide;
this.items = [];
this.onactivate = new Function();
this.ondeactivate = new Function();
this.onmouseover = new Function();
this.onqueue = new Function();
this.index = mtDropDown.registry.length;
mtDropDown.registry[this.index] = this;
var id = "mtDropDown" + this.index;
var contentHeight = null;
var contentWidth = null;
var childMenuSet = null;
var animating = false;
var childMenus = [];
var slideAccel = -1;
var elmCache = null;
var ready = false;
var _this = this;
var a = null;
var pos = iDirection == mtDropDown.direction.down ? "top" : "left";
var dim = null;
function addItem(sText, sUrl) {
var item = new mtDropDownItem(sText, sUrl, this);
item._index = this.items.length;
this.items[item._index] = item;
}
function addMenu(oMenuItem) {
if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here");
if (childMenuSet == null) childMenuSet = new mtDropDownSet(mtDropDown.direction.right, -5, 2, mtDropDown.reference.topRight); //子菜单
var m = childMenuSet.addMenu(oMenuItem);
childMenus[oMenuItem._index] = m;
m.onmouseover = child_mouseover;
m.ondeactivate = child_deactivate;
m.onqueue = child_queue;
return m;
}
function initialize() {
initCache();
initEvents();
initSize();
ready = true;
}
function show() {
if (ready) {
_this.isOpen = true;
animating = true;
setContainerPos();
elmCache["clip"].style.visibility = "visible";
elmCache["clip"].style.zIndex = mtDropDown._maxZ++;
slideStart();
_this.onactivate();
}
}
function hide() {
if (ready) {
_this.isOpen = false;
animating = true;
for (var i = 0, item = null; item = elmCache.item[i]; i++)
dehighlight(item);
if (childMenuSet) childMenuSet.hide();
slideStart();
_this.ondeactivate();
}
}
function setContainerPos() {
var sub = oActuator.constructor == mtDropDownItem;
var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator;
var el = act;
var x = 0;
var y = 0;
var minX = 0;
var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width);
var minY = 0;
var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height);
while (sub ? el.parentNode.className.indexOf("mtDropdownMenu") == -1 : el.offsetParent) {
x += el.offsetLeft;
y += el.offsetTop;
if (el.scrollLeft) x -= el.scrollLeft;
if (el.scrollTop) y -= el.scrollTop;
el = el.offsetParent;
}
if (oActuator.constructor == mtDropDownItem) {
x += parseInt(el.parentNode.style.left);
y += parseInt(el.parentNode.style.top);
}
switch (iReferencePoint) {
case mtDropDown.reference.topLeft:
break;
case mtDropDown.reference.topRight:
x += act.offsetWidth;
break;
case mtDropDown.reference.bottomLeft:
y += act.offsetHeight;
break;
case mtDropDown.reference.bottomRight:
x += act.offsetWidth;
y += act.offsetHeight;
break;
}
x += iLeft;
y += iTop;
x = Math.max(Math.min(x, maxX), minX);
y = Math.max(Math.min(y, maxY), minY);
elmCache["clip"].style.left = x + "px";
elmCache["clip"].style.top = y + "px";
}
function slideStart() {
var x0 = parseInt(elmCache["mtcontent"].style[pos]);
var x1 = _this.isOpen ? 0 : -dim;
if (a != null) a.stop();
a = new Accelimation(x0, x1, mtDropDown.slideTime, slideAccel);
a.onframe = slideFrame;
a.onend = slideEnd;
a.start();
}
function slideFrame(x) {
elmCache["mtcontent"].style[pos] = x + "px";
}
function slideEnd() {
if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden";
animating = false;
}
function initSize() {
var ow = elmCache["items"].offsetWidth;
var oh = elmCache["items"].offsetHeight;
var ua = navigator.userAgent.toLowerCase();
elmCache["clip"].style.width = ow + mtDropDown.shadowSize + 2 + "px";
elmCache["clip"].style.height = oh + mtDropDown.shadowSize + 2 + "px";
elmCache["mtcontent"].style.width = ow + mtDropDown.shadowSize + "px";
elmCache["mtcontent"].style.height = oh + mtDropDown.shadowSize + "px";
contentHeight = oh + mtDropDown.shadowSize;
contentWidth = ow + mtDropDown.shadowSize;
dim = iDirection == mtDropDown.direction.down ? contentHeight : contentWidth;
elmCache["mtcontent"].style[pos] = -dim - mtDropDown.shadowSize + "px";
elmCache["clip"].style.visibility = "hidden";
if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) {
elmCache["background"].style.width = ow + "px";
elmCache["background"].style.height = oh + "px";
elmCache["background"].style.backgroundColor = mtDropDown.backgroundColor;
elmCache["shadowRight"].style.left = ow + "px";
elmCache["shadowRight"].style.height = oh - (mtDropDown.shadowOffset - mtDropDown.shadowSize) + "px";
elmCache["shadowRight"].style.backgroundColor = mtDropDown.shadowColor;
elmCache["shadowBottom"].style.top = oh + "px";
elmCache["shadowBottom"].style.width = ow - mtDropDown.shadowOffset + "px";
elmCache["shadowBottom"].style.backgroundColor = mtDropDown.shadowColor;
}
else {
elmCache["background"].firstChild.src = mtDropDown.backgroundPng;
elmCache["background"].firstChild.width = ow;
elmCache["background"].firstChild.height = oh;
elmCache["shadowRight"].firstChild.src = mtDropDown.shadowPng;
elmCache["shadowRight"].style.left = ow + "px";
elmCache["shadowRight"].firstChild.width = mtDropDown.shadowSize;
elmCache["shadowRight"].firstChild.height = oh - (mtDropDown.shadowOffset - mtDropDown.shadowSize);
elmCache["shadowBottom"].firstChild.src = mtDropDown.shadowPng;
elmCache["shadowBottom"].style.top = oh + "px";
elmCache["shadowBottom"].firstChild.height = mtDropDown.shadowSize;
elmCache["shadowBottom"].firstChild.width = ow - mtDropDown.shadowOffset;
}
}
function initCache() {
var menu = document.getElementById(id);
var all = menu.all ? menu.all : menu.getElementsByTagName("*");
elmCache = {};
elmCache["clip"] = menu;
elmCache["item"] = [];
for (var i = 0, elm = null; elm = all[i]; i++) {
switch (elm.className) {
case "items":
case "mtcontent":
case "background":
case "shadowRight":
case "shadowBottom":
elmCache[elm.className] = elm;
break;
case "item":
elm._index = elmCache["item"].length;
elmCache["item"][elm._index] = elm;
break;
}
}
_this.elmCache = elmCache;
}
function initEvents() {
for (var i = 0, item = null; item = elmCache.item[i]; i++) {
item.onmouseover = item_mouseover;
item.onmouseout = item_mouseout;
item.onclick = item_click;
}
if (typeof oActuator.tagName != "undefined") {
oActuator.onmouseover = actuator_mouseover;
oActuator.onmouseout = actuator_mouseout;
}
elmCache["mtcontent"].onmouseover = content_mouseover;
elmCache["mtcontent"].onmouseout = content_mouseout;
}
function highlight(oRow) {
oRow.className = "item hover";
if (childMenus[oRow._index])
oRow.lastChild.firstChild.src = mtDropDown.dingbatOn;
}
function dehighlight(oRow) {
oRow.className = "item";
if (childMenus[oRow._index])
oRow.lastChild.firstChild.src = mtDropDown.dingbatOff;
}
function item_mouseover() {
if (!animating) {
highlight(this);
if (childMenus[this._index])
childMenuSet.showMenu(childMenus[this._index]);
else if (childMenuSet) childMenuSet.hide();
}
}
function item_mouseout() {
if (!animating) {
if (childMenus[this._index])
childMenuSet.hideMenu(childMenus[this._index]);
else
dehighlight(this);
}
}
function item_click() {
if (!animating) {
if (_this.items[this._index].url)
location.href = _this.items[this._index].url;
}
}
function actuator_mouseover() {
parentMenuSet.showMenu(_this);
}
function actuator_mouseout() {
parentMenuSet.hideMenu(_this);
}
function content_mouseover() {
if (!animating) {
parentMenuSet.showMenu(_this);
_this.onmouseover();
}
}
function content_mouseout() {
if (!animating) {
parentMenuSet.hideMenu(_this);
}
}
function child_mouseover() {
if (!animating) {
parentMenuSet.showMenu(_this);
}
}
function child_deactivate() {
for (var i = 0; i < childMenus.length; i++) {
if (childMenus[i] == this) {
dehighlight(elmCache["item"][i]);
break;
}
}
}
function child_queue() {
parentMenuSet.hideMenu(_this);
}
function toString() {
var aHtml = [];
var sClassName = "mtDropdownMenu" + (oActuator.constructor != mtDropDownItem ? " top" : "");
for (var i = 0, item = null; item = this.items[i]; i++) {
aHtml[i] = item.toString(childMenus[i]);
}
return '<div id="' + id + '" class="' + sClassName + '">' +
'<div class="mtcontent"><table class="items" cellpadding="0" cellspacing="0" border="0">' +
'<tr><td colspan="2"><img src="' + mtDropDown.spacerGif + '" width="1" height="' + mtDropDown.menuPadding + '"></td></tr>' +
aHtml.join('') +
'<tr><td colspan="2"><img src="' + mtDropDown.spacerGif + '" width="1" height="' + mtDropDown.menuPadding + '"></td></tr></table>' +
'<div class="shadowBottom"><img src="' + mtDropDown.spacerGif + '" width="1" height="1"></div>' +
'<div class="shadowRight"><img src="' + mtDropDown.spacerGif + '" width="1" height="1"></div>' +
'<div class="background"><img src="' + mtDropDown.spacerGif + '" width="1" height="1"></div>' +
'</div></div>';
}
}
mtDropDownSet.registry = [];
function mtDropDownSet(iDirection, iLeft, iTop, iReferencePoint) {
this.addMenu = addMenu;
this.showMenu = showMenu;
this.hideMenu = hideMenu;
this.hide = hide;
var menus = [];
var _this = this;
var current = null;
this.index = mtDropDownSet.registry.length;
mtDropDownSet.registry[this.index] = this;
function addMenu(oActuator) {
var m = new mtDropDown(oActuator, iDirection, iLeft, iTop, iReferencePoint, this);
menus[menus.length] = m;
return m;
}
function showMenu(oMenu) {
if (oMenu != current) {
if (current != null) hide(current);
current = oMenu;
oMenu.show();
}
else {
cancelHide(oMenu);
}
}
function hideMenu(oMenu) {
if (current == oMenu && oMenu.isOpen) {
if (!oMenu.hideTimer) scheduleHide(oMenu);
}
}
function scheduleHide(oMenu) {
oMenu.onqueue();
oMenu.hideTimer = window.setTimeout("mtDropDownSet.registry[" + _this.index + "].hide(mtDropDown.registry[" + oMenu.index + "])", mtDropDown.hideDelay);
}
function cancelHide(oMenu) {
if (oMenu.hideTimer) {
window.clearTimeout(oMenu.hideTimer);
oMenu.hideTimer = null;
}
}
function hide(oMenu) {
if (!oMenu && current) oMenu = current;
if (oMenu && current == oMenu && oMenu.isOpen) {
cancelHide(oMenu);
current = null;
oMenu.hideTimer = null;
oMenu.hide();
}
}
}
function mtDropDownItem(sText, sUrl, oParent) {
this.toString = toString;
this.text = sText;
this.url = sUrl;
this.parentMenu = oParent;
function toString(bDingbat) {
var sDingbat = bDingbat ? mtDropDown.dingbatOff : mtDropDown.spacerGif;
var iEdgePadding = mtDropDown.itemPadding + mtDropDown.menuPadding;
var sPaddingLeft = "padding:" + mtDropDown.itemPadding + "px; padding-left:" + iEdgePadding + "px;"
var sPaddingRight = "padding:" + mtDropDown.itemPadding + "px; padding-right:" + iEdgePadding + "px;"
return '<tr class="item"><td nowrap style="' + sPaddingLeft + '">' +
sText + '</td><td width="0" style="' + sPaddingRight + '">' +
'</td></tr>';
}
}
function Accelimation(from, to, time, zip) {
if (typeof zip == "undefined") zip = 0;
if (typeof unit == "undefined") unit = "px";
this.x0 = from;
this.x1 = to;
this.dt = time;
this.zip = -zip;
this.unit = unit;
this.timer = null;
this.onend = new Function();
this.onframe = new Function();
}
Accelimation.prototype.start = function() {
this.t0 = new Date().getTime();
this.t1 = this.t0 + this.dt;
var dx = this.x1 - this.x0;
this.c1 = this.x0 + ((1 + this.zip) * dx / 3);
this.c2 = this.x0 + ((2 + this.zip) * dx / 3);
Accelimation._add(this);
}
Accelimation.prototype.stop = function() {
Accelimation._remove(this);
}
Accelimation.prototype._paint = function(time) {
if (time < this.t1) {
var elapsed = time - this.t0;
this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2));
}
else this._end();
}
Accelimation.prototype._end = function() {
Accelimation._remove(this);
this.onframe(this.x1);
this.onend();
}
Accelimation._add = function(o) {
var index = this.instances.length;
this.instances[index] = o;
if (this.instances.length == 1) {
this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes);
}
}
Accelimation._remove = function(o) {
for (var i = 0; i < this.instances.length; i++) {
if (o == this.instances[i]) {
this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) );
break;
}
}
if (this.instances.length == 0) {
window.clearInterval(this.timerID);
this.timerID = null;
}
}
Accelimation._paintAll = function() {
var now = new Date().getTime();
for (var i = 0; i < this.instances.length; i++) {
this.instances[i]._paint(now);
}
}
Accelimation._B1 = function(t) { return t*t*t }
Accelimation._B2 = function(t) { return 3*t*t*(1-t) }
Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) }
Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) }
Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) {
return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent);
}
Accelimation.instances = [];
Accelimation.targetRes = 10;
Accelimation.timerID = null;
//mt_style.css
UL LI {
LIST-STYLE-IMAGE: url(/_images/hot_topic_bullet.gif)
}
UNKNOWN {
TEXT-DECORATION: none
}
A:hover {
TEXT-DECORATION: underline
}
.list_link {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 10px; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
.matrix {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px
}
.matrix A {
COLOR: #000000
}
.matrix_sub {
BACKGROUND-IMAGE: url(/_images/matrix_sub_bg.gif); BORDER-BOTTOM: #c9c9c9 1px solid; BORDER-LEFT: #c9c9c9 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f3f3f3; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; COLOR: #000000; BORDER-TOP: 0px; BORDER-RIGHT: #c9c9c9 1px solid; PADDING-TOP: 1px
}
.matrix_header {
BACKGROUND-IMAGE: url(/_images/matrix_header_bg.gif); BORDER-BOTTOM: #838383 1px solid; BORDER-LEFT: #c9c9c9 1px solid; PADDING-BOTTOM: 6px; BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 5px; COLOR: #000000; BORDER-TOP: #c9c9c9 1px solid; BORDER-RIGHT: #c9c9c9 1px solid; PADDING-TOP: 6px
}
.matrix_info {
BORDER-BOTTOM: #eae9e9 1px solid; BORDER-LEFT: #c9c9c9 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f7f7f7; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; BORDER-RIGHT: #c9c9c9 1px solid; PADDING-TOP: 4px
}
.matrix_info_header {
BORDER-BOTTOM: #eae9e9 1px solid; BORDER-LEFT: #c9c9c9 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #ebeaea; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; BORDER-TOP: #c9c9c9 1px solid; BORDER-RIGHT: #c9c9c9 1px solid; PADDING-TOP: 4px
}
.matrix_content {
BACKGROUND-COLOR: #ffffff; COLOR: #353535
}
.matrix_left {
BORDER-LEFT: #c9c9c9 1px solid
}
.home_box {
BORDER-LEFT: #d8d8d8 1px solid
}
.mtDropdownMenu {
POSITION: absolute; OVERFLOW: hidden; TOP: -1000px; LEFT: -1000px
}
.mtDropdownMenu .mtcontent {
POSITION: absolute
}
.mtDropdownMenu .items {
Z-INDEX: 2; BORDER-BOTTOM: #999 1px solid; POSITION: relative; BORDER-LEFT: #999 1px solid; BORDER-TOP: #999 1px solid; TOP: 0px; BORDER-RIGHT: #999 1px solid; LEFT: 0px
}
.top .items {
BORDER-TOP: medium none
}
.mtDropdownMenu .item {
BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 10px; BORDER-TOP: medium none; CURSOR: hand; BORDER-RIGHT: medium none; TEXT-DECORATION: none
}
.mtDropdownMenu .background {
Z-INDEX: 1; POSITION: absolute; FILTER: alpha(opacity=85); TOP: 0px; LEFT: 0px; moz-opacity: .8
}
.mtDropdownMenu .shadowRight {
Z-INDEX: 3; POSITION: absolute; FILTER: alpha(opacity=40); WIDTH: 2px; TOP: 3px; moz-opacity: .4
}
.mtDropdownMenu .shadowBottom {
Z-INDEX: 1; POSITION: absolute; FILTER: alpha(opacity=40); HEIGHT: 2px; LEFT: 3px; moz-opacity: .4
}
.mtDropdownMenu .hover {
BACKGROUND: #ffffff; COLOR: #990000
}
.mtDropdownMenu .item IMG {
MARGIN-LEFT: 10px
}
.subtext {
LINE-HEIGHT: 10px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #4a4a4a; FONT-SIZE: 10px
}
.subtext_title {
LINE-HEIGHT: 22px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #000000; FONT-SIZE: 10px; FONT-WEIGHT: bold
}
.BodContent {
LINE-HEIGHT: 16px; PADDING-LEFT: 6px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 12px
}
.BodContent TD {
LINE-HEIGHT: 16px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif; COLOR: #4a4a4a; FONT-SIZE: 12px
}
.BodContent A {
COLOR: #8d1c1c; TEXT-DECORATION: none
}
.content_highlight {
LINE-HEIGHT: 17px; MARGIN-TOP: 10px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif; COLOR: #333333; FONT-SIZE: 12px
}
.headernav {
FONT-FAMILY: verdana, sans-serif; COLOR: #d4d3d3; FONT-SIZE: 10px
}
.headernav A {
FONT-FAMILY: verdana, sans-serif; COLOR: #d4d3d3; FONT-SIZE: 10px
}
.headernav A:hover {
FONT-FAMILY: verdana, sans-serif; COLOR: #d4d3d3; FONT-SIZE: 10px; TEXT-DECORATION: underline
}
.list A {
COLOR: #000000
}
.subadtitle {
LINE-HEIGHT: 18px; FONT-FAMILY: verdana, sans-serif; COLOR: #953637; FONT-SIZE: 10px; FONT-WEIGHT: bold
}
.subad {
LINE-HEIGHT: 12px; PADDING-LEFT: 4px; FONT-FAMILY: verdana, sans-serif; COLOR: #000000; FONT-SIZE: 10px
}
.hottopic A {
LINE-HEIGHT: 16px; FONT-FAMILY: arial, sans-serif; COLOR: #555555; FONT-SIZE: 10px; TEXT-DECORATION: none
}
.hottopic A:hover {
LINE-HEIGHT: 16px; FONT-FAMILY: arial, sans-serif; COLOR: #555555; FONT-SIZE: 10px; TEXT-DECORATION: underline
}
.maintableborder {
}
.maintablebg {
}
.reg {
BACKGROUND-IMAGE: url(/_images/reg_bg.gif); BACKGROUND-REPEAT: no-repeat
}
.navbox {
BACKGROUND-COLOR: #ffffff; WIDTH: 204px; layer-background-color: #FFFFFF
}
.navsub {
BACKGROUND-COLOR: #ffffff; FONT-SIZE: 11px; layer-background-color: #ffffff
}
.navsub A {
PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; COLOR: #666666; TEXT-DECORATION: none; PADDING-TOP: 4px
}
.navsub A:hover {
BACKGROUND-COLOR: #ffffff; COLOR: #990000; TEXT-DECORATION: underline
}
.nav {
PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f1f1f1; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; COLOR: #333333; FONT-SIZE: 11px; PADDING-TOP: 4px; layer-background-color: #F1F1F1
}
.nav A {
BACKGROUND-COLOR: #f1f1f1; COLOR: #000000; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
.nav A:hover {
BACKGROUND-COLOR: #f1f1f1; COLOR: #990000
}
.footer {
LINE-HEIGHT: 17px; FONT-FAMILY: arial, sans-serif; FONT-SIZE: 10px
}
.footer A {
LINE-HEIGHT: 17px; FONT-FAMILY: arial, sans-serif; COLOR: #333333; FONT-SIZE: 10px
}
.footer A:hover {
LINE-HEIGHT: 17px; FONT-FAMILY: arial, sans-serif; COLOR: #ffcc00; FONT-SIZE: 10px
}
#menubar {
BORDER-BOTTOM: #ad5800 1px solid; POSITION: absolute; BORDER-LEFT: #ad5800 1px solid; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: #f9f1c8; PADDING-LEFT: 2px; WIDTH: 450px; PADDING-RIGHT: 2px; BORDER-TOP: #ad5800 1px solid; TOP: 245px; BORDER-RIGHT: #ad5800 1px solid; PADDING-TOP: 2px; LEFT: 35px
}
#menubar A {
BORDER-BOTTOM: #f9f1c8 1px solid; BORDER-LEFT: #f9f1c8 1px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 5px; LETTER-SPACING: 1px; COLOR: #ad5800; BORDER-TOP: #f9f1c8 1px solid; BORDER-RIGHT: #f9f1c8 1px solid; TEXT-DECORATION: none
}
#menubar A.active {
BORDER-BOTTOM-COLOR: #ccc599; BORDER-TOP-COLOR: #ffffff; BORDER-RIGHT-COLOR: #ccc599; BORDER-LEFT-COLOR: #ffffff
}
.menu .options {
BORDER-BOTTOM: #969696 1px solid; POSITION: relative; FILTER: Alpha(Opacity=88, Style=0); BORDER-LEFT: #969696 1px solid; BACKGROUND-COLOR: #ffffff; MARGIN-BOTTOM: 1px; BORDER-TOP: #969696 1px solid; TOP: 541px; MARGIN-RIGHT: 1px; BORDER-RIGHT: #969696 1px solid; LEFT: 1016px; layer-background-color: #FFFFFF
}
.menu A {
PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #333333; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; DISPLAY: block; COLOR: #000000; TEXT-DECORATION: none; PADDING-TOP: 4px
}
.menu A:hover {
BACKGROUND-COLOR: #ffcc00; COLOR: #ffffff
}
#about {
POSITION: absolute; TOP: 200px; LEFT: 5px
}
.subtitle {
LINE-HEIGHT: 25px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif; COLOR: #444444; FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.domain_box {
BORDER-BOTTOM: #a6a6a6 1px solid; BORDER-LEFT: #a6a6a6 1px solid; BACKGROUND-COLOR: #ffffff; WIDTH: 175px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; HEIGHT: 19px; COLOR: #777777; FONT-SIZE: 11px; BORDER-TOP: #a6a6a6 1px solid; BORDER-RIGHT: #a6a6a6 1px solid
}
.login {
BORDER-BOTTOM: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BACKGROUND-COLOR: #e9e9e9; BORDER-TOP: #c4c4c4 1px solid; BORDER-RIGHT: #c4c4c4 1px solid
}
.login INPUT {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; HEIGHT: 22px; COLOR: #666666; FONT-SIZE: 11px
}
.login checkbox {
COLOR: #666666
}
.login TD {
BORDER-BOTTOM: #c4c4c4 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #555555; FONT-SIZE: 11px; BORDER-TOP: #ffffff 1px solid
}
.login .title {
BACKGROUND-COLOR: #d0d0d0
}
.login .title TD {
BORDER-BOTTOM-COLOR: #c4c4c4; BORDER-TOP-COLOR: #ffffff; FONT-WEIGHT: bold
}
HR {
HEIGHT: 1px; COLOR: #dddddd
}
.subtitle-color {
LINE-HEIGHT: 25px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif; COLOR: #8d1c1c; FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.subsubtitle-lighter {
COLOR: #999999
}
.subsubtitle-color {
COLOR: #8d1c1c
}
.notebox {
WIDTH: 100%; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; COLOR: #777777; FONT-SIZE: 11px
}
.contactboxform SELECT {
WIDTH: 215px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; HEIGHT: 22px; COLOR: #666666; FONT-SIZE: 11px; FONT-WEIGHT: bold
}
.contactboxform INPUT {
WIDTH: 215px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; HEIGHT: 22px; COLOR: #666666; FONT-SIZE: 11px
}
.contactboxform TEXTAREA {
WIDTH: 215px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; HEIGHT: 125px; COLOR: #666666; FONT-SIZE: 11px
}
.top {
COLOR: #cccccc; TEXT-DECORATION: none
}
A.top:link {
COLOR: #ffffff; TEXT-DECORATION: none
}
A.top:visited {
COLOR: #ffffff; TEXT-DECORATION: none
}
A.top:active {
COLOR: #ffffff; TEXT-DECORATION: none
}
A.top:hover {
COLOR: #cccccc; TEXT-DECORATION: none
}
.navorderback {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; COLOR: #cccccc; FONT-SIZE: 9px; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
.navorderback A:hover {
COLOR: #8d1c1c; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
.navorderback A:link {
COLOR: #cccccc; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
visited {
COLOR: #cccccc; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
active {
COLOR: #cccccc; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
.app {
BORDER-BOTTOM: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BACKGROUND-COLOR: #e9e9e9; WIDTH: 100%; BORDER-TOP: #c4c4c4 1px solid; BORDER-RIGHT: #c4c4c4 1px solid
}
.app A {
COLOR: #4a4b4b; TEXT-DECORATION: none
}
.app A:hover {
COLOR: #8d1c1c; TEXT-DECORATION: underline
}
LINK {
COLOR: #8d1c1c; TEXT-DECORATION: underline
}
visited {
COLOR: #8d1c1c; TEXT-DECORATION: underline
}
.app TD {
BORDER-BOTTOM: #c4c4c4 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #555555; FONT-SIZE: 11px; BORDER-TOP: #ffffff 1px solid
}
.app .title {
BACKGROUND-COLOR: #d0d0d0
}
.app .title TD {
BORDER-BOTTOM-COLOR: #c4c4c4; BORDER-TOP-COLOR: #ffffff; FONT-WEIGHT: bold
}
.app_highlighted {
BACKGROUND-COLOR: #f4f4f4
}
.btn {
BACKGROUND-IMAGE: url(/_images/button2.gif); BORDER-BOTTOM: 1px outset; BORDER-LEFT: 1px outset; PADDING-BOTTOM: 1px; MARGIN: 0px 0px 0px 1px; PADDING-LEFT: 1px; WIDTH: 50px; PADDING-RIGHT: 1px; FONT-SIZE: 9px; BORDER-TOP: 1px outset; CURSOR: pointer; FONT-WEIGHT: normal; BORDER-RIGHT: 1px outset; PADDING-TOP: 1px; backgroung-image: repeat-x
}
.btn_med {
BACKGROUND-IMAGE: url(/_images/button2.gif); BORDER-BOTTOM: 1px outset; BORDER-LEFT: 1px outset; PADDING-BOTTOM: 1px; MARGIN: 0px 0px 0px 1px; PADDING-LEFT: 1px; WIDTH: 106px; PADDING-RIGHT: 1px; FONT-SIZE: 9px; BORDER-TOP: 1px outset; CURSOR: pointer; FONT-WEIGHT: normal; BORDER-RIGHT: 1px outset; PADDING-TOP: 1px; backgroung-image: repeat-x
}
.btn_wide {
BACKGROUND-IMAGE: url(/_images/button2.gif); BORDER-BOTTOM: 1px outset; BORDER-LEFT: 1px outset; PADDING-BOTTOM: 1px; MARGIN: 0px 0px 0px 1px; PADDING-LEFT: 1px; WIDTH: 150px; PADDING-RIGHT: 1px; FONT-SIZE: 9px; BORDER-TOP: 1px outset; CURSOR: pointer; FONT-WEIGHT: normal; BORDER-RIGHT: 1px outset; PADDING-TOP: 1px; backgroung-image: repeat-x
}
.app_large {
FONT-FAMILY: verdana, sans-serif; COLOR: #000000; FONT-SIZE: 11px; FONT-WEIGHT: bold
}
.app_desc {
COLOR: #656565
}
.error {
BORDER-BOTTOM: #ff0000 2px solid; BORDER-LEFT: #ff0000 2px solid; BACKGROUND-COLOR: #ffdede; WIDTH: 95%; BORDER-TOP: #ff0000 2px solid; BORDER-RIGHT: #ff0000 2px solid
}
.error TD {
FONT-FAMILY: verdana, sans-serif; COLOR: #ff0000; FONT-SIZE: 10px
}
.error .title {
BACKGROUND-COLOR: #ff9393
}
.error .title TD {
FONT-FAMILY: verdana, sans-serif; COLOR: #ffffff; FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.info {
BORDER-BOTTOM: #0000ff 2px solid; BORDER-LEFT: #0000ff 2px solid; BACKGROUND-COLOR: #dedeff; WIDTH: 95%; BORDER-TOP: #0000ff 2px solid; BORDER-RIGHT: #0000ff 2px solid
}
.info TD {
FONT-FAMILY: verdana, sans-serif; COLOR: #0000ff; FONT-SIZE: 10px
}
.info .title {
BACKGROUND-COLOR: #9393ff
}
.info .title TD {
FONT-FAMILY: verdana, sans-serif; COLOR: #ffffff; FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.ordernav {
BACKGROUND-COLOR: #ffffff; FONT-SIZE: 11px; layer-background-color: #ffffff
}
.ordernav A {
BACKGROUND-COLOR: #ffffff; COLOR: #666666; TEXT-DECORATION: none
}
.ordernav A:hover {
BACKGROUND-COLOR: #ffffff; COLOR: #8d1c1c; TEXT-DECORATION: underline
}
.ordernav .title {
FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.ordernav .current {
FONT-WEIGHT: bold
}
.select {
BORDER-LEFT: #c4c4c4 1px solid; BORDER-TOP: #c4c4c4 1px solid
}
.primary-highlight-color {
COLOR: #8d1c1c
}
.type-small-light {
FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #888888; FONT-SIZE: 11px
}
.table1 {
FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px
}
.table1 TD {
FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px
}
.table1 TR {
FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px
}
.type-light {
COLOR: #888888
}
#tabs UL {
PADDING-LEFT: 0px; DISPLAY: inline; FONT: bold 10px Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; MARGIN-LEFT: 0px
}
#tabs UL LI {
BACKGROUND-COLOR: #e8e8e8; LIST-STYLE-TYPE: none; DISPLAY: inline; MARGIN-BOTTOM: 0px; HEIGHT: 19px; COLOR: #9d9d9d; MARGIN-LEFT: 1px
}
#tabs LI A {
BORDER-BOTTOM: #d9d9d9 1px solid; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1); BORDER-LEFT: #d9d9d9 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; DISPLAY: inline; HEIGHT: 10px; COLOR: #9d9d9d; BORDER-TOP: #d9d9d9 1px solid; BORDER-RIGHT: #d9d9d9 1px solid; TEXT-DECORATION: none; PADDING-TOP: 1px
}
#tabs LI A:hover {
BORDER-BOTTOM: #d0d0d0 1px solid; FILTER: dropshadow(color=#ffffff, offx=-1, offy=-1); BORDER-LEFT: #cdcdcd 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; DISPLAY: inline; HEIGHT: 10px; COLOR: #656565; BORDER-TOP: #cdcdcd 1px solid; BORDER-RIGHT: #cdcdcd 1px solid; TEXT-DECORATION: none; PADDING-TOP: 1px
}
#tabs UL LI.up {
BORDER-BOTTOM: #ffffff 1px solid; BORDER-LEFT: #d9d9d9 1px solid; PADDING-BOTTOM: 5px; BACKGROUND-COLOR: #ffffff; LIST-STYLE-TYPE: none; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; DISPLAY: inline; HEIGHT: 21px; COLOR: #656565; BORDER-TOP: #d9d9d9 1px solid; BORDER-RIGHT: #d9d9d9 1px solid; PADDING-TOP: 1px
}
在相应的页面引入上面得js和藏 css
在body中加入onload="init()"
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD width=8><IMG src="欢迎访问咸宁学院艺术学院_files/menu_01.gif" width=10
height=31></TD>
<TD>
<TABLE class=menu_table border=0 cellSpacing=1 cellPadding=0>
<TBODY>
<TR class=menu_td1>
<TD id=menu2 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/default.asp">首 页</A></TD>
<TD id=menu2 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/about.asp">学院概况</A></TD>
<TD id=menu7 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/products.asp">教学条件</A></TD>
<TD id=menu6 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/news.asp">教学科研</A></TD>
<TD id=menu3 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/faq.asp">学生工作</A></TD>
<TD id=menu4 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/dj.asp">党建工作</A></TD>
<TD id=menu5 onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/download.asp">下载专区</A></TD>
<TD onmouseover="this.className='menu_td2'"
onmouseout="this.className=''"><A class="m STYLE34"
href="http://ys.enxnc.com.cn/xyl.asp">校友录</A></TD></TR></TBODY></TABLE></TD>
<TD><IMG src="欢迎访问咸宁学院艺术学院_files/menu_02.gif" width=10
height=31></TD></TR></TBODY></TABLE>
<SCRIPT language=javascript>
if (mtDropDown.isSupported()) {
var ms = new mtDropDownSet(mtDropDown.direction.down, 0, 3, mtDropDown.reference.bottomLeft);
// menu : Get Started
//var menu1 = ms.addMenu(document.getElementById("menu1"));
var menu6 = ms.addMenu(document.getElementById("menu6"));menu6.addItem("教学管理", "news1.asp?ClassID=9");menu6.addItem("教学动态", "news1.asp?ClassID=20");menu6.addItem("科研成果", "news1.asp?ClassID=103");menu6.addItem("获奖情况", "news1.asp?ClassID=104");var menu3 = ms.addMenu(document.getElementById("menu3"));menu3.addItem("学生管理", "Faq1.asp?ClassID=109");menu3.addItem("学生活动", "Faq1.asp?ClassID=10");menu3.addItem("招生就业", "Faq1.asp?ClassID=63");var menu4 = ms.addMenu(document.getElementById("menu4"));menu4.addItem("党务管理", "dj1.asp?ClassID=105");menu4.addItem("党群活动", "dj1.asp?ClassID=108");var menu5 = ms.addMenu(document.getElementById("menu5"));menu5.addItem("学校资料", "download1.asp?ClassID=45");menu5.addItem("学院资料", "download1.asp?ClassID=46");var menu7 = ms.addMenu(document.getElementById("menu7"));menu7.addItem("师资队伍", "products.asp?ClassID=78");menu7.addItem("教学设施", "products.asp?ClassID=23");
mtDropDown.renderAll();
}
</SCRIPT>