Mon

02

Mar

2009

210、友情链接导航框

210、友情链接导航框

脚本说明:

 

把如下代码加入<body>区域中(你可以对链接及说明作相应修改)

 

<script language="JavaScript"><!-- Hide function surfto(form) {        var myindex=form.dest.selectedIndex        location=form.dest.options[myindex].value;}//--></SCRIPT><FORM NAME="myform">  <SELECT NAME="dest" SIZE=4>    <OPTION SELECTED VALUE="">选项<OPTION VALUE="search.htm">搜索引擎    <OPTION VALUE="chat.htm">聊天  </SELECT><INPUT TYPE="BUTTON" VALUE="GO NOW!" onClick="surfto(this.form)"></FORM>

 

0 Comments

Mon

02

Mar

2009

209、图片代替按钮脚本

209、图片代替按钮脚本

脚本说明:

把如下代码加入<body>区域中

<script language=JavaScript>

<!-- Hide the script from old browsers --

 function surfto(form) {

        var myindex=document.myform.dest.selectedIndex

        location=document.myform.dest.options[myindex].value;

}

//-->

</script>

                  <form name="myform">

                    <select name="dest" size=1>

                      <option selected>选项</option>

                      <option value="http://www.163.net">163电子邮局</option>

                      <option value="http://www.263.net">263电子邮局</option>

                    </select>

                    <a href="javascript: surfto()" onMouseOver="self.status='';return true" onMouseOut="self.status='';return true"><img src="go.gif" border=0 align=absmiddle></a>

                  </form>

0 Comments

Mon

02

Mar

2009

208、层叠式导航菜单

208、层叠式导航菜单

脚本说明:

第一步:把如下代码加入<body>区域中

<script language="JavaScript1.2">

//菜单1的内容

var menu1=new Array()

menu1[0]='<a href=http://www.163.net>网易</a><br>'

menu1[1]='<a href=http://www.sina.com.cn>新浪网</a><br>'

menu1[2]='<a href=http://www.cctv.com>中央电视台</a><br>'

//菜单2的内容

var menu2=new Array()

menu2[0]='<a href=http://vs_server.njavat.net/bbs>本站论坛</a><br>'

menu2[1]='<a href=http://vs_server.njcatv.net/aspchitchat>本站聊天室</a><br>'

menu2[2]='<a href=mailto:xjl906@163.com>来信联络</a><br>'

</script>

 

<style>

<!--

.iewrap1{

position:relative;

height:30px;

; font-family: "宋体"; font-size: 9pt}

.iewrap2{

position:absolute;

; font-family: "宋体"; font-size: 9pt}

#dropmenu0, #dropmenu1{

visibility:hide;

z-index:100;

}

#dropmenu0 { font-family: "宋体" ; font-size: 9pt}#dropmenu1 { font-family: "宋体" ; font-size: 9pt}-->

</style>

 

 

第二步:把<body>区域改为

<script language="JavaScript1.2">

//以下不要改

var zindex=100

function dropit2(whichone){

if (window.themenu&&themenu.id!=whichone.id)

themenu.style.visibility="hidden"

themenu=whichone

if (document.all){

themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX

themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+18

if (themenu.style.visibility=="hidden"){

themenu.style.visibility="visible"

themenu.style.zIndex=zindex++

}

else{

hidemenu()

}

}

}

 

function dropit(e,whichone){

if (window.themenu&&themenu.id!=eval(whichone).id)

themenu.visibility="hide"

themenu=eval(whichone)

if (themenu.visibility=="hide")

themenu.visibility="show"

else

themenu.visibility="hide"

themenu.zIndex++

themenu.left=e.pageX-e.layerX

themenu.top=e.pageY-e.layerY+19

return false

}

 

function hidemenu(whichone){

if (window.themenu)

themenu.style.visibility="hidden"

}

 

function hidemenu2(){

themenu.visibility="hide"

}

 

if (document.all)

document.body.onclick=hidemenu

 

//以上不要改

</script>

 

<!----------菜单1开始---------->

 

<ilayer height=35px>

<layer visibility=show>

<span class=iewrap1>

<span class=iewrap2 onClick="dropit2(dropmenu0);event.cancelBubble=true;return false"><font face=宋体><a href="#" onClick="if(document.layers) return dropit(event, 'document.dropmenu0')">站点列表</a></font>

</span>

</span>

</layer>

</ilayer><br>

<!----------菜单1结束---------->

 

<!----------菜单2开始---------->

 

<ilayer height=35px>

<layer visibility=show>

<span class=iewrap1>

<span class=iewrap2 onClick="dropit2(dropmenu1);event.cancelBubble=true;return false"><font face=宋体><a href="#" onClick="if(document.layers) return dropit(event, 'document.dropmenu1')">联络方式</a></font>

</span>

</span>

</layer>

</ilayer><br>

<!----------菜单2结束---------->

 

<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:#CDECF5;background-color:#CDECF5;width:80;visibility:hidden;border:1px solid black;padding:0px">

<script language="JavaScript1.2">

if (document.all)

dropmenu0.style.padding="4px"

for (i=0;i<menu1.length;i++)

document.write(menu1[i])

</script>

</div>

<script language="JavaScript1.2">

if (document.layers){

document.dropmenu0.captureEvents(Event.CLICK)

document.dropmenu0.onclick=hidemenu2

}

</script>

 

<div id=dropmenu1 style="position:absolute;left:0;top:0;layer-background-color:#CDECF5;background-color:#CDECF5;width:80;visibility:hidden;border:1px solid black;padding:0px">

<script language="JavaScript1.2">

if (document.all)

dropmenu1.style.padding="4px"

for (i=0;i<menu2.length;i++)

document.write(menu2[i])

</script>

</div>

<script language="JavaScript1.2">

if (document.layers){

document.dropmenu1.captureEvents(Event.CLICK)

document.dropmenu1.onclick=hidemenu2

}

</script>

0 Comments

Mon

02

Mar

2009

207、按钮选择导航

207、按钮选择导航

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!--HIDE

 function changeIt(newLoc)  {

      document.links[0].href=newLoc

}

//STOP HIDING-->

</SCRIPT>

<A HREF="http://www.7stk.com">

<h4>去看看</h4></A>

<FORM>

<INPUT TYPE="radio" NAME="choices" onClick=

     "changeIt('http://www.cctv.com')">

中央电视台<br>

<INPUT TYPE="radio" NAME="choices" onClick=

   "changeIt('http://www.7stk.com/')">

广电总局<br>

<INPUT TYPE="radio" NAME="choices" onClick=

   "changeIt('http://www.7stk.com/')">

青岛有线台<br>

 

0 Comments

Mon

02

Mar

2009

206、打开链接显示信息

206、打开链接显示信息

脚本说明:

把如下代码加入<body>区域中:

    <script language=JavaScript>

 

function jdk1x() {

      var num1 = document.x.jdk.value;

      if(num1 == 'three') {

        document.x.jdk.value = document.x.jdk.value

              }

      else {

        document.x.jdk.value = "可别急着走呀!"

              }

location="http://www.7stk.com"

    }

    </script>

 

  <form name=x>

  <input type=button value="7stk" onClick="jdk1x()"><br>

    <input  type=text name=jdk width="300" onChange="document.x.jdk.value=''; return true">

</form>

 

0 Comments

Mon

02

Mar

2009

205、链接窗口说明

 

205、链接窗口说明

脚本说明:

 

把如下代码加入<body>区域中

 

<SCRIPT LANGUAGE="JavaScript">

 

 

 

<!--

 

 

 

function PopIt(label, msg, URLE){ 

 

        // Set up Page Colors & Table 

 

        var DQUOTE = '\"'

 

        var s1 =     "<TITLE>" + label + "</TITLE>" +   

 

        "<BODY BGCOLOR='ffffff'><TABLE BORDER=0><TR>" +       

 

        "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+       

 

        "<FONT SIZE=4>"   

 

        var s2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><P>"  

 

        var s3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+   

 

        "<TD VALIGN=TOP ALIGN=RIGHT>"+   

 

        "<FORM><INPUT TYPE='BUTTON' VALUE='Close'" +                  

 

        "onClick='self.close()'>"  +   

 

        "<INPUT TYPE='BUTTON' VALUE='Jump to!'" +                  

 

        "onClick='window.open("+DQUOTE+URLE+DQUOTE+")'"  +

 

        "</FORM></TD></TR></TABLE></BODY>"  

 

        popup = window.open("","popDialog","height=200,width=300,scrollbars=no") 

 

        popup.document.write(s1+s2+msg+s3) 

 

        popup.document.close()

 

}

 

 

 

// -->

 

 

 

</SCRIPT>

 

<A HREF="JavaScript:PopIt('链接一','网易!','http://www.163.com')">网易</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接二','网络时空','http://www.7stk.com')">网页特效代码</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接三','中央电视台!','http://www.cctv.com')">中央电视台</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接四','新浪!','http://www.sina.com.cn')">新浪</A>

 

 

0 Comments

Mon

02

Mar

2009

203、右边会出现说明文字

203、右边会出现说明文字

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var description = new Array();

description[0] = "<font color=blue>国内最大的综合性站点,内容丰富,国内第一.</font>";

description[1] = "<font color=red>国内最大的<b>新闻</b>站点,新闻更新非常快</font>";

description[2] = "<font color=green><i>国内最大的搜索引擎站点,人气非常旺.</i></font>";

//  End -->

</script>

<table border="0">

<tr>

<td valign=top width="50">

<a onMouseOver="Words.innerHTML = description[0];" href="../../../../www.163.com/default.htm">网易</a>

<br><a onMouseOver="Words.innerHTML = description[1];" href="../../../../www.sina.com.cn/default.htm">新浪</a>

<br><a onMouseOver="Words.innerHTML = description[2];" href="../../../../www.sohu.com/default.htm">搜狐</a>

</td>

<td width="600">

<!-- Cell with the descriptions -->

<a id="Words">把鼠标放在文字链接上,就会出现相应的说明信息.</a>

</td>

</tr>

</table>

 

0 Comments

Mon

02

Mar

2009

202、屏幕翻滚导航

202、屏幕翻滚导航

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT>

 

var i=0

 

var i_cell=0

 

i_bg=0

 

var linkslist

 

var bg = new Array('AACC00','77AA00', '557700', '335500', '003300', '000000', '#335500', '557700', '77AA00', 'AACC00', 'CCFF00')

 

function initObjects() {

 

if (document.all) {

 

linkslist = document.all.linkliste.style

 

linkslist.visibility='VISIBLE'

 

linkslist.posTop = i

 

linkslist.posLeft = 3

 

scrollIE()

 

}

 

if (document.layers) {

 

linkslist = document.linkliste

 

linkslist.visibility='VISIBLE'

 

linkslist.top = i

 

linkslist.left = 3

 

scrollNN()

 

}

 

}

 

function scrollNN() {

 

if (i_cell < 100) {

 

i_cell++

 

linkslist.top = i--

 

var timer = setTimeout('scrollNN()',20)

 

}

 

else {

 

clearTimeout('timer')

 

changebgNN()

 

}

 

}

 

function scrollIE() {

 

if (i_cell < 100) {

 

i_cell++

 

linkslist.posTop = i--

 

var timer = setTimeout('scrollIE()',20)

 

}

 

else {

 

clearTimeout('timer')

 

document.bgColor='CCFF00'

 

changebgIE()

 

}

 

}

 

function changebgNN() {

 

if (i_bg <= bg.length) {

 

document.bgColor=bg[i_bg]

 

i_bg++

 

var bgagain = setTimeout('changebgNN()',20)

 

}

 

else {

 

clearTimeout('bgagain')

 

document.bgColor='CCFF00'

 

i_bg=0

 

makepauseNN()

 

}

 

}

 

function changebgIE() {

 

if (i_bg <= bg.length) {

 

document.bgColor=bg[i_bg]

 

i_bg++

 

var bgagain = setTimeout('changebgIE()',50)

 

}

 

else {

 

clearTimeout('bgagain')

 

i_bg=0

 

makepauseIE()

 

}

 

}

 

function makepauseNN() {

 

if (i < (-1*1700)) {

 

i=0

 

}

 

i_cell=0

 

var scrollagain = setTimeout('scrollNN()',3000)

 

}

 

function makepauseIE() {

 

if (i < (-1*1700)) {

 

i=0

 

}

 

i_cell=0

 

var scrollagain = setTimeout('scrollIE()',3000)

 

}

 

</SCRIPT>

 

<STYLE>.alldiv {

       POSITION: absolute; VISIBILITY: hidden

}

</STYLE>

 

 

第二步:把如下代码加入<body>区域中

<DIV class=alldiv id=linkliste>

<CENTER>

<TABLE border=0 cellPadding=0 cellSpacing=0 width=156>

  <TBODY>

  <TR>

    <TD height=100></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.7stk.com/"

      target=_blank><FONT size=1><B>本站提供最新免费网页制作特效代码,包括鼠标类网页特效代码,文字类网页特效代码,菜单类网页特效代码,背景类网页特效代码等。非常精彩,都经过站长的精心挑选,绝对使你满意!本站大部分网页特效代码来自网上,若有侵权,请来函 ,站长一经查实立刻删除!网页特效代码本着以人为本,服务大众,力求免费为各站长的网上小屋添砖加瓦,你的满意是我最大的幸福,你的意见是我最大的财富!

      <BR>Rating: <FONT color=#ff0000>**</FONT><FONT

      color=#999999>***</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://skandal.homepage.com/" target=_blank><FONT

      size=1><B>Skandal's Digital art and graffiti

      (DHTML)</B></FONT></A><BR>site with lots of images made with adobe

      photoshop. Slow loading. Nice effects.<BR>Rating: <FONT

      color=#ff0000>**</FONT><FONT color=#999999>***</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www2.mozcom.com/~halos/" target=_blank><FONT

      size=1><B>Emmanuel Halos Web Studio</B></FONT></A><BR>First-rate

      JavaScripts from the Philippines. You will be enthusiastic about the

      elegance and power of the samples.<BR>Rating: <FONT

      color=#ff0000>*****</FONT><FONT color=#999999></FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.geocities.com/~lef" target=_blank><FONT size=1><B>Scripts

      by Lefteris Haritou</B></FONT></A><BR>Lefteris Haritou is a very creative

      JavaScript writer. Why? Check it out! A perfect starting point for

      beginners. <BR>Rating: <FONT color=#ff0000>****</FONT><FONT

      color=#999999>*</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://home.thezone.net/~rbennett/utility/javahead.htm"

      target=_blank><FONT size=1><B>Racoon's JavaScript

      Site</B></FONT></A><BR>Feel the spirit and the humour of a great

      script-programmer. Lots of inspiration.<BR>Rating: <FONT

      color=#ff0000>****</FONT><FONT color=#999999>*</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://goepfert.hypermart.net/" target=_blank><FONT size=1><B>Free

      WebResources</B></FONT></A><BR>Contains all kinds of free resources for

      webmasters: JavaScript, HTML, DHTML, CGI, Java, Graphics. Useful site

      checkers.<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A href="http://igor.net/"

      target=_blank><FONT size=1><B>Igor net</B></FONT></A><BR>No doubt IGOR is

      one of the great javascript-masters of the universe. His games are superb.

      High-End-Scripting at it's best.<BR>Rating: <FONT

      color=#ff0000>*****</FONT><FONT color=#999999></FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.alienalchemy.com/" target=_blank><FONT size=1><B>Alien

      Alchemy</B></FONT></A><BR>12 free cut &pastejavascripts made by

      designers who know that form follows function.<BR>Rating: <FONT

      color=#ff0000>***</FONT><FONT color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://home.netvigator.com/~mkpunnl" target=_blank><FONT

      size=1><B>Leo Pun's homepage</B></FONT></A><BR>Open your eyes and you will

      find quite a few precious javacripts.<BR>Rating: <FONT

      color=#ff0000>***</FONT><FONT color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.geocities.com/SiliconValley/Way/1265/"

      target=_blank><FONT size=1><B>Surfin' the web with Willem

      Jonkman</B></FONT></A><BR>Great samples of javascript, HTML, sounds, fonts

      mixed with lots of fun.<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.geocities.com/SiliconValley/Lakes/8620"

      target=_blank><FONT size=1><B>Virtual_Max's</B></FONT></A><BR>One of the

      most popular sites at GeoCities: applets, scripts, crazy stuff. As funny

      as a web bazar can be.<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A href="http://www.reallybig.com/"

      target=_blank><FONT size=1><B>Reallybig.com</B></FONT></A><BR>United Power

      of Web Builders! More than 3000 resources for web builders including free

      clipart, CGI, counters, fonts, html, java, animation, backgrounds and much

      more.<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://stars.bilkent.edu.tr/Authoring/DHTML/Resources.html"

      target=_blank><FONT size=1><B>Dynamic HTML Tools and

      Resources</B></FONT></A><BR>The web developer's virtual library: DHTML,

      CSS, JavaScript, CGI, Perl, Graphics<BR>Rating: <FONT

      color=#ff0000>***</FONT><FONT color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.javascripts.com/" target=_blank><FONT

      size=1><B>Javascripts.com</B></FONT></A><BR>More than 2000 scripts. Each

      script has been written or uploaded by a member of this site. Many have

      been written by JavaScript professionals.<BR>Rating: <FONT

      color=#ff0000>****</FONT><FONT color=#999999>*</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.coolfreebies.com/" target=_blank><FONT size=1><B>Cool

      free stuff</B></FONT></A><BR>Screensavers, various freebies, free

      software, free sound tools, free graphics, free midis, free image viewers,

      free prizes, chat freebies, FTP freebies, free fun stuff, free webmasters

      tools, free graphics.<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://javascript.internet.com/" target=_blank><FONT size=1><B>The

      JavaScript Source</B></FONT></A><BR>Collection of hundreds of free

      JavaScripts that are available to you for use on your web page<BR>Rating:

      <FONT color=#ff0000>****</FONT><FONT

    color=#999999>*</FONT><BR><BR></FONT></TD></TR>

  <TR vAlign=top>

    <TD align=left height=100><FONT size=1><A

      href="http://www.dynamicdrive.com/" target=_blank><FONT size=1><B>Free,

      original DHTML-scripts</B></FONT></A><BR>A premier place on the net to

      obtain free, original DHTML scripts and components to enhance your web

      site!<BR>Rating: <FONT color=#ff0000>***</FONT><FONT

      color=#999999>**</FONT><BR><BR></FONT></TD></TR></TBODY></TABLE></CENTER></DIV>

 

 

第三步:<body>区域改为

<body bgcolor="#fef4d9" onload=initObjects()>

 

0 Comments

Mon

02

Mar

2009

201、又一动态导航脚本

201、又一动态导航脚本

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

 

function makeArray(q){

for(i=1 ; i < q ; i++){this[i]=0}}

w=1;

howmanysites=4; // How many sites are listed below?

 

Sites = new makeArray(howmanysites);

 

 

Sites[1] = "http://www.7stk.com/~JavaScript Planet|Hundreds of JavaScripts!";

Sites[2] = "http://www.7stk.com/~dHTML Scripts|Free dHTML Scripts!";

Sites[3] = "http://www.7stk.com/~Altavista|The best search engine";

Sites[4] = "http://www.7stk.com/~Dynamic Drive|More dHTML Scripts";

 

function showSites() {

if (w > howmanysites) { w=1; };

var string=Sites[w] + "";

var split1=string.indexOf("~");

var split2=string.indexOf("|");

var url=string.substring(0,split1);

var name=string.substring(split1 + 1,split2);

var word=string.substring(split2 + 1,string.length);

document.form.url.value=url;

document.form.name.value=name;

document.form.word.value=word;

w+=1;

window.setTimeout('showSites()',3000);

 

// You can change the speed!  3000 = 3 sec delay.  5000 = 5 sec delay, etc.

 

}

function visitSite() {

window.location=document.form.url.value;

}

</SCRIPT>

<form name=form>

<table><tr><td align=center>

<input type=button name=name value="Visit" onClick="visitSite()" size=25>

<input type=hidden name=url value="">

<input type=text name=word value="" size=40>

</td></tr></table>

</form>

</center>

 

<script>

showSites();

</script>

 

0 Comments

Mon

02

Mar

2009

200、Form框中导航

200Form框中导航

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

 

//by Leif King e-mail:leif.d.king@vanderbilt.edu

//Feel free to use this or modify it Please leave this comment.

 

function makeArray(q){

for(i=1 ; i < q ; i++){this[i]=0}}

w=1;

howmanysites=4; // How many sites are listed below?

 

Sites = new makeArray(howmanysites);

 

Sites[1] = "http://www.7stk.com/|Great scripts!";

//put yoursites then | and what you want the box to show here's where I got the orig.

Sites[2] = "http://www.7stk.com/|Free webspace!";

Sites[3] = "http://www.7stk.com/|Great Search Engine!";

 

function showSites() {

if (w > howmanysites) { w=1; };

var string=Sites[w] + "";

var split=string.indexOf("|");

var url=string.substring(0,split);

var word=string.substring(split + 1,string.length);

document.form.url.value=url;

document.form.word.value=word;

w+=1;

window.setTimeout('showSites()',5000);

 

}

function visitSite() {

window.location=document.form.url.value;

}

</SCRIPT>

<center>

<form name=form>

<table><tr><td align=center>

<input type=hidden name=url value="">

<input type=text name=word value="" onFocus="visitSite()" size=40>

</td></tr></table>

</form>

</center>

 

<script>

showSites();

</script>

 

0 Comments

Mon

02

Mar

2009

199、带说明的导航

199、带说明的导航

脚本说明:

把如下代码加入<body>区域中:

<script language="JavaScript">

 

<!--

function go_to_station(){

        if (document.stationform.stationselect.options[0].selected){

                window.location.href = "http://www.abctelevision.com";}

        else if (document.stationform.stationselect.options[1].selected)               

        {       window.location.href = "http://www.cbs.com";}

        else if (document.stationform.stationselect.options[2].selected)               

        {       window.location.href = "http://www.nbc.com";}  

        else if (document.stationform.stationselect.options[3].selected)               

        {       window.location.href = "http://www.foxnetwork.com";}   

        else if (document.stationform.stationselect.options[4].selected)               

        {       window.location.href = "http://www.filmzone.com/SpaceGhost/cartoonnet.html";}  

        else if (document.stationform.stationselect.options[5].selected)               

        {       window.location.href = "http://www.discovery.com";}    

        else if (document.stationform.stationselect.options[6].selected)               

        {       window.location.href = "http://www.cs.brandeis.com";}  

        else if (document.stationform.stationselect.options[7].selected)               

        {       window.location.href = "http://www.qvc.com";}  

        else if (document.stationform.stationselect.options[8].selected)               

        {       window.location.href = "http://www.historychannel.com";}       

        else if (document.stationform.stationselect.options[9].selected)               

        {       window.location.href = "http://www.mtv.com";}  

        else if (document.stationform.stationselect.options[10].selected)              

        {       window.location.href = "http://www.cnn.com";}  

        else if (document.stationform.stationselect.options[11].selected)              

        {       window.location.href = "http://www.aetv.com";} 

        else if (document.stationform.stationselect.options[12].selected)              

        {       window.location.href = "http://www.amctv.com";}

        else if (document.stationform.stationselect.options[13].selected)              

        {       window.location.href = "http://www.bravotv.com";}      

        else if (document.stationform.stationselect.options[14].selected)               

        {       window.location.href = "http://www.c-span.org";}       

        else if (document.stationform.stationselect.options[15].selected)              

        {       window.location.href = "http://www.comcentral.com";}

        else if (document.stationform.stationselect.options[16].selected)              

        {       window.location.href = "http://espnet.sportszone.com";}

        else if (document.stationform.stationselect.options[17].selected)              

        {       window.location.href = "http://www.fxnetworks.com";}   

        else if (document.stationform.stationselect.options[18].selected)              

        {       window.location.href = "http://www.hbohomevideo.com";} 

        else if (document.stationform.stationselect.options[19].selected)              

        {       window.location.href = "http://www.scifi.com";}

        else if (document.stationform.stationselect.options[20].selected)              

        {       window.location.href = "http://showtimeonline.com";}   

        else if (document.stationform.stationselect.options[21].selected)              

        {       window.location.href = "http://vh1.com";}      

        else if (document.stationform.stationselect.options[22].selected)              

        {       window.location.href = "http://www.weather.com";}      

        else if (document.stationform.stationselect.options[23].selected)              

        {       window.location.href = "http://www.disneychannel.com";}

       

        return true;   

        }

 

function textValue(){  

        var stationInteger, stationString      

        stationInteger=document.stationform.stationselect.selectedIndex

        stationString=document.stationform.stationselect.options[stationInteger].text   

        document.stationform.stationtext.value = "Go to " + stationString +"!"  }

 

//-->

 

</script>

<form name="stationform">

<select name="stationselect" onChange="textValue()" multiple size="5">

<option>ABC

<option>CBS

<option>NBC

<option>Fox

<option>Cartoon Network

<option>Discovery Channel

<option>Warner Brothers Network

<option>QVC

<option>History Channel

<option>MTV

<option>CNN

<option>A&E

<option>American Movie Classics(AMC)

<option>Bravo

<option>C-SPAN

<option>Comedy Central

<option>ESPN

<option>fX

<option>HBO

<option>Sci-Fi Channel

<option>Showtime

<option>VH-1

<option>Weather Channel

<option>Disney Channel

</select>

 

<br><p>

<input type="button" name="stationbutton" value="Go!" onClick="go_to_station()">

<p>

<input type="text" name="stationtext" value="" size="35" maxlength="35">

<p>

</form>

 

 

1 Comments

Mon

02

Mar

2009

198、任意多友情链接

198、任意多友情链接

脚本说明:

把如下代码加入<body>区域中:

<script language="JavaScript">

<!--

function go_to_station(){

       if (document.stationform.stationselect.options[0].selected){

              window.location.href = "http://7stk.com/";}

              else if (document.stationform.stationselect.options[1].selected)            

      {     window.location.href = "http://www.7stk.com/";}      

       else if (document.stationform.stationselect.options[2].selected)         

       {     window.location.href = "http://www.7stk.com/";}

       else if (document.stationform.stationselect.options[3].selected)         

       {     window.location.href = "http://www.7stk.com/";}      

       else if (document.stationform.stationselect.options[4].selected)         

       {     window.location.href = "http://www.7stk.com/";}

              else if (document.stationform.stationselect.options[5].selected)            

       {     window.location.href = "http://www.7stk.com/";}             

             else if (document.stationform.stationselect.options[6].selected)       

       {     window.location.href = "http://www.7stk.com/";}             

             else if (document.stationform.stationselect.options[7].selected)       

       {     window.location.href = "http://www.7stk.com/";}      

             return true;  

       }

//This is were you load the Discription and the Author

function textValue(){    

       if (document.stationform.stationselect.options[0].selected){

              document.stationform.disc.value = "Java脚本下载资源站"

              document.stationform.author.value = "【最酷的Java脚本资源站】";}

              else if (document.stationform.stationselect.options[1].selected)            

       {     document.stationform.disc.value = "军事动态新闻及MUD"

              document.stationform.author.value = "【军事与泥巴】";}

       else if (document.stationform.stationselect.options[2].selected)         

       {     document.stationform.disc.value = "培训教学"

              document.stationform.author.value = "【微软认证专家园地】";}

       else if (document.stationform.stationselect.options[3].selected)         

       {     document.stationform.disc.value = "电脑网络"

              document.stationform.author.value = "【梧桐世界】";}   

       else if (document.stationform.stationselect.options[4].selected)         

       {     document.stationform.disc.value = "图形图象制作"

              document.stationform.author.value = "【菜盆的'无中生有'";}

              else if (document.stationform.stationselect.options[5].selected)            

       {     document.stationform.disc.value = "美术吉它"

              document.stationform.author.value = "【杨海“倾心小筑”】";}     

       else if (document.stationform.stationselect.options[6].selected)         

       {     document.stationform.disc.value = "电脑网络"

              document.stationform.author.value = "【江光强主页】";}

              else if (document.stationform.stationselect.options[7].selected)            

       {     document.stationform.disc.value = "游戏,编程"

              document.stationform.author.value = "【未名创作室】";}

       return true;    

       }

 

//-->

</script>

<div align="center"><font color="#ffffff" size="5">

 

<p align="center">不错的友情连接脚本</font> </p>

</div>

 

<form name="stationform">

  <table>

<TBODY>

    <tr>

      <td><select class="yk9" multiple name="stationselect" onchange="textValue()" size="8">

        <option>Java2000</option>

        <option>军事与泥巴</option>

        <option>微软认证专家园地</option>

        <option>梧桐世界</option>

        <option>菜盆的"无中生有"</option>

        <option>杨海“倾心小筑”</option>

        <option>江光强主页</option>

        <option>未名创作室</option>

      </select> </td>

      <td>站点名称<br>

      <textarea class="yk9" cols="40" name="author" rows="1"></textarea> <br>

      站点主题<br>

      <textarea class="yk9" cols="40" name="disc" rows="3" wrap="physical"></textarea> </td>

    </tr>

</TBODY>

  </table>

<input class="yk9" name="stationbutton" onclick="go_to_station()"

  type="button" value="参观参观">

</form>

0 Comments

Mon

02

Mar

2009

197、链接自动说明脚本

197、链接自动说明脚本

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var description = new Array();

description[0] = "<font color=blue>国内最大的综合性站点,内容丰富,国内第一.</font>";

description[1] = "<font color=red>国内最大的<b>新闻</b>站点,新闻更新非常快</font>";

description[2] = "<font color=green><i>国内最大的搜索引擎站点,人气非常旺.</i></font>";

//  End -->

</script>

<table border="0">

<tr>

<td valign=top width="50">

<a onMouseOver="Words.innerHTML = description[0];" href="http://www.163.com">网易</a>

<br><a onMouseOver="Words.innerHTML = description[1];" href="http://www.sina.com.cn">新浪</a>

<br><a onMouseOver="Words.innerHTML = description[2];" href="http://www.7stk.com/">搜狐</a>

</td>

<td width="600">

<!-- Cell with the descriptions -->

<a id="Words">把鼠标放在文字链接上,就会出现相应的说明信息.</a>

</td>

</tr>

</table>

0 Comments

Mon

02

Mar

2009

196、开始选择导航

196、开始选择导航

脚本说明:

把如下代码加入<body>区域中:

<script>

alert("你可以输入1,2,3,4,5分别进入time1.htm,time2.htm,time3.htm,time4.htm,time5.htm,如果输入不对页面就会没现象")

</script>

<script language="JavaScript">

 

 

right1 = "../time/time1.htm";

 

right2 = "../time/time2.htm";

 

right3 = "../time/time3.htm";

 

right4 = "../time/time4.htm";

 

right5 = "../time/time5.htm";

 

name1 = "1"

 

name2 = "2"

 

name3 = "3"

 

name4 = "4"

 

name5 = "5"

 

var name = prompt("Please Type In Your Name","");

// if... else statement... right, // confirm this, wrong, go to // wrong...

 

if (name ==name1) {location.href=right1}

 

if (name ==name2) {location.href=right2}

 

if (name ==name3) {location.href=right3}

 

if (name ==name4) {location.href=right4}

 

if (name ==name5) {location.href=right5}

</script>

 

 

 

0 Comments

Mon

02

Mar

2009

195、链接处出现图标

195、链接处出现图标

脚本说明:

把如下代码加入<body>区域中

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function imgover(imgname){

imgname.src = "arrow.gif"

}

function imgout(imgname){

imgname.src = "blank.gif"

}

// End -->

</SCRIPT>

 

<table border=0>

<tr><td>

<img name="pic1" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://altavista.digital.com" onMouseOver="imgover(pic1)" onMouseOut="imgout(pic1)">Altavista</A>

<br>

<img name="pic2" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.7stk.com/" onMouseOver="imgover(pic2)" onMouseOut="imgout(pic2)">Excite</A>

<br>

<img name="pic3" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.7stk.com/" onMouseOver="imgover(pic3)" onMouseOut="imgout(pic3)">Hotbot</A>

<br>

<img name="pic4" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.7stk.com/" onMouseOver="imgover(pic4)" onMouseOut="imgout(pic4)">Infoseek</A>

<br>

<img name="pic5" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.lycos.com" onMouseOver="imgover(pic5)" onMouseOut="imgout(pic5)">网页特效代码</A>

<br>

<img name="pic6" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.7stk.com/" onMouseOver="imgover(pic6)" onMouseOut="imgout(pic6)">Magellan</A>

<br>

<img name="pic7" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.webcrawler.com" onMouseOver="imgover(pic7)" onMouseOut="imgout(pic7)">Webcrawler</A>

<br>

<img name="pic8" SRC="blank.gif" width=10 height=10 border=0>

<A HREF="http://www.yahoo.com" onMouseOver="imgover(pic8)" onMouseOut="imgout(pic8)">Yahoo!</A>

</td></tr></table>

0 Comments

Mon

02

Mar

2009

194、导航菜单选择

194、导航菜单选择

脚本说明:

把如下代码加入<body>区域中

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

site = "http://www.7stk.com/"; // Do not include the final "/"

function combineMenus(frm, menu1, menu2) {

with (frm) {

str = menu1.options[menu1.selectedIndex].value;

str += menu2.options[menu2.selectedIndex].value;

url = site + "/" + str + ".htm";

window.location.href = url;

   }

}

//  End -->

</script>

<form name=menufrm>

<select name=menu1>

<option value="">时间类</option>

<option value="time">time</option>

</select>

<select name=menu2>

<option value="">哪个</option>

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

</select>

<input type=button value="Select" onClick="combineMenus(this.form, this.form.menu1, this.form.menu2)">

</form>

 

0 Comments

Mon

02

Mar

2009

193、导航按钮加说明

193、导航按钮加说明

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

 

<!-- Begin

function makeArray(q){

for(i=1 ; i < q ; i++){this[i]=0}}

w=1;

howmanysites=4; // How many sites are listed below?

 

Sites = new makeArray(howmanysites);

 

<!-- STEP TWO: Use the pattern:  url~Site Title|Description for links  -->

 

Sites[1] = "http://www.163.com~网易|国内最大的综合站点--网易";

Sites[2] = "http://www.sina.com.cn~新浪网|国内最好的新闻站点--新浪网";

Sites[3] = "http://www.yahoo.com.cn~中方雅虎|中方雅虎";

Sites[4] = "http://www.7stk.com/~搜狐|国内最大的搜索引擎站点--搜狐";

 

function showSites() {

if (w > howmanysites) { w=1; };

var string=Sites[w] + "";

var split1=string.indexOf("~");

var split2=string.indexOf("|");

var url=string.substring(0,split1);

var name=string.substring(split1 + 1,split2);

var word=string.substring(split2 + 1,string.length);

document.form.url.value=url;

document.form.name.value=name;

document.form.word.value=word;

w+=1;

window.setTimeout('showSites()',3000);

 

// You can change the speed!  3000 = 3 sec delay.  5000 = 5 sec delay, etc.

 

}

function visitSite() {

window.location=document.form.url.value;

}

// End -->

</SCRIPT>

<form name=form>

<table><tr><td align=center>

<input type=button name=name value="Visit" onClick="visitSite()" size=25>

<input type=hidden name=url value="">

<input type=text name=word value="" size=20>

</td></tr></table>

</form>

<script>

showSites();

</script>

 

0 Comments

Mon

02

Mar

2009

192、热键驱动链接

192、热键驱动链接

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

 

<!-- Begin

var key = new Array();  // Define key launcher pages here

key['h'] = "http://www.7stk.com/index.htm";

key['f'] = "http://www.7stk.com";

key['n'] = "http://javacool.3322.net";

key['s'] = "http://www.7stk.com";

 

function getKey(keyStroke) {

isNetscape=(document.layers);

// Cross-browser key capture routine couresty

// of Randy Bennett (rbennett@thezone.net)

eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;

which = String.fromCharCode(eventChooser).toLowerCase();

for (var i in key) if (which == i) window.location = key[i];

}

document.onkeypress = getKey;

//  End -->

</script>

</HEAD>

<table border=0><tr><td>

<pre>

'h' 去本站首页

'f' 去网络时空

'n' javacool

's' 去南京有线视台

</pre>

</td></tr></table>

0 Comments

Mon

02

Mar

2009

191、分帧打开不同站点

191、分帧打开不同站点

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

 

<!-- Begin

function loadFrames(page1, page2) {

framecode = "<frameset rows='50%,50%'>"

+ "<frame src='" + page1 + "'>"

+ "<frame src='" + page2 + "'>"

+ "</frameset>";

 

page = window.open("");

page.document.open();

page.document.write(framecode);

page.document.close();

}

//  End -->

</script>

<a href="javascript:loadFrames('http://www.163.com','http://www.7stk.com/')">同时打开网易和搜狐</a>

0 Comments

Mon

02

Mar

2009

190、说明信息加导航

190、说明信息加导航

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function go_to_station() {

if (document.stationform.stationselect.options[0].selected) {

window.location.href = "http://www.7stk.com";}

else if (document.stationform.stationselect.options[1].selected) {

window.location.href = "http://www.cbs.com";}

else if (document.stationform.stationselect.options[2].selected) {

window.location.href = "http://www.nbc.com";}  

else if (document.stationform.stationselect.options[3].selected) {

window.location.href = "http://www.work.com";}   

else if (document.stationform.stationselect.options[4].selected) {

window.location.href = "http://www.filmzone.com";}  

else if (document.stationform.stationselect.options[5].selected) {

window.location.href = "http://www.discovery.com";}    

else if (document.stationform.stationselect.options[6].selected) {

window.location.href = "http://www.cs.brandeis.com";}  

else if (document.stationform.stationselect.options[7].selected) {

window.location.href = "http://www.qvc.com";}  

else if (document.stationform.stationselect.options[8].selected) {

window.location.href = "http://www.historychannel.com";}       

else if (document.stationform.stationselect.options[9].selected) {

window.location.href = "http://www.mtv.com";}  

else if (document.stationform.stationselect.options[10].selected) {

window.location.href = "http://www.cnn.com";}  

else if (document.stationform.stationselect.options[11].selected) {

window.location.href = "http://www.aetv.com";} 

else if (document.stationform.stationselect.options[12].selected) {

window.location.href = "http://www.amctv.com";}

else if (document.stationform.stationselect.options[13].selected) {

window.location.href = "http://www.bravotv.com";}      

else if (document.stationform.stationselect.options[14].selected) {

window.location.href = "http://www.c-span.org";}       

else if (document.stationform.stationselect.options[15].selected) {

window.location.href = "http://www.comcentral.com";}

else if (document.stationform.stationselect.options[16].selected) {

window.location.href = "http://espnet.sportszone.com";}

else if (document.stationform.stationselect.options[17].selected) {

window.location.href = "http://www.fxnetworks.com";}   

else if (document.stationform.stationselect.options[18].selected) {

window.location.href = "http://www.hbohomevideo.com";} 

else if (document.stationform.stationselect.options[19].selected) {

window.location.href = "http://www.scifi.com";}

else if (document.stationform.stationselect.options[20].selected) {

window.location.href = "http://showtimeonline.com";}   

else if (document.stationform.stationselect.options[21].selected) {

window.location.href = "http://vh1.com";}      

else if (document.stationform.stationselect.options[22].selected) {

window.location.href = "http://www.weather.com";}      

else if (document.stationform.stationselect.options[23].selected) {

window.location.href = "http://www.el.com";}

return true;   

}

function textValue() {  

var stationInteger, stationString      

stationInteger=document.stationform.stationselect.selectedIndex

stationString=document.stationform.stationselect.options[stationInteger].text  

document.stationform.stationtext.value = "Go to " + stationString +"!"

}

// End -->

</SCRIPT>

<FORM name="stationform">

<SELECT name="stationselect" onChange="textValue()" multiple size="5">

<option>网页特效代码

<option>CBS

<option>NBC

<option>Fox

<option>Cartoon Network

<option>Discovery Channel

<option>Warner Brothers Network

<option>QVC

<option>History Channel

<option>MTV

<option>CNN

<option>A&E

<option>American Movie Classics(AMC)

<option>Bravo

<option>C-SPAN

<option>Comedy Central

<option>ESPN

<option>fX

<option>HBO

<option>Sci-Fi Channel

<option>Showtime

<option>VH-1

<option>Weather Channel

<option>Disney Channel

</SELECT>

<br>

<p>

<input type="button" name="stationbutton" value="Go!" onClick="go_to_station()">

<p>

<input type="text" name="stationtext" value="" size="35" maxlength="35">

<p>

</FORM>

1 Comments

Mon

02

Mar

2009

189、隐藏导航栏

189、隐藏导航栏

脚本说明:

把如下代码加入<body>区域中:

<script language="JavaScript">

<!--

function MM_initTimelines() {

var ns = navigator.appName == "Netscape";

document.MM_Time = new Array(2);

document.MM_Time[0] = new Array(1);

document.MM_Time["Timeline1"] = document.MM_Time[0];

document.MM_Time[0].MM_Name = "Timeline1";

document.MM_Time[0].fps = 15;

document.MM_Time[0][0] = new String("sprite");

document.MM_Time[0][0].slot = 1;

if (ns)

document.MM_Time[0][0].obj = document["Layer1"];

else

document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;

document.MM_Time[0][0].keyFrames = new Array(1, 10);

document.MM_Time[0][0].values = new Array(5);

document.MM_Time[0][0].values[0] = new Array(10,-2,-14,-27,-39,-51,-63,-76,-88,-100);

document.MM_Time[0][0].values[0].prop = "left";

document.MM_Time[0][0].values[1] = new Array(150,150,150,150,150,150,150,150,150,150);

document.MM_Time[0][0].values[1].prop = "top";

if (!ns) {

document.MM_Time[0][0].values[0].prop2 = "style";

document.MM_Time[0][0].values[1].prop2 = "style";

}

document.MM_Time[0][0].values[2] = new Array("inherit","inherit");

document.MM_Time[0][0].values[2].prop = "visibility";

if (!ns)

document.MM_Time[0][0].values[2].prop2 = "style";

document.MM_Time[0][0].values[3] = new Array(127,127,127,128,128,128,129,129,129,130);

document.MM_Time[0][0].values[3].prop = "width";

if (!ns)

document.MM_Time[0][0].values[3].prop2 = "style";

document.MM_Time[0][0].values[4] = new Array(57,59,62,64,67,69,72,74,77,80);

document.MM_Time[0][0].values[4].prop = "height";

if (!ns)

document.MM_Time[0][0].values[4].prop2 = "style";

document.MM_Time[0].lastFrame = 10;

document.MM_Time[1] = new Array(1);

document.MM_Time["Timeline2"] = document.MM_Time[1];

document.MM_Time[1].MM_Name = "Timeline2";

document.MM_Time[1].fps = 15;

document.MM_Time[1][0] = new String("sprite");

document.MM_Time[1][0].slot = 1;

if (ns)

document.MM_Time[1][0].obj = document["Layer1"];

else

document.MM_Time[1][0].obj = document.all ? document.all["Layer1"] : null;

document.MM_Time[1][0].keyFrames = new Array(1, 10);

document.MM_Time[1][0].values = new Array(5);

document.MM_Time[1][0].values[0] = new Array(-100,-89,-78,-67,-56,-44,-33,-22,-11,0);

document.MM_Time[1][0].values[0].prop = "left";

document.MM_Time[1][0].values[1] = new Array(150,150,150,150,150,150,150,150,150,150);

document.MM_Time[1][0].values[1].prop = "top";

if (!ns) {

document.MM_Time[1][0].values[0].prop2 = "style";

document.MM_Time[1][0].values[1].prop2 = "style";

}

document.MM_Time[1][0].values[2] = new Array("inherit","inherit");

document.MM_Time[1][0].values[2].prop = "visibility";

if (!ns)

document.MM_Time[1][0].values[2].prop2 = "style";

document.MM_Time[1][0].values[3] = new Array(130,130,130,130,130,130,130,130,130,130);

document.MM_Time[1][0].values[3].prop = "width";

if (!ns)

document.MM_Time[1][0].values[3].prop2 = "style";

document.MM_Time[1][0].values[4] = new Array(80,80,80,80,80,80,80,80,80,80);

document.MM_Time[1][0].values[4].prop = "height";

if (!ns)

document.MM_Time[1][0].values[4].prop2 = "style";

document.MM_Time[1].lastFrame = 10;

for (i=0; i<document.MM_Time.length; i++) {

document.MM_Time[i].ID = null;

document.MM_Time[i].curFrame = 0;

document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;

}

}

//-->

</script>

<script language="JavaScript">

<!--

function MM_timelinePlay(tmLnName, myID) {

var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;

if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time

tmLn = document.MM_Time[tmLnName];

if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID

if (myID == tmLn.ID) { //if Im newest

setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);

fNew = ++tmLn.curFrame;

for (i=0; i<tmLn.length; i++) {

sprite = tmLn[i];

if (sprite.charAt(0) == 's') {

if (sprite.obj) {

numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];

if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range

keyFrm=1;

for (j=0; j<sprite.values.length; j++) {

props = sprite.values[j];

if (numKeyFr != props.length) {

if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];

else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];

} else {

while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;

if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {

if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];

else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];

} } } } }

} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);

if (fNew > tmLn.lastFrame) tmLn.ID = 0;

} }

}

//-->

</script>

<script language="JavaScript">

<!--

function MM_timelineGoto(tmLnName, fNew, numGotos) { //v1.2

//Copyright 1997 Macromedia, Inc. All rights reserved.

var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;

if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time

tmLn = document.MM_Time[tmLnName];

if (numGotos != null)

if (tmLn.gotoCount == null) tmLn.gotoCount = 1;

else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}

jmpFwd = (fNew > tmLn.curFrame);

for (i = 0; i < tmLn.length; i++) {

sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back

if (sprite.charAt(0) == "s") {

numKeyFr = sprite.keyFrames.length;

firstKeyFr = sprite.keyFrames[0];

lastKeyFr = sprite.keyFrames[numKeyFr - 1];

if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd

for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);

for (j=0; j<sprite.values.length; j++) {

props = sprite.values[j];

if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only

else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range

if (sprite.obj != null) {

if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];

else sprite.obj[props.prop2][props.prop] = props[propNum];

} } } }

tmLn.curFrame = fNew;

if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');

}

//-->

</script>

<div id="Layer1" style="position:absolute; width:77px; height:57px; z-index:1; left: 0px; top: 150px; visibility: inherit">

<table border="0" cellpadding=0 cellspacing=0 width="120" bordercolor="#9c9cff">

<tr>

<td width="50" bgcolor="#FF00FF">

<div align="center"><font size=-1><a href="http://www.163.com" target="bot">网易</a></font></div>

</td>

<td width="14"><a href="#" onClick="MM_timelineGoto('Timeline1','1');MM_timelinePlay('Timeline1')"><img src="left1.gif" width="12" height="12" alt="隱藏" border="0"></a></td>

</tr>

<tr>

<td width="50" bgcolor="#FF00FF">

<div align="center"><font size=-1><a href="http://www.sina.com.cn" target="bot">新浪</a></font></div>

</td>

<td align=center width="14" rowspan="2" bgcolor="#FF00FF"><font size="-1" color="#00FFFF">目錄</font></td>

</tr>

<tr>

<td width="50" bgcolor="#FF00FF">

<div align="center"><font size=-1><a href="http://www.yahoo.com.cn" target="bot">雅虎</a></font></div>

</td>

</tr>

<tr>

<td width="50" bgcolor="#FF00FF">

<div align="center"><font size=-1><a href="http://www.7stk.com/" target="bot">搜狐</a></font></div>

</td>

<td width="14"><a href="#" onClick="MM_timelineGoto('Timeline2','1');MM_timelinePlay('Timeline2')"><img src="right1.gif" width="12" height="12" alt="顯示" border="0"></a></td>

</tr>

</table>

</div>

 

0 Comments

Mon

02

Mar

2009

188、滚动导航条

188、滚动导航条

脚本说明:

把如下代码加入<body>区域中:

<script language="JavaScript1.2">

//configure the below three variables to change the style of the scroller

var scrollerwidth=300

var scrollerheight=20

var scrollerbgcolor='#ffffff'

 

//configure the below variable to change the contents of the scroller

var messages=new Array()

messages[0]="[<a href=>11111</a>] [<a href=>22222</a>] [<a href=>http://www.7stk.com/</a>]"

messages[1]="[<a href=>AAAAA</a>] [<a href=>BBBBB</a>] [<a href=>CCCCC</a>]"

messages[2]="[<a href=>VVVVV</a>] [<a href=>WWWWW</a>] [<a href=>YYYYY</a>]"

///////Do not edit pass this line///////////////////////

 

if (messages.length>1)

i=2

else

i=0

 

function move1(whichlayer){

tlayer=eval(whichlayer)

if (tlayer.top>0&&tlayer.top<=5){

tlayer.top=0

setTimeout("move1(tlayer)",3000)

setTimeout("move2(document.main.document.second)",3000)

return

}

if (tlayer.top>=tlayer.document.height*-1){

tlayer.top-=5

setTimeout("move1(tlayer)",100)

}

else{

tlayer.top=scrollerheight

tlayer.document.write(messages[i])

tlayer.document.close()

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move2(whichlayer){

tlayer2=eval(whichlayer)

if (tlayer2.top>0&&tlayer2.top<=5){

tlayer2.top=0

setTimeout("move2(tlayer2)",3000)

setTimeout("move1(document.main.document.first)",3000)

return

}

if (tlayer2.top>=tlayer2.document.height*-1){

tlayer2.top-=5

setTimeout("move2(tlayer2)",100)

}

else{

tlayer2.top=scrollerheight

tlayer2.document.write(messages[i])

tlayer2.document.close()

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move3(whichdiv){

tdiv=eval(whichdiv)

if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){

tdiv.style.pixelTop=0

setTimeout("move3(tdiv)",3000)

setTimeout("move4(second2)",3000)

return

}

if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){

tdiv.style.pixelTop-=5

setTimeout("move3(tdiv)",100)

}

else{

tdiv.style.pixelTop=scrollerheight

tdiv.innerHTML=messages[i]

if (i==messages.length-1)

i=0

else

i++

}

}

 

function move4(whichdiv){

tdiv2=eval(whichdiv)

if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){

tdiv2.style.pixelTop=0

setTimeout("move4(tdiv2)",3000)

setTimeout("move3(first2)",3000)

return

}

if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){

tdiv2.style.pixelTop-=5

setTimeout("move4(second2)",100)

}

else{

tdiv2.style.pixelTop=scrollerheight

tdiv2.innerHTML=messages[i]

if (i==messages.length-1)

i=0

else

i++

}

}

 

function startscroll(){

if (document.all){

move3(first2)

second2.style.top=scrollerheight

}

else if (document.layers){

move1(document.main.document.first)

document.main.document.second.top=scrollerheight+5

document.main.document.second.visibility='show'

}

}

 

window.onload=startscroll

 

</script>

<script language="JavaScript1.2">

if (document.all){

document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')

document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')

document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')

document.write(messages[0])

document.writeln('</div>

 

0 Comments

Mon

02

Mar

2009

187、右键点出链接条

187、右键点出链接条

脚本说明:

把如下代码加入<body>区域中

<style>

<!--

.skin0 {

position:absolute;

text-align:left;

width:200px;

border:2px solid black;

background-color:menu;

font-family:Verdana;

line-height:20px;

cursor:default;

visibility:hidden;

}

.skin1 {

cursor:default;

font:menutext;

position:absolute;

text-align:left;

font-family: Arial, Helvetica, sans-serif;

font-size: 10pt;

width:120px;

background-color:menu;

border:1 solid buttonface;

visibility:hidden;

border:2 outset buttonhighlight;

}

.menuitems {

padding-left:15px;

padding-right:10px;

}

-->

</style>

 

<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Web Site:  http://www.painting-effects.co.uk -->

 

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

 

<!-- Begin

var menuskin = "skin1"; // skin0, or skin1

var display_url = 0; // Show URLs in status bar?

function showmenuie5() {

var rightedge = document.body.clientWidth-event.clientX;

var bottomedge = document.body.clientHeight-event.clientY;

if (rightedge < ie5menu.offsetWidth)

ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;

else

ie5menu.style.left = document.body.scrollLeft + event.clientX;

if (bottomedge < ie5menu.offsetHeight)

ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;

else

ie5menu.style.top = document.body.scrollTop + event.clientY;

ie5menu.style.visibility = "visible";

return false;

}

function hidemenuie5() {

ie5menu.style.visibility = "hidden";

}

function highlightie5() {

if (event.srcElement.className == "menuitems") {

event.srcElement.style.backgroundColor = "highlight";

event.srcElement.style.color = "white";

if (display_url)

window.status = event.srcElement.url;

   }

}

function lowlightie5() {

if (event.srcElement.className == "menuitems") {

event.srcElement.style.backgroundColor = "";

event.srcElement.style.color = "black";

window.status = "";

   }

}

function jumptoie5() {

if (event.srcElement.className == "menuitems") {

if (event.srcElement.getAttribute("target") != null)

window.open(event.srcElement.url, event.srcElement.getAttribute("target"));

else

window.location = event.srcElement.url;

   }

}

//  End -->

</script>

<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">

<div class="menuitems" url="javascript:history.back();">返回</div>

<div class="menuitems" url="http://7stk.com">回首页</div>

<hr>

<div class="menuitems" url="http://www.163.com">网易</div>

<div class="menuitems" url="http://www.sohu.com">搜狐</div>

<hr>

<div class="menuitems" url="http://www.sina.com.cn">新浪</div>

<div class="menuitems" url="http://www.yahoo.com.cn">雅虎</div>

</div>

<script language="JavaScript1.2">

if (document.all && window.print) {

ie5menu.className = menuskin;

document.oncontextmenu = showmenuie5;

document.body.onclick = hidemenuie5;

}

</script>

 

 

0 Comments

Mon

02

Mar

2009

186、极酷导航菜单

186、极酷导航菜单

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

var JDWMinNS4   = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;

var JDWMinNS6   = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) == 6) ? 1 : 0;

var JDWMinIE4   = (document.all) ? 1 : 0;

var JDWMinIE5   = (JDWMinIE4 && navigator.appVersion.indexOf("5.")  >= 0) ? 1 : 0;

var JDWMinIE55  = (JDWMinIE5 && navigator.appVersion.indexOf("5.5") >= 0) ? 1 : 0;

function hideLayer(layer) {

if (JDWMinNS4) layer.visibility = "hide";

if (JDWMinIE4) layer.style.visibility = "hidden";

}

function showLayer(layer) {

if (JDWMinNS4) layer.visibility = "show";

if (JDWMinIE4) layer.style.visibility = "visible";

}

function inheritLayer(layer) {

if (JDWMinNS4) layer.visibility = "inherit";

if (JDWMinIE4) layer.style.visibility = "inherit";

}

function getVisibility(layer) {

if (JDWMinNS4) {

if (layer.visibility == "show")

return "visible";

if (layer.visibility == "hide")

return "hidden";

return layer.visibility;

}

if (JDWMinIE4)

return layer.style.visibility;

return "";

}

function moveLayerTo(layer, x, y) {

if (JDWMinNS4)

layer.moveTo(x, y);

if (JDWMinIE4) {

layer.style.left = x;

layer.style.top  = y;

   }

}

function moveLayerBy(layer, dx, dy) {

if (JDWMinNS4)

layer.moveBy(dx, dy);

if (JDWMinIE4) {

layer.style.pixelLeft += dx;

layer.style.pixelTop  += dy;

   }

}

function getLeft(layer) {

if (JDWMinNS4)

return layer.left;

if (JDWMinIE4)

return layer.style.pixelLeft;

return -1;

}

function getTop(layer) {

if (JDWMinNS4)

return layer.top;

if (JDWMinIE4)

return layer.style.pixelTop;

return -1;

}

function getRight(layer) {

if (JDWMinNS4)

return layer.left + getWidth(layer);

if (JDWMinIE4)

return layer.style.pixelLeft + getWidth(layer);

return -1;

}

function getBottom(layer) {

if (JDWMinNS4)

return layer.top + getHeight(layer);

if (JDWMinIE4)

return layer.style.pixelTop + getHeight(layer);

return -1;

}

function getPageLeft(layer) {

var x;

if (JDWMinNS4)

return layer.pageX;

if (JDWMinIE4) {

x = 0;

while (layer.offsetParent != null) {

x += layer.offsetLeft;

layer = layer.offsetParent;

}

x += layer.offsetLeft;

return x;

}

return -1;

}

function getPageTop(layer) {

var y;

if (JDWMinNS4)

return layer.pageY;

if (JDWMinIE4) {

y = 0;

while (layer.offsetParent != null) {

y += layer.offsetTop;

layer = layer.offsetParent;

}

y += layer.offsetTop;

return y;

}

return -1;

}

function getWidth(layer) {

if (JDWMinNS4) {

if (layer.document.width)

return layer.document.width;

else

return layer.clip.right - layer.clip.left;

}

if (JDWMinIE4) {

if (layer.style.pixelWidth)

return layer.style.pixelWidth;

else

return layer.clientWidth;

}

return -1;

}

function getHeight(layer) {

if (JDWMinNS4) {

if (layer.document.height)

return layer.document.height;

else

return layer.clip.bottom - layer.clip.top;

}

if (JDWMinIE4) {

if (layer.style.pixelHeight)

return layer.style.pixelHeight;

else

return layer.clientHeight;

}

return -1;

}

function getzIndex(layer) {

if (JDWMinNS4)

return layer.zIndex;

if (JDWMinIE4)

return layer.style.zIndex;

return -1;

}

function setzIndex(layer, z) {

if (JDWMinNS4)

layer.zIndex = z;

if (JDWMinIE4)

layer.style.zIndex = z;

}

function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {

if (JDWMinNS4) {

layer.clip.left   = clipleft;

layer.clip.top    = cliptop;

layer.clip.right  = clipright;

layer.clip.bottom = clipbottom;

}

if (JDWMinIE4)

layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';

}

function getClipLeft(layer) {

if (JDWMinNS4)

return layer.clip.left;

if (JDWMinIE4) {

var str =  layer.style.clip;

if (!str)

return 0;

var clip = getIEClipValues(layer.style.clip);

return(clip[3]);

}

return -1;

}

function getClipTop(layer) {

if (JDWMinNS4)

return layer.clip.top;

if (JDWMinIE4) {

var str =  layer.style.clip;

if (!str)

return 0;

var clip = getIEClipValues(layer.style.clip);

return clip[0];

}

return -1;

}

function getClipRight(layer) {

if (JDWMinNS4)

return layer.clip.right;

if (JDWMinIE4) {

var str =  layer.style.clip;

if (!str)

return layer.style.pixelWidth;

var clip = getIEClipValues(layer.style.clip);

return clip[1];

}

return -1;

}

function getClipBottom(layer) {

if (JDWMinNS4)

return layer.clip.bottom;

if (JDWMinIE4) {

var str =  layer.style.clip;

if (!str)

return layer.style.pixelHeight;

var clip = getIEClipValues(layer.style.clip);

return clip[2];

}

return -1;

}

function getClipWidth(layer) {

if (JDWMinNS4)

return layer.clip.width;

if (JDWMinIE4) {

var str = layer.style.clip;

if (!str)

return layer.style.pixelWidth;

var clip = getIEClipValues(layer.style.clip);

return clip[1] - clip[3];

}

return -1;

}

function getClipHeight(layer) {

if (JDWMinNS4)

return layer.clip.height;

if (JDWMinIE4) {

var str =  layer.style.clip;

if (!str)

return layer.style.pixelHeight;

var clip = getIEClipValues(layer.style.clip);

return clip[2] - clip[0];

}

return -1;

}

function getIEClipValues(str) {

var clip = new Array();

var i;

i = str.indexOf("(");

clip[0] = parseInt(str.substring(i + 1, str.length), 10);

i = str.indexOf(" ", i + 1);

clip[1] = parseInt(str.substring(i + 1, str.length), 10);

i = str.indexOf(" ", i + 1);

clip[2] = parseInt(str.substring(i + 1, str.length), 10);

i = str.indexOf(" ", i + 1);

clip[3] = parseInt(str.substring(i + 1, str.length), 10);

return clip;

}

function scrollLayerTo(layer, x, y, bound) {

var dx = getClipLeft(layer) - x;

var dy = getClipTop(layer) - y;

scrollLayerBy(layer, -dx, -dy, bound);

}

function scrollLayerBy(layer, dx, dy, bound) {

var cl = getClipLeft(layer);

var ct = getClipTop(layer);

var cr = getClipRight(layer);

var cb = getClipBottom(layer);

if (bound) {

if (cl + dx < 0)

dx = -cl;

else if (cr + dx > getWidth(layer))

dx = getWidth(layer) - cr;

if (ct + dy < 0)

dy = -ct;

else if (cb + dy > getHeight(layer))

dy = getHeight(layer) - cb;

}

clipLayer(layer, cl + dx, ct + dy, cr + dx, cb + dy);

moveLayerBy(layer, -dx, -dy);

}

function setBgColor(layer, color) {

if (JDWMinNS4)

layer.bgColor = color;

if (JDWMinIE4)

layer.style.backgroundColor = color;

}

function setBgImage(layer, src) {

if (JDWMinNS4)

layer.background.src = src;

if (JDWMinIE4)

layer.style.backgroundImage = "url(" + src + ")";

}

function getLayer(name) {

if (JDWMinNS4)

return findLayer(name, document);

if (JDWMinIE4)

return eval('document.all.' + name);

return null;

}

function findLayer(name, doc) {

var i, layer;

for (i = 0; i < doc.layers.length; i++) {

layer = doc.layers[i];

if (layer.name == name)

return layer;

if (layer.document.layers.length > 0)

if ((layer = findLayer(name, layer.document)) != null)

return layer;

}

return null;

}

function getImage(name) {

if (JDWMinNS4) {

return findImage(name, document);

}

if (JDWMinIE4)

return eval('document.all.' + name);

return null;

}

function findImage(name, doc) {

var i, img;

for (i = 0; i < doc.images.length; i++)

if (doc.images[i].name == name)

return doc.images[i];

for (i = 0; i < doc.layers.length; i++)

if ((img = findImage(name, doc.layers[i].document)) != null) {

img.container = doc.layers[i];

return img;

}

return null;

}

function getImagePageLeft(img) {

var x, obj;

if (JDWMinNS4) {

if (img.container != null)

return img.container.pageX + img.x;

else

return img.x;

}

if (JDWMinIE4) {

x = 0;

obj = img;

while (obj.offsetParent != null) {

x += obj.offsetLeft;

obj = obj.offsetParent;

}

x += obj.offsetLeft;

return x;

}

return -1;

}

function getImagePageTop(img) {

var y, obj;

if (JDWMinNS4) {

if (img.container != null)

return img.container.pageY + img.y;

else

return img.y;

}

if (JDWMinIE4) {

y = 0;

obj = img;

while (obj.offsetParent != null) {

y += obj.offsetTop;

obj = obj.offsetParent;

}

y += obj.offsetTop;

return y;

}

return -1;

}

function getWindowWidth() {

if (JDWMinNS4)

return window.innerWidth;

if (JDWMinIE4)

return document.body.clientWidth;

return -1;

}

function getWindowHeight() {

if (JDWMinNS4)

return window.innerHeight;

if (JDWMinIE4)

return document.body.clientHeight;

return -1;

}

function getPageWidth() {

if (JDWMinNS4)

return document.width;

if (JDWMinIE4)

return document.body.scrollWidth;

return -1;

}

function getPageHeight() {

if (JDWMinNS4)

return document.height;

if (JDWMinIE4)

return document.body.scrollHeight;

return -1;

}

function getPageScrollX() {

if (JDWMinNS4)

return window.pageXOffset;

if (JDWMinIE4)

return document.body.scrollLeft;

return -1;

}

function getPageScrollY() {

if (JDWMinNS4)

return window.pageYOffset;

if (JDWMinIE4)

return document.body.scrollTop;

return -1;

}

// dhtml Funcs End.

// bug with IE 5.5.

var JDWITEMs = new Array();    // Used to track all navigation bars.

/*ITEM constructor.*/

function ITEM(text, link) {

this.text = text;    // Item text.

this.link = link;    // Link URL or JavaScript code.

}

/*ECSmenu constructor.*/

function ECSmenu(hdrWidth, menuWidth) {

this.hdrWidth  = hdrWidth;

this.width     = menuWidth;

this.height    = 0;

this.items = new Array();

// Define methods.

this.addItem = ECSmenuaddItem;

}

// ECSmenu methods.

function ECSmenuaddItem(item) {

this.items[this.items.length] = item;

}

// JDWITEM constructor.

function JDWITEM(width) {

this.x = 0;

this.y = 0;

this.width  = width;

this.height = 0;

this.align    = "left";

this.minWidth = 0;

this.inverted = false;

this.menus = new Array();

this.created = false;

// Set default sizes.

this.border    = 2;

this.padding   = 4;

this.separator = 1;

// Set default colors.

this.borderColor  = "#000000";

this.hdrFgColor   = "#000000";

this.hdrBgColor   = "#999999";

this.hdrHiFgColor = "#ffffff";

this.hdrHiBgColor = "#666666";

this.itmFgColor   = "#000000";

this.itmBgColor   = "#cccccc";

this.itmHiFgColor = "#ffffff";

this.itmHiBgColor = "#000080";

// Set default fonts.

this.hdrFontFamily = "Arial,Helvetica,sans-serif";

this.hdrFontStyle  = "plain";

this.hdrFontWeight = "bold";

this.hdrFontSize   = "10pt";

this.itmFontFamily = "MS Sans Serif,Arial,Helvetica,sans-serif";

this.itmFontStyle  = "plain";

this.itmFontWeight = "bold";

this.itmFontSize   = "8pt";

// Define methods.

this.setSizes    = JDWITEMSetSizes;

this.setColors   = JDWITEMSetColors;

this.setFonts    = JDWITEMSetFonts;

this.addNAVm     = JDWITEMaddNAVm;

this.create      = JDWITEMCreate;

this.hide        = JDWITEMHide;

this.show        = JDWITEMShow;

this.moveTo      = JDWITEMMoveTo;

this.moveBy      = JDWITEMMoveBy;

this.getzIndex   = JDWITEMGetzIndex;

this.setzIndex   = JDWITEMSetzIndex;

this.getWidth    = JDWITEMGetWidth;

this.getMinWidth = JDWITEMGetMinWidth;

this.getAlign    = JDWITEMGetAlign;

this.setAlign    = JDWITEMSetAlign;

this.resize      = JDWITEMResize;

this.invert      = JDWITEMInvert;

this.isInverted  = JDWITEMIsInverted;

// Add to the list.

this.index = JDWITEMs.length;

JDWITEMs[this.index] = this;

}

function JDWITEMSetSizes(border, padding, separator) {

if (!this.created) {

this.border = border;

this.padding = padding;

this.separator = separator;

   }

}

function JDWITEMSetColors(bdColor,

hdrFgColor, hdrBgColor, hdrHiFgColor, hdrHiBgColor,

itmFgColor, itmBgColor, itmHiFgColor, itmHiBgColor) {

if (!this.created) {

this.borderColor  = bdColor;

this.hdrFgColor   = hdrFgColor;

this.hdrBgColor   = hdrBgColor;

this.hdrHiFgColor = hdrHiFgColor;

this.hdrHiBgColor = hdrHiBgColor;

this.itmFgColor   = itmFgColor;

this.itmBgColor   = itmBgColor;

this.itmHiFgColor = itmHiFgColor;

this.itmHiBgColor = itmHiBgColor;

   }

}

function JDWITEMSetFonts(hdrFamily, hdrStyle, hdrWeight, hdrSize,

itmFamily, itmStyle, itmWeight, itmSize) {

if (!this.created) {

this.hdrFontFamily = hdrFamily;

this.hdrFontStyle  = hdrStyle;

this.hdrFontWeight = hdrWeight;

this.hdrFontSize   = hdrSize;

this.itmFontFamily = itmFamily;

this.itmFontStyle  = itmStyle;

this.itmFontWeight = itmWeight;

this.itmFontSize   = itmSize;

   }

}

function JDWITEMaddNAVm(menu) {

if (!this.created)

this.menus[this.menus.length] = menu;

}

function JDWITEMCreate() {

var str;

var i, j;

var norm, high, end;

var width, height;

var x, y;

var scrX, scrY;

if (this.created || (!JDWMinNS4 && !JDWMinIE4))

return;

// Build HTML for filler and header layers.

str = "";

// For IE4, need to scroll to end of page before inserting HTML.

if (JDWMinIE4 && !JDWMinIE5) {

scrX = getPageScrollX();

scrY = getPageScrollY();

window.scrollTo(getPageWidth(), getPageHeight());

}

if (JDWMinNS4)

str += '<layer name="JDWITEM' + this.index + '_filler"></layer>\n'

+  '<layer name="JDWITEM' + this.index + '_hdrsBase">\n';

if (JDWMinIE4)

str += '<div id="JDWITEM' + this.index + '_filler"'

+  ' style="position:absolute;">'

+  '</div>\n'

+  '<div id="JDWITEM' + this.index + '_hdrsBase"'

+  ' style="position:absolute;">\n';

// Build HTML for the headers.

for (i = 0; i < this.menus.length; i++) {

norm = '<table border=0 cellpadding=' + this.padding

+ ' cellspacing=0'

+ (this.menus[i].hdrWidth > 0 ? ' width=' + this.menus[i].hdrWidth : '')

+ ((JDWMinIE4 && !JDWMinIE5) ? ' id="JDWITEM' + this.index + '_tbl' + i + '"': '')

+ '><tr><td'

+ (this.menus[i].hdrWidth == 0 ? ' nowrap=1' + this.menus[i].hdrWidth : '')

+ '>'

+ '<span style="color:' + this.hdrFgColor + ';'

+ 'font-family:' + this.hdrFontFamily + ';'

+ 'font-size:' + this.hdrFontSize + ';'

+ 'font-style:' + this.hdrFontStyle + ';'

+ 'font-weight:' + this.hdrFontWeight + ';">';

high = '<table border=0 cellpadding=' + this.padding

+ ' cellspacing=0'

+ (this.menus[i].hdrWidth > 0 ? ' width=' + this.menus[i].hdrWidth : '')

+ '><tr><td'

+ (this.menus[i].hdrWidth == 0 ? ' nowrap=1' + this.menus[i].hdrWidth : '')

+ '>'

+ '<span style="color:' + this.hdrHiFgColor + ';'

+ 'font-family:' + this.hdrFontFamily + ';'

+ 'font-size:' + this.hdrFontSize + ';'

+ 'font-style:' + this.hdrFontStyle + ';'

+ 'font-weight:' + this.hdrFontWeight + ';">';

end  = '</span></td></tr></table>';

if (JDWMinNS4)

str += '<layer name="JDWITEM' + this.index + '_head' + i + '">'

+  norm + this.menus[i].items[0].text + end

+  '</layer>\n'

+  '<layer name="JDWITEM' + this.index + '_headHigh' + i + '">'

+  high + this.menus[i].items[0].text + end

+  '</layer>\n'

+  '<layer name="JDWITEM' + this.index + '_headDummy' + i + '">'

+  '</layer>\n';

if (JDWMinIE4) {

str += '<div id="JDWITEM' + this.index + '_head' + i + '"'

+  ' style="position:absolute;">'

+  norm + this.menus[i].items[0].text + end

+  '</div>\n'

+  '<div id="JDWITEM' + this.index + '_headHigh' + i + '"'

+  ' style="position:absolute;">'

+  high + this.menus[i].items[0].text + end

+  '</div>\n'

+  '<div id="JDWITEM' + this.index + '_headDummy' + i + '"'

+  ' style="position:absolute;">';

if (JDWMinIE55)

str += '<table cellspacing=0 width="100%" height="100%"><tr><td> </td></tr></table>';

str += '</div>\n';

   }

}

if (JDWMinNS4) {

str += '</layer>\n';

this.baseLayer = new Layer(this.width);

this.baseLayer.document.open();

this.baseLayer.document.write(str);

this.baseLayer.document.close();

}

if (JDWMinIE4) {

str += '</div>\n';

str = '<div id="JDWITEM' + this.index + '"'

+ ' style="position:absolute;left:0px;top:0px;">\n'

+ str

+ '</div>\n';

document.body.insertAdjacentHTML("beforeEnd", str);

this.baseLayer = getLayer("JDWITEM" + this.index);

}

// Position and G6JDWinitialize each header.

width = 0;

height = 0;

for (i = 0; i < this.menus.length; i++) {

this.menus[i].hdrNormLayer = getLayer('JDWITEM' + this.index + '_head' + i);

this.menus[i].hdrHighLayer = getLayer('JDWITEM' + this.index + '_headHigh' + i);

this.menus[i].hdrDmmyLayer = getLayer('JDWITEM' + this.index + '_headDummy' + i);

height = Math.max(height, getHeight(this.menus[i].hdrNormLayer));

this.height = height + 2 * this.border;

// Fix for IE4 to resize headers to fit text width.

if (JDWMinIE4 && !JDWMinIE5) {

width = this.menus[i].hdrWidth;

if (width == 0)

width = eval('document.all.JDWITEM' + this.index + '_tbl' + i + '.clientWidth');

JDWITEMIEResizeLayer(this.menus[i].hdrNormLayer, width, height);

JDWITEMIEResizeLayer(this.menus[i].hdrHighLayer, width, height);

JDWITEMIEResizeLayer(this.menus[i].hdrDmmyLayer, width, height);

   }

}

x = this.border;

y = this.border;

for (i = 0; i < this.menus.length; i++) {

width = Math.max(this.menus[i].hdrWidth, getWidth(this.menus[i].hdrNormLayer));

if (this.menus[i].width == 0)

this.menus[i].width = width + 2 * this.border;

moveLayerTo(this.menus[i].hdrNormLayer, x, y);

setBgColor(this.menus[i].hdrNormLayer, this.hdrBgColor);

clipLayer(this.menus[i].hdrNormLayer, 0, 0, width, height);

inheritLayer(this.menus[i].hdrNormLayer);

moveLayerTo(this.menus[i].hdrHighLayer, x, y);

setBgColor(this.menus[i].hdrHighLayer, this.hdrHiBgColor);

clipLayer(this.menus[i].hdrHighLayer, 0, 0, width, height);

hideLayer(this.menus[i].hdrHighLayer);

moveLayerTo(this.menus[i].hdrDmmyLayer, x, y);

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.menus[i].hdrDmmyLayer, width, height);

clipLayer(this.menus[i].hdrDmmyLayer, 0, 0, width, height);

inheritLayer(this.menus[i].hdrDmmyLayer);

this.menus[i].hdrDmmyLayer.highLayer = this.menus[i].hdrHighLayer;

this.menus[i].hdrLeft = x;

x += width + this.border;

this.menus[i].hdrRight = x;

}

// Save resulting width of headers and total width.

this.minWidth = x;

this.width = Math.max(this.minWidth, this.width);

// Position and G6JDWinitialize base, filler and headers base layers.

moveLayerTo(this.baseLayer, this.x, this.y);

setBgColor(this.baseLayer, this.borderColor);

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.baseLayer, this.width, this.height);

clipLayer(this.baseLayer, 0, 0, this.width, this.height);

this.fillerLayer = getLayer('JDWITEM' + this.index + '_filler');

moveLayerTo(this.fillerLayer, this.border, this.border);

setBgColor(this.fillerLayer, this.hdrBgColor);

width = this.width - 2 * this.border;

height = this.height - 2 * this.border;

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.fillerLayer, width, height);

clipLayer(this.fillerLayer, 0, 0, width, height);

inheritLayer(this.fillerLayer);

this.hdrsBaseLayer = getLayer('JDWITEM' + this.index + '_hdrsBase');

if (this.align == "left")

this.hdrsOffsetX = 0;

else if (this.align == "center")

this.hdrsOffsetX = Math.round((this.width - this.minWidth) / 2);

else if (this.align == "right")

this.hdrsOffsetX = this.width - this.minWidth;

else

this.hdrsOffsetX = Math.min(parseInt(this.align, 10), this.width - this.minWidth);

moveLayerTo(this.hdrsBaseLayer, this.hdrsOffsetX, 0);

setBgColor(this.hdrsBaseLayer, this.borderColor);

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.hdrsBaseLayer, this.minWidth, this.height);

clipLayer(this.hdrsBaseLayer, 0, 0, this.minWidth, this.height);

inheritLayer(this.hdrsBaseLayer);

// Set up event handling and positioning for headers.

for (i = 0; i < this.menus.length; i++) {

this.menus[i].hdrDmmyLayer.index = this.index;

this.menus[i].hdrDmmyLayer.offsetX = this.menus[i].hdrLeft - this.border;

if (this.menus[i].hdrDmmyLayer.offsetX + this.menus[i].width > this.width)

this.menus[i].hdrDmmyLayer.offsetX = this.menus[i].hdrRight - this.menus[i].width;

this.menus[i].hdrDmmyLayer.offsetY = this.height - this.border;

this.menus[i].hdrDmmyLayer.onmouseover = JDWITEMHeaderOn;

this.menus[i].hdrDmmyLayer.onmouseout = JDWITEMHeaderOff;

if (JDWMinNS4) {

this.menus[i].hdrDmmyLayer.document.highLayer = this.menus[i].hdrHighLayer;

this.menus[i].hdrDmmyLayer.document.link = this.menus[i].items[0].link;

this.menus[i].hdrDmmyLayer.document.captureEvents(Event.MOUSEUP);

this.menus[i].hdrDmmyLayer.document.onmouseup = JDWITEMItemClick;

}

if (JDWMinIE4) {

this.menus[i].hdrDmmyLayer.highLayer = this.menus[i].hdrHighLayer;

this.menus[i].hdrDmmyLayer.link = this.menus[i].items[0].link;

this.menus[i].hdrDmmyLayer.onclick = JDWITEMItemClick;

   }

}

// Build the drop down menus.

norm = '<table border=0 cellpadding=' + this.padding

+ ' cellspacing=0 width="100%"><tr><td>'

+ '<span style="color:' + this.itmFgColor + ';'

+ 'font-family:' + this.itmFontFamily + ';'

+ 'font-size:' + this.itmFontSize + ';'

+ 'font-style:' + this.itmFontStyle + ';'

+ 'font-weight:' + this.itmFontWeight + ';">';

high = '<table border=0 cellpadding=' + this.padding

+ ' cellspacing=0 width="100%"><tr><td>'

+ '<span style="color:' + this.itmHiFgColor + ';'

+ 'font-family:' + this.itmFontFamily + ';'

+ 'font-size:' + this.itmFontSize + ';'

+ 'font-style:' + this.itmFontStyle + ';'

+ 'font-weight:' + this.itmFontWeight + ';">';

end  = '</span></td></tr></table>';

for (i = 0; i < this.menus.length; i++) {

width = this.menus[i].width - 2 * this.border;

str = "";

for (j = 1; j < this.menus[i].items.length; j++) {

if (JDWMinNS4)

str += '<layer name="JDWITEM' + this.index + '_menu' + i + '_norm' + j + '"'

+  ' width=' + width + '>'

+  norm + this.menus[i].items[j].text + end

+  '</layer>\n'

+  '<layer name="JDWITEM' + this.index + '_menu' + i + '_high' + j + '"'

+  ' width=' + width + '>'

+  high + this.menus[i].items[j].text + end

+  '</layer>\n'

+  '<layer name="JDWITEM' + this.index + '_menu' + i + '_dmmy' + j + '"'

+  ' width=' + width + '>'

+  '</layer>\n';

if (JDWMinIE4) {

str += '<div id="JDWITEM' + this.index + '_menu' + i + '_norm' + j + '"'

+  ' style="position:absolute;width:' + width + 'px;">'

+  norm + this.menus[i].items[j].text + end

+  '</div>\n'

+  '<div id="JDWITEM' + this.index + '_menu' + i + '_high' + j + '"'

+  ' style="position:absolute;width:' + width + 'px;">'

+  high + this.menus[i].items[j].text + end

+  '</div>\n'

+  '<div id="JDWITEM' + this.index + '_menu' + i + '_dmmy' + j + '"'

+  ' style="position:absolute;width:' + width + 'px;">';

if (JDWMinIE55)

str += '<table cellspacing=0 width="100%" height="100%"><tr><td> </td></tr></table>';

str += '</div>\n';

   }

}

if (JDWMinNS4) {

this.menus[i].baseLayer = new Layer(this.menus[i].width);

this.menus[i].baseLayer.document.open();

this.menus[i].baseLayer.document.write(str);

this.menus[i].baseLayer.document.close();

}

if (JDWMinIE4) {

str = '<div id="JDWITEM' + this.index + '_menu' + i + '"'

+ ' style="position:absolute;left:0px; top:0px;'

+ 'width:' + this.menus[i].width + 'px;visibility:hidden;">\n'

+ str

+ '</div>\n';

document.body.insertAdjacentHTML("beforeEnd", str);

this.menus[i].baseLayer = getLayer("JDWITEM" + this.index + "_menu" + i);

   }

}

// Restore original scroll position in IE4.

if (JDWMinIE4 && !JDWMinIE5)

window.scrollTo(x, y);

// Position and G6JDWinitialize each menu.

for (i = 0; i < this.menus.length; i++) {

moveLayerTo(this.menus[i].baseLayer, this.menus[i].hdrDmmyLayer.offsetX, this.menus[i].hdrDmmyLayer.offsetY);

setBgColor(this.menus[i].baseLayer, this.borderColor);

if (this.menus[i].items.length > 1) {

this.menus[i].hdrDmmyLayer.menuLayer = this.menus[i].baseLayer;

if (JDWMinNS4)

this.menus[i].hdrDmmyLayer.document.menuLayer = this.menus[i].baseLayer;

}

else {

this.menus[i].hdrDmmyLayer.menuLayer = null;

if (JDWMinNS4)

this.menus[i].hdrDmmyLayer.document.menuLayer = this.menus[i].baseLayer;

}

// Position and G6JDWinitialize each item in the menu.

x = this.border;

y = this.border;

width = this.menus[i].width - 2 * this.border;

for (j = 1; j < this.menus[i].items.length; j++) {

this.menus[i].items[j].normLayer = getLayer('JDWITEM' + this.index + '_menu' + i + '_norm' + j);

this.menus[i].items[j].highLayer = getLayer('JDWITEM' + this.index + '_menu' + i + '_high' + j);

this.menus[i].items[j].dmmyLayer = getLayer('JDWITEM' + this.index + '_menu' + i + '_dmmy' + j);

height = getHeight(this.menus[i].items[j].normLayer);

moveLayerTo(this.menus[i].items[j].normLayer, x, y);

setBgColor(this.menus[i].items[j].normLayer, this.itmBgColor);

clipLayer(this.menus[i].items[j].normLayer, 0, 0, width, height);

inheritLayer(this.menus[i].items[j].normLayer);

moveLayerTo(this.menus[i].items[j].highLayer, x, y);

setBgColor(this.menus[i].items[j].highLayer, this.itmHiBgColor);

clipLayer(this.menus[i].items[j].highLayer, 0, 0, width, height);

hideLayer(this.menus[i].items[j].highLayer);

moveLayerTo(this.menus[i].items[j].dmmyLayer, x, y);

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.menus[i].items[j].dmmyLayer, width, height);

clipLayer(this.menus[i].items[j].dmmyLayer, 0, 0, width, height);

inheritLayer(this.menus[i].items[j].dmmyLayer);

this.menus[i].items[j].dmmyLayer.highLayer = this.menus[i].items[j].highLayer;

this.menus[i].items[j].dmmyLayer.onmouseover = JDWITEMItemOn;

this.menus[i].items[j].dmmyLayer.onmouseout = JDWITEMItemOff;

if (JDWMinNS4) {

this.menus[i].items[j].dmmyLayer.document.highLayer = this.menus[i].items[j].highLayer;

this.menus[i].items[j].dmmyLayer.document.parentHighLayer = this.menus[i].hdrHighLayer;

this.menus[i].items[j].dmmyLayer.document.menuLayer = this.menus[i].baseLayer;

this.menus[i].items[j].dmmyLayer.document.link = this.menus[i].items[j].link;

this.menus[i].items[j].dmmyLayer.document.captureEvents(Event.MOUSEUP);

this.menus[i].items[j].dmmyLayer.document.onmouseup = JDWITEMItemClick;

}

if (JDWMinIE4) {

this.menus[i].items[j].dmmyLayer.highLayer = this.menus[i].items[j].highLayer;

this.menus[i].items[j].dmmyLayer.parentHighLayer = this.menus[i].hdrHighLayer;

this.menus[i].items[j].dmmyLayer.menuLayer = this.menus[i].baseLayer;

this.menus[i].items[j].dmmyLayer.link = this.menus[i].items[j].link;

this.menus[i].items[j].dmmyLayer.onclick = JDWITEMItemClick;

}

y += height + this.separator;

}

width = this.menus[i].width;

height = y - this.separator + this.border;

this.menus[i].baseLayer.width = this.menus[i].width;

this.menus[i].baseLayer.height = height;

if (JDWMinIE4)

JDWITEMIEResizeLayer(this.menus[i].baseLayer, width, height);

clipLayer(this.menus[i].baseLayer, 0, 0, width, height);

this.menus[i].baseLayer.parentHighLayer = this.menus[i].hdrHighLayer;

this.menus[i].baseLayer.onmouseout = ECSmenuOff;

}

this.created = true;

this.resize(this.width);

showLayer(this.baseLayer);

}

function JDWITEMHide() {

if (this.created)

hideLayer(this.baseLayer);

}

function JDWITEMShow() {

if (this.created)

showLayer(this.baseLayer);

}

function JDWITEMMoveTo(x, y) {

this.x = x;

this.y = y;

if (this.created)

moveLayerTo(this.baseLayer, this.x, this.y);

}

function JDWITEMMoveBy(dx, dy) {

this.x += dx;

this.y += dy;

if (this.created)

moveLayerTo(this.baseLayer, this.x, this.y);

}

function JDWITEMGetzIndex() {

if (this.created)

return getzIndex(this.baseLayer);

return 0;

}

function JDWITEMSetzIndex(z) {

var i;

if (this.created) {

setzIndex(this.baseLayer, z);

for (i = 0; i < this.menus.length; i++)

setzIndex(this.menus[i].baseLayer, z);

   }

}

function JDWITEMGetWidth() {

return this.width;

}

function JDWITEMGetMinWidth() {

return this.minWidth;

}

function JDWITEMGetAlign() {

return this.align;

}

function JDWITEMSetAlign(align) {

this.align = align;

if (this.created)

this.resize(this.width);

}

function JDWITEMResize(width) {

if (this.created) {

this.width = Math.max(width, this.minWidth);

if (JDWMinIE4) {

JDWITEMIEResizeLayer(this.fillerLayer, this.width - 2 * this.border, this.height - 2 * this.border);

JDWITEMIEResizeLayer(this.baseLayer, this.width, this.height);

}

clipLayer(this.fillerLayer, 0, 0, this.width - 2 * this.border, this.height - 2 * this.border);

clipLayer(this.baseLayer, 0, 0, this.width, this.height);

if (this.align == "left")

this.hdrsOffsetX = 0;

else if (this.align == "center")

this.hdrsOffsetX = Math.round((this.width - this.minWidth) / 2);

else if (this.align == "right")

this.hdrsOffsetX = this.width - this.minWidth;

else

this.hdrsOffsetX = Math.min(parseInt(this.align, 10), this.width - this.minWidth);

moveLayerTo(this.hdrsBaseLayer, this.hdrsOffsetX, 0);

for (i = 0; i < this.menus.length; i++) {

this.menus[i].hdrDmmyLayer.offsetX = this.menus[i].hdrLeft - this.border;

if (this.hdrsOffsetX + this.menus[i].hdrDmmyLayer.offsetX + this.menus[i].width > this.width)

this.menus[i].hdrDmmyLayer.offsetX = this.menus[i].hdrRight - this.menus[i].width;

   }

}

else

this.width = width;

}

function JDWITEMInvert() {

this.inverted = !this.inverted;

}

function JDWITEMIsInverted() {

return this.inverted;

}

// Layer resize function for IE.

function JDWITEMIEResizeLayer(layer, width, height) {

layer.style.pixelWidth = width;

layer.style.pixelHeight = height;

}

// Event handlers for the navigation bar.

function JDWITEMHeaderOn(e) {

var bar;

var x, y;

bar = JDWITEMs[this.index];

// Position drop down menu.

if (this.menuLayer != null) {

x = bar.x + bar.hdrsOffsetX + this.offsetX;

y = bar.y + this.offsetY;

if (bar.inverted)

y = bar.y - this.menuLayer.height + bar.border;

moveLayerTo(this.menuLayer, x, y);

// Save drop down menu position and show it.

this.menuLayer.left = getPageLeft(this.menuLayer);

this.menuLayer.top = getPageTop(this.menuLayer);

this.menuLayer.right = this.menuLayer.left + this.menuLayer.width + 1;

this.menuLayer.bottom = this.menuLayer.top + this.menuLayer.height + 1;

}

// Hide any currently active header and drop down.

if (JDWMinIE4) {

if (bar.activeHeader != null && bar.activeHeader != this) {

hideLayer(bar.activeHeader.highLayer);

if (bar.activeHeader.menuLayer != null)

hideLayer(bar.activeHeader.menuLayer);

}

bar.activeHeader = this;

}

// Display the header highlight layer and drop down menu.

showLayer(this.highLayer);

if (this.menuLayer != null)

showLayer(this.menuLayer);

}

function JDWITEMHeaderOff(e) {

// If over drop down menu, exit. Otherwise hide menu and highlight layers.

if (this.menuLayer != null) {

if (JDWMinIE4) {

mouseX = window.event.clientX + document.body.scrollLeft;

mouseY = window.event.clientY + document.body.scrollTop;

}

if (mouseX >= this.menuLayer.left  &&

mouseX <= this.menuLayer.right &&

mouseY >= this.menuLayer.top   &&

mouseY <= this.menuLayer.bottom)

return;

hideLayer(this.menuLayer);

}

hideLayer(this.highLayer);

}

function ECSmenuOff(e) {

// If over header, exit.

if (JDWMinIE4) {

mouseX = window.event.clientX + document.body.scrollLeft;

mouseY = window.event.clientY + document.body.scrollTop;

if (mouseX >= this.left  &&

mouseX <= this.right &&

mouseY >= this.top   &&

mouseY <= this.bottom)

return;

}

// Otherwise, hide menu and header highlight layers.

hideLayer(this);

hideLayer(this.parentHighLayer);

}

function JDWITEMItemOn() {

showLayer(this.highLayer);

}

function JDWITEMItemOff() {

hideLayer(this.highLayer);

}

function JDWITEMItemClick(e) {

// If there is no link, exit.

if (this.link == "")

return true;

// Hide the drop down menu and highlight layer.

if (this.menuLayer != null) {

hideLayer(this.menuLayer);

}

if (this.parentHighLayer != null) {

hideLayer(this.parentHighLayer);

}

hideLayer(this.highLayer);

// If the link starts with "javascript:" execute the code. Otherwise just

// link to the URL.

if (this.link.indexOf("javascript:") == 0)

eval(this.link);

else

window.location.href = this.link;

return true;

}

// MOUSE TRACKING

// These variables will hold the current mouse pointer position.

var mouseX = 0;

var mouseY = 0;

// Set up event capturing.

if (JDWMinNS4)

document.captureEvents(Event.MOUSEMOVE);

document.onmousemove = JDWITEMGetMousePosition;

function JDWITEMGetMousePosition(e) {

// Save mouse pointer position.

if (JDWMinNS4) {

mouseX = e.pageX;

mouseY = e.pageY;

}

if (JDWMinIE4) {

mouseX = window.event.clientX + document.body.scrollLeft;

mouseY = window.event.clientY + document.body.scrollTop;

   }

}

// EVENT: Window Resizing

// These variables are used to determine if a resize event is a true one in

// older releases of NS4.

var origWidth;

var origHeight;

// Reload page in case of a browser resize.

if (JDWMinNS4) {

origWidth  = window.innerWidth;

origHeight = window.innerHeight;

}

window.onresize = JDWITEMReload;

function JDWITEMReload() {

if (JDWMinNS4 && origWidth == window.innerWidth && origHeight == window.innerHeight)

return;

// For IE, reload on a timer in case the Windows 'Show window contents while

// dragging' display option is on.

if (JDWMinIE4)

setTimeout('window.location.href = window.location.href', 2000);

else

window.location.href = window.location.href;

}

function G6JDWinit()

{

fullWidth = getWindowWidth() - (JDWMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

JDWBAR1.create();

JDWBAR1.moveTo(0,-getWindowHeight()+43);

JDWBAR1.setzIndex(1);

JDWBAR1.resize(fullWidth);

JDWBAR1.setAlign(getWindowWidth()+60);

JDWBAR1.hide();JDWBAR2.create();

JDWBAR2.moveBy(0,-getWindowHeight()+17);

JDWBAR2.resize(fullWidth);

JDWBAR2.setzIndex(2);

NAVupdatePOSY();

}

/* Fire It Up!! */

window.onload=G6JDWinit;

function NAVupdatePOSY() {

var viewTop;

var viewBottom;

var dy;

viewTop = getPageScrollY();

viewBottom = viewTop + getWindowHeight();

dy = Math.round(Math.abs(viewTop - JDWBAR1.y)); /* NO ANIM */

if (viewTop < JDWBAR1.y) dy = -dy;

dy = Math.round(Math.abs(viewTop - JDWBAR2.y)); /* NO ANIM */

if (viewTop < JDWBAR2.y) dy = -dy;

if (JDWBAR1.bottom < viewTop)

JDWBAR1.moveTo(0, viewTop - JDWBAR1.height);

if (JDWBAR1.top > viewBottom)

JDWBAR1.moveTo(0, viewBottom);

if (JDWBAR2.bottom < viewTop)

JDWBAR2.moveTo(0, viewTop - JDWBAR2.height);

if (JDWBAR2.top > viewBottom)

JDWBAR2.moveTo(0, viewBottom);

JDWBAR1.moveBy(0, dy);

JDWBAR2.moveBy(0, dy);

setTimeout('NAVupdatePOSY()', 0); /* INFINITLY SMALL VALUE */

}

/*************

This Is a Function To Maximize The Window in MSIE and NS. When Called, The Window Will Maximize.

*************/

function maximizeWin() {

if (window.screen) {

var aw = screen.availWidth;

var ah = screen.availHeight;

window.moveTo(0, 0);

window.resizeTo(aw, ah);

   }

}

 

/*

MENU ITEMS:

(Border col, menu title col, top menu BGcolor,

title selected font col, main sel bgcol, dd font

col, ddbgc, ddfont sel col, dd sel bgcol,

*/ 

 

// ___________________________________

var JDWBAR2 = new JDWITEM(0);

JDWBAR2.setSizes   (1, 4, 1);

JDWBAR2.setColors  ("#808080","#FFFFFF","#000000","#000000","#0D7CA1","#FFFFFF","#000000","#000000","#0D7CA1");

JDWBAR2.setFonts   ("Arial, Verdana","plain","bold","10px","Arial, Verdana","plain","bold","10px");

var JDWBAR1 = new JDWITEM(0);

JDWBAR1.setSizes   (1, 1, 1);

JDWBAR1.setColors  ("#000000","#000000","#F5E4C1","#000000","#1CA0E4","#000000","#F5E4C1","#000000","#1CA0E4");

JDWBAR1.setFonts   ("Arial, Verdana","plain","bold","10px","Arial, Verdana","plain","bold","10px");

// ___________________________________

 

/* MENU ITEMS */

siteMenu = new ECSmenu(0, 80); // 80 = width in pixels of menu

siteMenu.addItem(new ITEM("<center> HOME </center>", "index.html"));

siteMenu.addItem(new ITEM("  Go Home", "http://javacool.3322.net"));

siteMenu.addItem(new ITEM("  Contribute", "http://javacool.3322.net"));

siteMenu.addItem(new ITEM("  Link to Us", "http://javacool.3322.net"));

siteMenu.addItem(new ITEM("  Feedback", "http://javacool.3322.net"));

JDWBAR2.addNAVm(siteMenu); // add this menu category

 

siteMenu = new ECSmenu(0, 100);

siteMenu.addItem(new ITEM("<center> SCRIPTS </center>", ""));

siteMenu.addItem(new ITEM("<center>What's New?</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>All Categories</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>A-Z Script List</center>","http://javascriptsource.com/master-list.html"));

siteMenu.addItem(new ITEM("<center>JS Books</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>JS Tutorial</center>","http://javacool.3322.net"));

JDWBAR2.addNAVm(siteMenu);

 

siteMenu = new ECSmenu(0, 100);

siteMenu.addItem(new ITEM("<center> JS FORUM </center>", ""));

siteMenu.addItem(new ITEM("<center>How Do I....?</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>Intro to JS</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>Script Help</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>Script Requests</center>","http://javacool.3322.net"));

JDWBAR2.addNAVm(siteMenu);

 

siteMenu = new ECSmenu(0, 100);

siteMenu.addItem(new ITEM("<center> HELP </center>", ""));

siteMenu.addItem(new ITEM("<center>Site FAQs</center>","http://javacool.3322.net"));

siteMenu.addItem(new ITEM("<center>JS Forum</center>","http://javacool.3322.net"));

JDWBAR2.addNAVm(siteMenu);

 

</script>

 

0 Comments

Mon

02

Mar

2009

185、动态说明导航框1

185、动态说明导航框1

脚本说明:

第一步:把如下代码加入<body>区域中:

<script LANGUAGE="JavaScript">

<!-- Beginning of JavaScript -

// Your messages. Add as many as you like

var message=new Array()

message[0]="欢迎光临国内最大的新闻站点---新浪网!"

message[1]="欢迎光临国内最大的综合性站点---网易!"

message[2]="欢迎光临国内最大的网页特效代码!"

 

// the URLs of your messages

var messageurl=new Array()

messageurl[0]="http://www.sina.com.cn/"

messageurl[1]="http://www.163.com/"

messageurl[2]="http://www.7stk.com/"

 

// the targets of the links

// accepted values are '_blank' or '_top' or '_parent' or '_self'

// or the name of your target-window (for instance 'main')

var messagetarget=new Array()

messagetarget[0]="_blank"

messagetarget[1]="_blank"

messagetarget[2]="_blank"

 

// the text of your links. In this sample it's the word 'more'

var linktext="去看看"

// font-size

var fntsize=11

 

// font-color

var fntcolor="FFFF00"

 

// font-family

var fntfamily="Verdana"

 

// font-weight: 1 means bold, 0 means normal

var fntweight=0

 

// standstill of each image(seconds)

var pause=3

 

var backgroundcolor="444444"

 

// horizontal position of the slideshow (distance to the left margin of the browser-window, pixels)

var posleft=5

 

// vertical position of the slideshow (distance to the top margin of the browser-window, pixels)

var postop=5

 

// width of the textbox (pixels)

var scrollerwidth=200

 

// height of the textbox (pixels)

var scrollerheight=150

 

// width of the border (pixels)

var scrollerborder=2

 

// width of the textpadding (pixels)

var textpadding=15

 

// do not edit the variables below

var textwidth=scrollerwidth-(2*textpadding)

var textcontent=""

var bgcontent=""

var i_message=0

var i_stepwave=0

var i_maxstepwave=20

pause=pause*1000

if (fntweight==1) {fntweight="700"}

else {fntweight="100"}

 

function initiate() {

gettextcontent()

getbgcontent()

if (document.all) {

wavemessage.innerHTML=textcontent

wavemessagebg.innerHTML=bgcontent

wavemessagebg.style.posLeft=posleft

wavemessagebg.style.posTop=postop

wavemessage.style.posLeft=posleft+textpadding

wavemessage.style.posTop=postop+textpadding

enlargewave()

}

if (document.layers) {

document.wavemessage.left=posleft+textpadding

document.wavemessage.top=postop+textpadding

document.wavemessagebg.document.write(bgcontent)

document.wavemessagebg.document.close()

document.wavemessagebg.left=posleft

document.wavemessagebg.top=postop

changemessage()

}

}

 

function enlargewave() {

if (i_stepwave<=i_maxstepwave) {

wavemessage.filters.wave.phase=i_stepwave

wavemessage.filters.wave.strength=i_stepwave

wavemessage.filters.wave.lightstrength=i_stepwave

wavemessage.filters.wave.freq=i_stepwave

i_stepwave++

var timer=setTimeout("enlargewave()",50)

}

else {

clearTimeout(timer)

changemessage()

}

}

 

function reducewave() {

if (i_stepwave>0) {

wavemessage.filters.wave.phase=i_stepwave

wavemessage.filters.wave.strength=i_stepwave

wavemessage.filters.wave.lightstrength=i_stepwave

wavemessage.filters.wave.freq=i_stepwave

i_stepwave--

var timer=setTimeout("reducewave()",50)

}

else {

clearTimeout(timer)

var timer=setTimeout("enlargewave()",pause)

}

}

 

function changemessage() {

i_message++

if (i_message>=message.length) {i_message=0}

gettextcontent()

 

if (document.all) {

wavemessage.innerHTML=textcontent

reducewave()

}

 

if (document.layers) {

document.wavemessage.document.write(textcontent)

document.wavemessage.document.close()

var timer=setTimeout("changemessage()",pause)

}

 

}

 

function gettextcontent() {

textcontent="<span style='font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+";width:"+textwidth+"px'>"

textcontent+="<font color="+fntcolor+">"+message[i_message]+"</font> "

textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">"

textcontent+="<br><br><font color="+fntcolor+">"+linktext+"</font></a></span>"

}

 

function getbgcontent() {

bgcontent="<table width="+scrollerwidth+" height="+scrollerheight+" border="+scrollerborder+"><tr><td bgcolor="+backgroundcolor+"> </td></tr></table>"

}

 

// - End of JavaScript - -->

</script>

<div ID="wavemessagebg" style="position:absolute;">

</div>

<div ID="wavemessage" style="position:absolute; filter:wave()">

</div>

<div id="deletethisblock" style="position:absolute;top:5px;left:220px;">

</div>

 

 

 

 

第二步:把<body>中的内容改为:

<body bgcolor="#fef4d9" onLoad="initiate()">

 

0 Comments

Mon

02

Mar

2009

184、无限级树型菜单

184、无限级树型菜单

1    把如下代码复制到<head></head>之间

 

<script type="text/javascript">

var temp, temp2, cookieArray, cookieArray2, cookieCount;

 

function initiate(){

 

  cookieCount=0;

 

  if(document.cookie){

 

    cookieArray=document.cookie.split(";");

    cookieArray2=new Array();

 

    for(i in cookieArray){

      cookieArray2[cookieArray[i].split("=")[0].replace(/ /g,"")]=cookieArray[i].split("=")[1].replace(/ /g,"");

    }

 

  }

 

  cookieArray=(document.cookie.indexOf("state=")>=0)?cookieArray2["state"].split(","):new Array();

 

  temp=document.getElementById("containerul");

 

  for(var o=0;o<temp.getElementsByTagName("li").length;o++){

 

    if(temp.getElementsByTagName("li")[o].getElementsByTagName("ul").length>0){

 

      temp2                       = document.createElement("span");

      temp2.className                     = "symbols";

      temp2.style.backgroundImage   = (cookieArray.length>0)?((cookieArray[cookieCount]=="true")?"url(sto/minus.png)":"url(sto/plus.png)"):"url(sto/plus.png)";

      temp2.onclick=function(){

        showhide(this.parentNode);

        writeCookie();

      }

 

      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild)

 

      temp.getElementsByTagName("li")[o].getElementsByTagName("ul")[0].style.display = "none";

 

      if(cookieArray[cookieCount]=="true"){

        showhide(temp.getElementsByTagName("li")[o]);

      }

 

      cookieCount++;

 

    }

    else{

 

      temp2                       = document.createElement("span");

      temp2.className                     = "symbols";

      temp2.style.backgroundImage   = "url(sto/page.png)";

 

      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild);

 

    }

 

  }

 

}

 

 

 

function showhide(el){

 

  el.getElementsByTagName("ul")[0].style.display=(el.getElementsByTagName("ul")[0].style.display=="block")?"none":"block";

 

  el.getElementsByTagName("span")[0].style.backgroundImage=(el.getElementsByTagName("ul")[0].style.display=="block")?"url(sto/minus.png)":"url(sto/plus.png)";

 

}

 

 

 

function writeCookie(){        // Runs through the menu and puts the "states" of each nested list into an array, the array is then joined together and assigned to a cookie.

 

  cookieArray=new Array()

 

  for(var q=0;q<temp.getElementsByTagName("li").length;q++){

 

    if(temp.getElementsByTagName("li")[q].childNodes.length>0){

      if(temp.getElementsByTagName("li")[q].childNodes[0].nodeName=="SPAN" && temp.getElementsByTagName("li")[q].getElementsByTagName("ul").length>0){

 

        cookieArray[cookieArray.length]=(temp.getElementsByTagName("li")[q].getElementsByTagName("ul")[0].style.display=="block");

 

      }

    }

 

  }

 

  document.cookie="state="+cookieArray.join(",")+";expires="+new Date(new Date().getTime() + 365*24*60*60*1000).toGMTString();

 

}

 

</script>

 

<style type="text/css"><!--

 

#containerul, #containerul ul{

  text-align:left;

  margin:0;                         /* Removes browser default margins applied to the lists. */

  padding:0;                        /* Removes browser default padding applied to the lists. */

}

 

#containerul li{

  margin:0 0 0 30px;                  /* A left margin to indent the list items and give the menu a sense of structure. */

  padding:0;                        /* Removes browser default padding applied to the list items. */

  list-style-type:none;                  /* Removes the bullet point that usually goes next to each item in a list. */

}

 

#containerul .symbols{                /* Various styles to position the symbols next to the items in the menu. */

  float:left;

  width:12px;

  height:1em;

  background-position:0 50%;

  background-repeat:no-repeat;

}

 

--></style>

 

 

2       把如下代码复制到<body></body>之间

 

 

 

 

 

 

 

<ul id="containerul">

  <li> 精彩网站

    <ul>

      <li> <a href="http://7stk.com">网页特效集锦</a>

      </li>

      <li>

        <a href="http://7stk.com/tool/">网页工具库</a>

      </li>

      <li>

        <a href="http://7stk.com/tool/html_edit.htm">在线html编辑器</a>

      </li>

    </ul>

  </li>

  <li> 网页特效集锦

    <ul>

      <li>

        <a href="http://7stk.com/">网站栏目</a>

        <ul>

          <li>

            <a href="http://7stk.com/background/index.htm">背景特效</a>

          </li>

          <li>

            <a href="http://7stk.com/moban/index.htm">整站模板</a>

          </li>

          <li>

            <a href="http://7stk.com/img/index.htm">图片特效</a>

          </li>

        </ul>

      </li>

    </ul>

  </li>

</ul>

 

<p>

  <script type="text/javascript">

initiate();        // This must be placed immediately after the menu in order to format it properly.

</script>

</p>

0 Comments

Mon

02

Mar

2009

183、模仿桌面右键菜单

183、模仿桌面右键菜单

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>新建网页 1</title>

<style type="text/css">

  <!--

  body           {font-size: 9pt;}

  table          {font-size: 9pt; cursor: default; margin: 0;}

  tr             {height: 20;}

  tr.over        {font-size: 9pt; color: #ffffff; background-color: #000080; cursor: default;}

  tr.out         {font-size: 9pt; color: #000000; background-color: #D4D0C8; cursor: default;}

  div.rm_div     {position: absolute; filter: Alpha(Opacity='95'); display: none; background-color: #D4D0C8; border: 2px outset #FFFFFF;width: 0; height: 0;padding:1}

  hr.sperator    {width:95%;border: 1px inset #FFFFFF;}

  -->

  </style>

  <script language="JScript">

  <!--

  function RightMenu()

  {

    this.AddExtendMenu=AddExtendMenu;

    this.AddItem=AddItem;

    this.GetMenu=GetMenu;

    this.HideAll=HideAll;

    this.I_OnMouseOver=I_OnMouseOver;

    this.I_OnMouseOut=I_OnMouseOut;

    this.I_OnMouseUp=I_OnMouseUp;

    this.P_OnMouseOver=P_OnMouseOver;

    this.P_OnMouseOut=P_OnMouseOut;

    A_rbpm = new Array();

    HTMLstr  = "";

    HTMLstr += "<!-- RightButton PopMenu -->\n";

    HTMLstr += "\n";

    HTMLstr += "<!-- PopMenu Starts -->\n";

    HTMLstr += "<div id='E_rbpm' class='rm_div'>\n";

                        // rbpm = right button pop menu

    HTMLstr += "<table width='100%' border='0' cellspacing='0'>\n";

    HTMLstr += "<!-- Insert A Extend Menu or Item On Here For E_rbpm -->\n";

    HTMLstr += "</table>\n";

    HTMLstr += "</div>\n";

    HTMLstr += "<!-- Insert A Extend_Menu Area on Here For E_rbpm -->";

    HTMLstr += "\n";

    HTMLstr += "<!-- PopMenu Ends -->\n";

  }

  function AddExtendMenu(id,name,parent)

  {

    var TempStr = "";

 

    eval("A_"+parent+".length++");

    eval("A_"+parent+"[A_"+parent+".length-1] = id");  // 将此项注册到父菜单项的ID数组中去

    TempStr += "<div id='E_"+id+"' class='rm_div'>\n";

    TempStr += "<table width='100%' border='0' cellspacing='0'>\n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+id+" -->";

    TempStr += "</table>\n";

    TempStr += "</div>\n";

    TempStr += "<!-- Insert A Extend_Menu Area on Here For E_"+id+" -->";

    TempStr += "<!-- Insert A Extend_Menu Area on Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend_Menu Area on Here For E_"+parent+" -->",TempStr);

   

    eval("A_"+id+" = new Array()");

    TempStr  = "";

    TempStr += "<!-- Extend Item : P_"+id+" -->\n";

    TempStr += "<tr id='P_"+id+"' class='out'";

    TempStr += " onmouseover='P_OnMouseOver(\""+id+"\",\""+parent+"\")'";

    TempStr += " onmouseout='P_OnMouseOut(\""+id+"\",\""+parent+"\")'";

    TempStr += " onmouseup=window.event.cancelBubble=true;";

    TempStr += " onclick=window.event.cancelBubble=true;";

    TempStr += "><td nowrap>";

    TempStr += "  "+name+"   </td><td style='font-family: webdings; text-align: ;'>4";

    TempStr += "</td></tr>\n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

  }

  function AddItem(id,name,parent,location)

  {

    var TempStr = "";

    var ItemStr = "<!-- ITEM : I_"+id+" -->";

    if(id == "sperator")

    {

      TempStr += ItemStr+"\n";

      TempStr += "<tr class='out' onclick='window.event.cancelBubble=true;' onmouseup='window.event.cancelBubble=true;'><td colspan='2' height='1'><hr class='sperator'></td></tr>";

      TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

      HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

      return;

    }

    if(HTMLstr.indexOf(ItemStr) != -1)

    {

      alert("I_"+id+"already exist!");

      return;

    }

    TempStr += ItemStr+"\n";

    TempStr += "<tr id='I_"+id+"' class='out'";

    TempStr += " onmouseover='I_OnMouseOver(\""+id+"\",\""+parent+"\")'";

    TempStr += " onmouseout='I_OnMouseOut(\""+id+"\")'";

    TempStr += " onclick='window.event.cancelBubble=true;'";

    if(location == null)

      TempStr += " onmouseup='I_OnMouseUp(\""+id+"\",\""+parent+"\",null)'";

    else

      TempStr += " onmouseup='I_OnMouseUp(\""+id+"\",\""+parent+"\",\""+location+"\")'";

    TempStr += "><td nowrap>";

    TempStr += "  "+name+"  ";

    TempStr += "</td><td></td></tr>\n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

  }

  function GetMenu()

  {

    return HTMLstr;

  }

  function I_OnMouseOver(id,parent)

  {

    var Item;

    if(parent != "rbpm")

    {

      var ParentItem;

      ParentItem = eval("P_"+parent);

      ParentItem.className="over";

    }

    Item = eval("I_"+id);

    Item.className="over";

    HideAll(parent,1);

  }

  function I_OnMouseOut(id)

  {

    var Item;

    Item = eval("I_"+id);

    Item.className="out";

  }

  function I_OnMouseUp(id,parent,location)

  {

    var ParentMenu;

    window.event.cancelBubble=true;

    OnClick();

    ParentMenu = eval("E_"+parent);

    ParentMenu.display="none";

    if(location == null)

      eval("Do_"+id+"()");

    else

      window.open(location);

  }

  function P_OnMouseOver(id,parent)

  {

    var Item;

    var Extend;

    var Parent;

    if(parent != "rbpm")

    {

      var ParentItem;

      ParentItem = eval("P_"+parent);

      ParentItem.className="over";

    }

    HideAll(parent,1);

    Item = eval("P_"+id);

    Extend = eval("E_"+id);

    Parent = eval("E_"+parent);

    Item.className="over";

    Extend.style.display="block";

    Extend.style.posLeft=document.body.scrollLeft+Parent.offsetLeft+Parent.offsetWidth-4;

    if(Extend.style.posLeft+Extend.offsetWidth > document.body.scrollLeft+document.body.clientWidth)

        Extend.style.posLeft=Extend.style.posLeft-Parent.offsetWidth-Extend.offsetWidth+8;

    if(Extend.style.posLeft < 0) Extend.style.posLeft=document.body.scrollLeft+Parent.offsetLeft+Parent.offsetWidth;

    Extend.style.posTop=Parent.offsetTop+Item.offsetTop;

    if(Extend.style.posTop+Extend.offsetHeight > document.body.scrollTop+document.body.clientHeight)

      Extend.style.posTop=document.body.scrollTop+document.body.clientHeight-Extend.offsetHeight;

    if(Extend.style.posTop < 0) Extend.style.posTop=0;

  }

  function P_OnMouseOut(id,parent)

  {

  }

  function HideAll(id,flag)

  {

    var Area;

    var Temp;

    var i;

    if(!flag)

    {

      Temp = eval("E_"+id);

      Temp.style.display="none";

    }

    Area = eval("A_"+id);

    if(Area.length)

    {

      for(i=0; i < Area.length; i++)

      {

        HideAll(Area[i],0);

        Temp = eval("E_"+Area[i]);

        Temp.style.display="none";

        Temp = eval("P_"+Area[i]);

        Temp.className="out";

      }

    }

  }

 

  document.onmouseup=OnMouseUp;

  document.onclick=OnClick;

  function OnMouseUp()

  {

    if(window.event.button == 2)

    {

      var PopMenu;

      PopMenu = eval("E_rbpm");

      HideAll("rbpm",0);

      PopMenu.style.display="block";

      PopMenu.style.posLeft=document.body.scrollLeft+window.event.clientX;

      PopMenu.style.posTop=document.body.scrollTop+window.event.clientY;

      if(PopMenu.style.posLeft+PopMenu.offsetWidth > document.body.scrollLeft+document.body.clientWidth)

        PopMenu.style.posLeft=document.body.scrollLeft+document.body.clientWidth-PopMenu.offsetWidth;

      if(PopMenu.style.posLeft < 0) PopMenu.style.posLeft=0;

      if(PopMenu.style.posTop+PopMenu.offsetHeight > document.body.scrollTop+document.body.clientHeight)

        PopMenu.style.posTop=document.body.scrollTop+document.body.clientHeight-PopMenu.offsetHeight;

      if(PopMenu.style.posTop < 0) PopMenu.style.posTop=0;

    }

  }

  function OnClick()

  {

    HideAll("rbpm",0);

  }

  // Add Your Function on following

  function Do_viewcode(){window.location="view-source:"+window.location.href;}

  function Do_help(){window.showHelp(window.location);}

  function Do_exit() {window.close();}

  function Do_refresh() {window.location.reload();}

  function Do_back() {history.back();}

  function Do_forward() {history.forward();}

  function Do_author(){alert("code.xinnew.com")}

  -->

  </script>

  <script language="JScript">

  <!--

  var menu = new RightMenu();

menu.AddExtendMenu("d_setting"," 活动桌面","rbpm");

menu.AddItem("ca_yesky1","自定义桌面","d_setting","http://www.cctv.com");

menu.AddItem("sperator","","C_program",null);

menu.AddItem("cp_51js","无忧脚本","C_program","http://www.cctv.com/");

menu.AddExtendMenu("range_icon"," 排列图标","rbpm");

menu.AddItem("setico","自动排列","range_icon",null);

menu.AddItem("exit","退出","leave",null);

menu.AddItem("folder_setting"," 自定义文件夹(<u>C</u>)...","rbpm",null);

menu.AddItem("refresh"," 刷新","rbpm",null);

menu.AddItem("sperator","","rbpm",null);

menu.AddItem("phase"," <font disabled>粘贴</font>  CTRL+Z","rbpm",null);

menu.AddExtendMenu("n_files"," 新建","rbpm");

menu.AddItem("f_folder","文件夹","n_files","http://www.cctv.com/");

menu.AddItem("shortcut","快捷方式","n_files","http://www.cctv.com/");

menu.AddItem("sperator","","n_files","");

menu.AddItem("f_txt","Microsoft Word 文档","n_files","http://www.cctv.com/");

menu.AddItem("f_htm","Microsoft Excel 工作表","n_files","http://www.cctv.com/");

menu.AddItem("sperator","","rbpm",null);

menu.AddItem("folder_pro"," 属性","rbpm",null);

document.writeln(menu.GetMenu());

  -->

</script>

</head>

 

<BODY oncontextmenu=window.event.returnValue=false>

</body>

<script language="JavaScript" src="http://www.7stk.com/store/ad/daima03.js"></script>

 

</html>

 

0 Comments

Mon

02

Mar

2009

182、双重导航菜单

182、双重导航菜单

脚本说明:

把如下代码加入<body>区域中

<FORM name=doublecombo>

<P align=center><SELECT name=example

onchange=redirect(this.options.selectedIndex) size=1> <OPTION

  selected>7stk</OPTION> <OPTION>」动画图库」</OPTION>

  <OPTION>」风景区」</OPTION></SELECT> <SELECT name=stage2 size=1> <OPTION selected

  value=allspcer.htm>Java Script</OPTION> <OPTION

  value=../javaapplet/index.htm>Java Applet</OPTION> <OPTION

  value=../cgi/index.htm>C G I</OPTION> <OPTION

  value=../explain/route.htm>CGI相关设定</OPTION> <OPTION

  value=../free.htm>」免费资源</OPTION> <OPTION value=../hotel.htm>」饭店资料</OPTION>

  <OPTION value=mailto:webmaster@7stk.com>E-Mail</OPTION></SELECT> <INPUT name=test onclick=go() type=button value=Go!></P>

<SCRIPT language=JavaScript>

<!-- 

var groups=document.doublecombo.example.options.length 

var group=new Array(groups) 

for (i=0; i<groups; i++) 

group[i]=new Array() 

group[0][0]=new Option("」网页特效代码","http://www.7stk.com/") 

group[0][1]=new Option("Java Applet","../javaapplet/index.htm") 

group[0][2]=new Option("C G I","../cgi/index.htm") 

group[0][3]=new Option("CGI相关设定","../explain/route.htm") 

group[0][4]=new Option("」免费资源","../free.htm") 

group[0][5]=new Option("」饭店资料","../hotel.htm") 

group[0][6]=new Option("E-Mail","mailto:webmaster@7stk.com") 

group[1][0]=new Option("」分隔线","../pictures/bar/1.htm") 

group[1][1]=new Option("」施工中","../pictures/work/1.htm") 

group[1][2]=new Option("HOT","../pictures/hot/1.htm") 

group[1][3]=new Option("」邮件", "../pictures/email/1.htm") 

group[1][4]=new Option("」插图", "../pictures/new/1.htm") 

group[1][5]=new Option("」插画商标", "../pictures/icon/1.htm") 

group[1][6]=new Option("」方向指标", "../pictures/arow/1.htm") 

group[1][7]=new Option("」首页图片", "../pictures/home/1.htm") 

group[1][8]=new Option("」前面标题", "../pictures/start/1.htm") 

group[1][9]=new Option("」卡通人物", "../pictures/cartoon/1.htm") 

group[1][10]=new Option("」欢迎光临", "../pictures/welcome/1.htm") 

group[1][11]=new Option("」动物", "../pictures/animal/1.htm") 

group[2][0]=new Option("」天后宫","../island/temple.htm") 

group[2][1]=new Option("」天安门","../island/battery.htm") 

group[2][2]=new Option("」天坛","../island/lighthouse.htm") 

group[2][3]=new Option("」北海公园","../island/seapark.htm") 

var temp=document.doublecombo.stage2 

function redirect(x){ 

for (m=temp.options.length-1;m>0;m--) 

temp.options[m]=null 

for (i=0;i<group[x].length;i++){ 

temp.options[i]=new Option(group[x][i].text,group[x][i].value) 

} 

temp.options[0].selected=true 

} 

function go(){ 

location=temp.options[temp.selectedIndex].value 

} 

//--> 

</SCRIPT></FORM>

0 Comments

Mon

02

Mar

2009

181、多极下拉菜单

181、多极下拉菜单

<div align="center"><form name="isc">

              <table border="0" cellspacing="0" cellpadding="0">

                <tr align="center">

                  <td nowrap height="11">

                    <select name="example" size="1" onChange="redirect(this.options.selectedIndex)">

                      <option selected>★文本特效</option>

                      <option>★另类特效</option>

                      <option>★背景特效</option>

                    </select>

                    <select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">

                      <option value=" " selected></option>')

                      <option value=" " selected>------第二层菜单------</option>

                      <option value=" " selected>------第二层菜单------</option>

                    </select>

                    <select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">

                      <option value=" " selected></option>')

                      <option value=" " selected>------第三层菜单------</option>

                      <option value=" " selected>------第三层菜单------</option>

                    </select>

              </table>

            </form>

          </div>

          <script language="JavaScript">

<!--

var groups=document.isc.example.options.length

var group=new Array(groups)

for (i=0; i<groups; i++)

group[i]=new Array()

 

group[0][0]=new Option("----第二层菜单----"," ");

 

group[1][0]=new Option("」第一类"," ");

group[1][1]=new Option("」第二类","47");

group[1][2]=new Option("」第三类","46");

group[1][3]=new Option("」第四类","45");

 

group[2][0]=new Option("」第一类"," ");

group[2][1]=new Option("」第二类","115");

group[2][2]=new Option("」第三类","116");

 

var temp=document.isc.stage2

 

 

function redirect(x){

for (m=temp.options.length-1;m>0;m--)

temp.options[m]=null

for (i=0;i<group[x].length;i++){

temp.options[i]=new Option(group[x][i].text,group[x][i].value)

}

temp.options[0].selected=true

redirect1(0)

}

 

 

 

var secondGroups=document.isc.stage2.options.length

var secondGroup=new Array(groups)

for (i=0; i<groups; i++)  {

secondGroup[i]=new Array(group[i].length)

for (j=0; j<group[i].length; j++)  {

secondGroup[i][j]=new Array()  }}

 

secondGroup[0][0][0]=new Option("----第三层菜单----"," ");

secondGroup[1][0][0]=new Option("----第三层菜单----"," ");

secondGroup[1][1][0]=new Option(" 第一节"," ");

secondGroup[1][1][1]=new Option(" 第一节","http://7stk.com");

secondGroup[1][1][2]=new Option(" 第一节","http://7stk.com");

secondGroup[1][1][3]=new Option(" 第一节","http://7stk.com");

 

secondGroup[1][2][0]=new Option("」第三类"," ");

secondGroup[1][2][1]=new Option("第二节","http://7stk.com");

secondGroup[1][2][2]=new Option("第二节","http://7stk.com");

secondGroup[1][2][3]=new Option("第二节","http://7stk.com");

 

secondGroup[1][3][0]=new Option("」第四类"," ");

secondGroup[1][3][1]=new Option("第三节","http://7stk.com");

secondGroup[1][3][2]=new Option("第三节","http://7stk.com");

 

secondGroup[2][0][0]=new Option("----第三层菜单----"," ");

secondGroup[2][1][0]=new Option("」第三类"," ");

secondGroup[2][1][1]=new Option("」第三节(1)","http://7stk.com");

secondGroup[2][1][2]=new Option("」第三节(2)","http://7stk.com");

secondGroup[2][1][3]=new Option("」第三节(3)","http://7stk.com");

 

secondGroup[2][2][0]=new Option("」第四类"," ");

secondGroup[2][2][1]=new Option("第三节l(1)","http://7stk.com");

secondGroup[2][2][2]=new Option("第三节(2)","http://7stk.com");

 

var temp1=document.isc.stage3

function redirect1(y){

for (m=temp1.options.length-1;m>0;m--)

temp1.options[m]=null

for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){

temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)

}

temp1.options[0].selected=true

}

 

function redirect2(){

window.open(temp1.value,"","toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes, resizable=yes,copyhistory=yes,width=700,height=450");

}

//-->

</script>

 

0 Comments