/**************
Copyright (c) 2001 Thomas Brattli (www.dhtmlcentral.com)
eXperience DHTML coolMenus - Get it at www.dhtmlcentral.com
Version 3.02
This script can be used freely as long as all copyright messages are
intact.
(You can delete the comments below to save space)
This script takes over for the old Coolmenus2 and CoolFrameMenu
Visit www.dhtmlcentral.com/coolmenus/
for the latest version of the script.
Tutorial: http://www.dhtmlcentral.com/tutorial.asp
Support: http://www.dhtmlcentral.com/forums/forum.asp?FORUM_ID=2&CAT_ID=1&Forum_Title=CoolMenus
Known bugs:
Netscape 6: When using padding in the layers you can sometimes get
strange visual effects on the lowest menu item. Only way to fix is to not use padding.
Opera: This menu is very close to working on Opera, but as far as I could
figure out opera don't support innerHTML or document.createElement() which
makes the changing of the text inside the submenus immpossible. If anyone
know a solution to this please let me know.
Explorer 4 for mac: It will not work in this browser, nothing does.
Explorer 5 for mac: It works fine, but like Netscape 6 it's a little slow and you can get strange visual effects sometimes.
Script checked and working with:
PC:
Netscape 4.03 - Netscape 4.04 -Netscape 4.08 - Netscape 4.73 - Netscape 6 - Netscape 6.01
Internet Explorer 5.0 - Internet Explorer 5.5 -Internet Explorer 6.0
MAC:
Netscape 4 - Explorer 5
Btw: There is basically just one explanation to why this code is sort of "scrambled": I wanted this file be as small as possible..
If you want it to be smaller feel free to remove all comments (except for the copyright)
**************/
/*************
Pageobject
***************/
function makePageCoords(win,fr){
if(!win) win=window
this.x=0;this.x2=(bw.ns4 || bw.ns6)?win.innerWidth-1:win.document.body.offsetWidth;
if(!fr&&bw.ie) this.x2-=20; else if(!fr&&bw.ns4) this.x2-=4; else if(bw.ns6) this.x2+=1
this.y=0;this.y2=(bw.ns4 || bw.ns6)?win.innerHeight:win.document.body.offsetHeight;
if(bw.ns4&&!win.rows) this.x2+=5; if(!fr&&bw.ie) this.y2-=4; else if(bw.ns4&&fr) this.y2+=4
this.y2orig=this.y2; this.x50=this.x2/2; this.y50=this.y2/2; return this;
}
/*************
Debugging function
***************/
function debug(txt,ev){if(mDebugging==2) self.status=txt; else alert(txt); if(ev) eval(ev); return false}
/************
Scroll function
*************/
function cm_checkScrolled(obj){
if(bw.ns4 || bw.ns6) obj.scrolledY=obj.win.pageYOffset
else obj.scrolledY=obj.win.document.body.scrollTop
if(obj.scrolledY!=obj.lastScrolled){
if(!obj.useframes){
for(i=0;i<obj.l[0].num;i++){var sobj=obj.l[0].o[i].oBorder; sobj.moveY(sobj.y+(obj.scrolledY-obj.lastScrolled))}
if(obj.usebar) obj.oBar.moveY(obj.oBar.y+(obj.scrolledY-obj.lastScrolled))
}
obj.lastScrolled=obj.scrolledY; page.y=obj.scrolledY; page.y2=page.y2orig+obj.scrolledY
if(!obj.useframes || bw.ie){ clearTimeout(obj.tim); obj.isover=0; obj.hideSubs(1,0)}
}if((bw.ns4 || bw.ns6) && !obj.useframes) setTimeout("cm_checkScrolled("+obj.name+")",200)
}
/***********************
Checking if the values are % or not.
***************/
function cm_checkp(num,w,check,istop,ds){
if(num){ var p=istop?toppage:page
if(num.toString().indexOf("%")!=-1){if(w || (check && this.rows)) num=(p.x2*parseFloat(num)/100)
else num=(p.y2*parseFloat(num)/100)
}else num=eval(num)
}else num=0; return num
}
/************
Making DIV objects + DIV objects code
*************/
function cm_makeObj(obj,name,level,win,nest,o){
if(o&&(bw.ns4||bw.ns6)) this.evnt=o
else this.evnt=bw.dom?win.document.getElementById(obj):bw.ie4?win.document.all[obj]:bw.ns4?nest?win.document[nest].document[obj]:win.document[obj]:0;
if(!this.evnt) return debug('There seems to be an error with this layer:\nFrame: '+win+'\nLayer: '+nest + "." + obj)
this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0; this.ref=bw.dom || bw.ie4?win.document:bw.ns4?this.css.document:0;
this.hideIt=cm_hideIt; this.showIt=cm_showIt; this.writeIt=cm_writeIt; this.setactive=cm_setactive; this.addEvents=cm_addEvents;
this.moveIt=cm_moveIt; this.clipTo=cm_clipTo; if(name) this.parent=name; this.moveY=cm_moveY; this.l=level; this.clipOut=cm_clipOut;
this.filterIt=cm_filterIt; this.obj = obj + "Object"; eval(this.obj + "=this"); this.tim=10; this.clipy=0; return this
}
function cm_writeIt(text){if(!this.img1){if(bw.ns4){this.ref.write(text);
this.ref.close()}else this.evnt.innerHTML=text}}; function cm_moveY(y){this.y=y; this.css.top=y}
function cm_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x;this.css.top=this.y}
function cm_showIt(){this.css.visibility="visible"; this.vis=1}; function cm_hideIt(){this.css.visibility="hidden"; this.vis=0}
function cm_clipOut(px,w,ystop,tim,name){
if(!this.vis) return; if(this.clipy<ystop-px){this.clipy+=px; this.clipTo(0,w,this.clipy,0,1)
this.tim=setTimeout(this.obj+".clipOut("+px+","+w+","+ystop+","+tim+",'"+name+"')",tim)
}else{if(bw.ns6){this.hideIt();}; this.clipTo(0,w,ystop,0,1); if(bw.ns6){this.showIt()}}
}
function cm_filterIt(f){if(this.evnt.filters[0]) this.evnt.filters[0].Stop(); else this.css.filter=f; this.evnt.filters[0].Apply(); this.showIt(); this.evnt.filters[0].Play();}
function cm_setactive(on,name,frmmouse){
if(!name) name=this.name; var tobj=this.parent.m[name]
if(tobj.img){if(tobj.img2){if(on) this.ref.images[tobj.img].src=tobj.img2; else this.ref.images[tobj.img].src=tobj.img1}
}else{
if(on){var color=tobj.c2; var fcolor=tobj.c4; var re=tobj.c3}else{var color=tobj.c1; var fcolor=tobj.c3; var re=tobj.c4}
if(color){if(bw.dom || bw.ie4) this.css.backgroundColor=color; else if(bw.ns4) if(color=="transparent") color=null; this.css.bgColor=color}
if(fcolor && !bw.ns4){if(bw.ie4) this.evnt.style.color=fcolor; else if(this.evnt.childNodes[0]) this.evnt.style.color=fcolor
}else if(fcolor&&frmmouse){t=this.parent.m[name].text; t=t.replace(re,fcolor); this.writeIt(t); if(on) this.addEvents(name,this.parent.name,tobj.lnk,this.parent.useclick)}
if(tobj.l==0&&bw.ns6){this.parent.l[0].o[tobj.num].oBorder.hideIt(); this.parent.l[0].o[tobj.num].oBorder.showIt();} //Stupid fix for netscape 6....
}
}
function cm_clipTo(t,r,b,l,w){if(bw.ns4){this.css.clip.top=t;this.css.clip.right=r; this.css.clip.bottom=b;this.css.clip.left=l
}else{this.css.clip="rect("+t+","+r+","+b+","+l+")"; if(w){this.css.width=r; this.css.height=b}}; this.width=r; this.height=b}
function cm_addEvents(n,name,url,useclick){
this.evnt.onmouseover=new Function(name+".mover('"+n+"')");
this.evnt.onmouseout=new Function(name+".mmout('"+n+"')")
if(!url && useclick) ev=new Function(name+".mover('"+n+"',1)")
else ev=new Function(name+".go('"+n+"')")
if(bw.ns4){this.ref.captureEvents(Event.MOUSEDOWN); this.ref.onmousedown=ev}
else this.evnt.onclick=ev
}
/************
Making menu object
*************/
function cm_makeMenu(name,parent,text,link,target,width,height,img1,img2,bgcoloroff,bgcoloron,textcolor,hovercolor,onclick,onmouseover,onmouseout){
this.m[name]=new Object(); var obj=this.m[name]; obj.name=name; obj.subs=new Array(); obj.parent=parent; var tt
obj.lnk=(link==0||link=='')?"":link; obj.target=target
if(parent!="" && parent){this.m[parent].subs[this.m[parent].subs.length]=name; l=this.m[parent].l+1} else l=0
obj.l=l; prop1=l<this.level.length?this.level[l]:this.level[this.level.length-1]; prop2=this.level[0]
if(this.l.length<=l){
this.l[l]=new Object(); this.l[l].num=0; if(l==0) this.l[l].names=new Array()
this.l[l].clip=prop1["clip"]||prop2["clip"]||0; this.l[l].clippx=prop1["clippx"]||prop2["clippx"]||0
this.l[l].cliptim=prop1["cliptim"]||prop2["cliptim"]||0; this.l[l].filter=prop1["filter"]||prop2["filter"]||0
this.l[l].border=prop1["border"]||prop2["border"]; this.l[l].maxnum=0
this.l[l].bordercolor=prop1["bordercolor"]||prop2["bordercolor"];
s=prop1["alig
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
03.rar (82个子文件)
03
ADMINSUBJECTSAVE.ASP 278B
JS
COOLMENUS3.JS 30KB
MENU.JS 10KB
ADD.ASP 12KB
ADMINLEFTTOPFRAME.ASP 1KB
SHIJUAN1.ASP 8KB
POSTNEWS.ASP 3KB
VIEWNEWS.ASP 2KB
ADMINLEFTMIDDLEFRAME.ASP 1KB
CSS.CSS 1KB
SHIJUAN2.ASP 8KB
UNPASS.ASP 3KB
LOGINRIGHTTOPFRAME.ASP 2KB
ADMINLEFTFRAME.ASP 3KB
IMAGES
SEPARATOR.GIF 43B
EXAMBANNER.JPG 6KB
未标题-1.PSD 34KB
BLUEBULLET.GIF 263B
SUCESS.GIF 2KB
SELECTSUBJECT.JPG 2KB
2.JPG 1KB
NEWS.JPG 1KB
BLUE.GIF 51B
TISHI.GIF 2KB
TOP.GIF 107B
PROGRESS.BMP 136B
1.JPG 1KB
NEW.GIF 224B
3.JPG 1KB
TIMER.GIF 337B
EDIT.GIF 248B
LOGIN.JPG 4KB
RESULT.JPG 2KB
RIGHTTOPFRAME.ASP 2KB
ADMINSUBJECTDEL.ASP 363B
DELXINWEN.ASP 290B
PAPER.ASP 17KB
CREATERESULT.ASP 4KB
SAVENEWS.ASP 1KB
LEFTTOPFRAME.ASP 930B
LOGINLEFTFRAME.ASP 2KB
LEFTMIDDLEFRAME.ASP 1KB
EDITPWD.ASP 3KB
ADMINDATABASESAVE.ASP 2KB
ADMINSUBJECTSAVEEDIT.ASP 341B
KSJL.ASP 700B
LOGINDEFAULT.ASP 2KB
TOOLBAR.ASP 2KB
UNPASSIT.ASP 2KB
SAVEPASS.ASP 3KB
ADMINRIGHTTOPFRAME.ASP 2KB
DISPLAYSCORE.ASP 4KB
DELNEWS.ASP 253B
ADMINDATABASEADD.ASP 12KB
CHECKUSR.ASP 2KB
RELOGIN.ASP 564B
数据库
EXAM_DATA.MDF 1.5MB
EXAM_LOG.LDF 1024KB
SHIJUAN3.ASP 2KB
ADMINDATABASE.ASP 7KB
SAVEEDIT.ASP 1KB
LOGINTOOLBAR.ASP 1KB
ADMINDEFAULT.ASP 2KB
DISPLAYRESULT.ASP 2KB
PASSIT.ASP 7KB
LEFTFRAME.ASP 1KB
PREVIEWNEWS.ASP 1KB
ADMINSUBJECT.ASP 3KB
SELECTSUBJECT.ASP 2KB
SAVE.ASP 2KB
ADMINTOOLBAR.ASP 3KB
DEFAULT.ASP 1KB
SEARCHMYSCORE.ASP 3KB
TESTINFO.ASP 3KB
TESTLOG.ASP 3KB
CONN.INC 144B
SEARCHSCORE.ASP 5KB
NEWS.ASP 4KB
KSJL1.ASP 6KB
DEL.ASP 404B
USERINFO.ASP 2KB
ADMINDATABASEEDIT.ASP 10KB
共 82 条
- 1
资源评论
- suibubian2015-07-16太简单,首页让我找了半天
- qp9937252015-05-26简单实用,很适合我
dbwin
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功