Здорово,чувак! Добро пожаловать! Вы попали на сайт программистов из Караганды  

Главное меню
·  Главная
·  форум
· гостевая книга
·  проги
·  глюки
·  шпаргалки
·  фишки
·  Java-cкрипты
·  видео
·  написать письмо
·  редактор сайта
Информация
Сайт по информатике

Сайт Кодеров

скачать эти скрипты

Скрипты на вертикальное меню

1

<HTML>

<HEAD>

<title>скрипт вертикального меню</title>

<META content="text/html; charset=windows-1251" http-equiv=Content-Type>

<style>

BODY {

            BACKGROUND-COLOR: #36456c; COLOR: #00efff; FONT-FAMILY: MS Sans Serif, tahoma, Verdana, Arial; FONT-SIZE: 10px

}

A {

            COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, tahoma, Verdana, Arial; FONT-SIZE: 12px; TEXT-DECORATION: none

}

A:hover {

            COLOR: #ffffff; TEXT-DECORATION: underline

}

A.m {

            COLOR: #ffc900; FONT-FAMILY: MS Sans Serif, tahoma, Verdana, Arial; FONT-SIZE: 10px; FONT-WEIGHT: bold; TEXT-DECORATION: none

}

A.m:hover {

            COLOR: #ff4e00; TEXT-DECORATION: underline

}

.t {

            COLOR: #d4e8ff; FONT-FAMILY: MS Sans Serif, tahoma, Verdana, Arial; FONT-SIZE: 10px

}

.help {

            LEFT: 136px; POSITION: absolute; TOP: 101px; VISIBILITY: hidden; Z-INDEX: 10

}

.tp {

            COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, tahoma, Verdana, Arial; FONT-SIZE: 10px

}

</style>

<SCRIPT language=JavaScript>

<!--

var layerRef

var styleSwitch

function isNetscape(){

if (navigator.appName == "Netscape") {

return true

}else{

return false

}

}

if (isNetscape()) {

layerRef="document.layers";

styleSwitch="";

}else{

layerRef="document.all";

styleSwitch=".style";

}

function showMessage(name){

eval(layerRef+'["'+name+'"]'+styleSwitch+'.visibility="visible"');

}

function hideMessage(name){

eval(layerRef+'["'+name+'"]'+styleSwitch+'.visibility="hidden"');

}

//-->

</SCRIPT>

</HEAD>

<BODY leftMargin=0 topMargin=0 MARGINWIDTH="0" MARGINHEIGHT="0">

<TABLE border=0 cellPadding=0 cellSpacing=0 height=80 width=113>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg1');   " onmouseover="showMessage('msg1');  " href="ваша ссылка">раздел 1</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg2');  " onmouseover="showMessage('msg2');  " href="ваша ссылка">раздел 2</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg3'); " onmouseover="showMessage('msg3'); " href="ваша ссылка">раздел 3</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg4'); " onmouseover="showMessage('msg4'); " href="ваша ссылка">раздел 4</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg5'); " onmouseover="showMessage('msg5'); " href="ваша ссылка">раздел 5</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg6'); " onmouseover="showMessage('msg6'); " href="ваша ссылка">раздел 6</a>&nbsp;&nbsp; </TD></TR>

<TR>

<TD align=right

height=20 vAlign=top width=113><a class="m" onmouseout="hideMessage('msg7'); " onmouseover="showMessage('msg7'); " href="ваша ссылка">раздел 7</a>&nbsp;&nbsp; </TD></TR></TABLE>

<DIV class=help id=msg1>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>

краткое описание раздела 1

</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg2>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 2

</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg3>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 3

</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg4>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 4

</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg5>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 5</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg6>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 6</TD></TR></TBODY></TABLE></DIV>

<DIV class=help id=msg7>

<TABLE bgColor=#36456c height=20 width=465>

<TBODY>

<TR>

<TD class=tp>краткое описание раздела 7</TD></TR></TBODY></TABLE></DIV>

</HTML>


2

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title>скрипт вертикального меню</title>

</head>

<body>

<style>

<!--

#slidemenubar, #slidemenubar2{

cursor:hand;

position:absolute;

left:-152px;

width:160px;

top:170px;

border:1.5px solid green;

background-color:lightyellow;

layer-background-color:lightyellow;

font:bold 12px Verdana;

line-height:20px;

}

-->

</style>

<script language="JavaScript1.2">

var ns4=document.layers?1:0

var ie4=document.all?1:0

var ns6=document.getElementById&&!document.all?1:0

if (ie4||ns6)

document.write('<div id="slidemenubar2" style="left:-150">')

else

document.write('<layer id="slidemenubar">')

var sitems=new Array()

var sitemlinks=new Array()

sitems[0]="раздел 1"

sitems[1]="раздел 2"

sitems[2]="раздел 3"

sitems[3]="раздел 4"

sitems[4]="раздел 5"

sitems[5]="раздел 6"

sitems[6]="раздел 7"

sitems[7]="раздел 8"

sitemlinks[0]="ваша ссылка"

sitemlinks[1]="ваша ссылка"

sitemlinks[2]="ваша ссылка"

sitemlinks[3]="ваша ссылка"

sitemlinks[4]="ваша ссылка"

sitemlinks[5]="ваша ссылка"

sitemlinks[6]="ваша ссылка"

sitemlinks[7]="ваша ссылка"

var target=""

for (i=0;i<=sitems.length-1;i++)

document.write('<a href='+sitemlinks[i]+' target="'+target+'">'+sitems[i]+'</a><br>')

function regenerate(){

window.location.reload()

}

function regenerate2(){

if (ns4)

setTimeout("window.onresize=regenerate",400)

}

window.onload=regenerate2

if (ie4||ns6){

document.write('</div>')

themenu=(ns6)? document.getElementById("slidemenubar2").style : document.all.slidemenubar2.style

rightboundary=0

leftboundary=-150

}

else{

document.write('</layer>')

themenu=document.layers.slidemenubar

rightboundary=150

leftboundary=10

}

var dragapproved=false

var x1,x2

if (ns4)

themenu.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)

function move(e){

if (ie4&&event.button==1&&dragapproved){

if(temp1+event.clientX-x1>leftboundary)

themenu.pixelLeft=Math.min(rightboundary,temp1+event.clientX-x1)

else

themenu.pixelLeft=Math.max(leftboundary,temp1+event.clientX-x1)

}

else if (ns6&&dragapproved){

if(parseInt(themenu.left)+e.clientX-x2>leftboundary)

themenu.left=Math.min(rightboundary+2,temp1+e.clientX-x2)

else

themenu.left=Math.max(leftboundary-2,temp1+e.clientX-x2)

}

else if (ns4){

if(themenu.left+e.x-x2>leftboundary)

themenu.left=Math.min(rightboundary+2,themenu.left+e.x-x2)

else

themenu.left=Math.max(leftboundary-2,themenu.left+e.x-x2)

}

}

function drags(e){

if (ie4){

dragapproved=true

temp1=themenu.pixelLeft

x1=event.clientX

document.onmousemove=move

}

else if (ns6){

dragapproved=true

temp1=parseInt(themenu.left)

x2=e.clientX

document.getElementById("slidemenubar2").onmousemove=move

}

else{

themenu.captureEvents(Event.MOUSEMOVE)

x2=e.x

}

}

function stopit(){

if (ie4||ns6){

dragapproved=false

}

if (ns4)

themenu.releaseEvents(Event.MOUSEMOVE)

}

if (ie4){

document.all.slidemenubar2.onmousedown=drags

document.all.slidemenubar2.onmouseup=new Function("dragapproved=false")

document.onselectstart=new Function("return false")

}

else if (ns6){

document.getElementById("slidemenubar2").onmousedown=drags

document.getElementById("slidemenubar2").onmouseup=new Function("dragapproved=false")

}

else if (ns4){

themenu.onmousedown=drags

themenu.onmousemove=move

themenu.onmouseup=stopit

}

</script>

<p align="center">Вытащите меню - оно слева.</p>

</body>

</html>


3

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title>скрипт вертикального меню</title>

<style>

<!--

#wrapper{

position:relative;

height:30px

}

#wrapper2{

position:absolute

}

#coffeemenu03{

filter:revealTrans(Duration=1.5,Transition=12)//Вы можете менять фильтры - замените 12 на любую другую цифру

visibility:hide

}

-->

</style>

</head>

<body>

<ilayer id="coffeemenu01" height=35px>

<layer id="coffeemenu02" visibility=show>

<p align="left">

<span id="wrapper">

<span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false">

<font face="Verdana" size="2"><a href="ваша ссылка/">Нажми!</a>

</span></span>

</layer></ilayer><script language="JavaScript1.2">

var enableeffect=true

var selection=new Array()

selection[0]='Здесь ссылки:<br>'

selection[1]='<a href="ваша ссылка">раздел 1</a><br>'

selection[2]='<a href="ваша ссылка">раздел 2</a><br>'

selection[3]='<a href="ваша ссылка">раздел 3</font></a><br>'

if (document.layers)

document.coffeemenu01.document.coffeemenu02.visibility='show'

function dropit2(){

if (document.all){

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

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

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

if (enableeffect)

coffeemenu03.filters.revealTrans.apply()

coffeemenu03.style.visibility="visible"

if (enableeffect)

coffeemenu03.filters.revealTrans.play()

}

else{

hidemenu()

}

}

}

function dropit(e){

if (document.coffeemenu03.visibility=="hide")

document.coffeemenu03.visibility="show"

else

document.coffeemenu03.visibility="hide"

document.coffeemenu03.left=e.pageX-e.layerX

document.coffeemenu03.top=e.pageY-e.layerY+19

return false

}

function hidemenu(){

if (enableeffect)

coffeemenu03.filters.revealTrans.stop()

coffeemenu03.style.visibility="hidden"

}

function hidemenu2(){

document.coffeemenu03.visibility="hide"

}

if (document.layers){

document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK)

document.coffeemenu01.document.coffeemenu02.onclick=dropit

}

else if (document.all)

document.body.onclick=hidemenu

</script>

<div id="coffeemenu03" style="position:absolute;left:9;top:28;layer-background-color:#C0C0C0;background-color:#c0c0c0;width:138;visibility:hidden;border:1px solid #000000;padding:0px; height:0">

<script language="JavaScript1.2">

if (document.all)

coffeemenu03.style.padding='4px'

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

document.write(selection[i])

</script>

</body>

</html>


4

<HTML>

<HEAD>

<STYLE type=text/css>

A:link { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none}

A:visited { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none}

A:hover { COLOR: #0000ff; FONT: 9pt Arial; TEXT-DECORATION: none}

</STYLE>

</HEAD>

<BODY>

<TABLE border=0 height=100 onmouseout="bgColor=''" onmouseover="bgColor='gray'" width=130>

<TBODY>

<TR>

<TD bgColor=000000><FONT color=#FFFFFF><B>Навигация</B></FONT></TD>

<TR>

<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">

<A href="ваша ссылка">раздел 1</A>

</TD>

<TR>

<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">

<A href="ваша ссылка">раздел 2</A>

</TD>

<TR>

<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">

<A href="ваша ссылка">раздел 3</A>

</TD>

</TR>

</TBODY>

</TABLE>

</BODY>

</HTML>


5

<html>

<head>

<title>скрипт вертикального меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<style>

.menulines{

border:1px solid white;

}

.menulines a{

text-decoration:none;

color:black;

}

</style>

<script language="JavaScript1.2">

function borderize(what,color){

what.style.borderColor=color

}

function borderize_on(e){

if (document.all)

source3=event.srcElement

else if (document.getElementById)

source3=e.target

if (source3.className=="menulines"){

borderize(source3,"black")

}

else{

while(source3.tagName!="TABLE"){

source3=document.getElementById? source3.parentNode : source3.parentElement

if (source3.className=="menulines")

borderize(source3,"black")

}

}

}

function borderize_off(e){

if (document.all)

source4=event.srcElement

else if (document.getElementById)

source4=e.target

if (source4.className=="menulines")

borderize(source4,"white")

else{

while(source4.tagName!="TABLE"){

source4=document.getElementById? source4.parentNode : source4.parentElement

if (source4.className=="menulines")

borderize(source4,"white")

}

}

}

</script>

</head>

<body>

<table border="0" width="200" cellspacing="0" cellpadding="0" onMouseover="borderize_on(event)" onMouseout="borderize_off(event)">

<tr><td width="100%" bgcolor="#E6E6E6"><font face="Arial" size="3"><b>Моё меню</b></font></td></tr>

<tr><td width="100%" class="menulines"><font face="Arial" size="2"><a href="ваша ссылка">раздел 1</a></font></td></tr>

<tr><td width="100%" class="menulines"><font face="Arial" size="2"><a href="ваша ссылка">раздел 2</a> </font></td></tr>

<tr><td width="100%" class="menulines"><font face="Arial" size="2"><a href="ваша ссылка">раздел 3</a></font></td></tr>

</table>

</body>

</html>


6

<html>

<head>

<title>скрипт вертикального меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: #000000; Text-decoration: underline}

A:Visited{ Color: #000000; Text-decoration: underline}

A:Hover{ Color: #000000; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

<STYLE>

.TABLE{

Width:            150px;                    /*Ширина меню в пикселах*/

Font-family:      Times new roman;          /*Шрифт*/

Font-size:        12pt;                     /*Размер шрифта в пунктах*/

Border-right:     #808080 transparent 0px;  /*Рамка*/

Border-bottom:    #808080 transparent 0px;

Border-left:      #808080 solid 1px;

Border-top:       #808080 solid 1px;

Filter:           Alpha(opacity=90,style=0);/*Непрозрачность меню в процентах*/

}

.hvr{

background-color: #8d8961;                  /*Цвет фона активного раздела меню*/

Color:            #FFFFFF;                  /*Цвет текста активного раздела меню*/

Border-top:       #808080 transparent 0px;  /*Рамка*/

Border-left:      #808080 transparent 0px;

Border-right:     #808080 solid 1px;

Border-bottom:    #808080 solid 1px;

Cursor:           hand;                     /*Курсор*/

Text-indent:      20px;                     /*Отступ от края таблицы*/

}

.out{

background-color: #E0E0E0;                  /*Цвет фона неактивного пункта меню*/

Color:            #000000;                  /*Цвет текста неактивного пункта меню*/

Border-top:       #808080 transparent 0px;  /*Рамка*/

Border-left:      #808080 transparent 0px;

Border-right:     #808080 solid 1px;

Border-bottom:    #808080 solid 1px;

Cursor:           hand;                     /*Курсор*/

Text-indent:      20px;                     /*Отступ от края таблицы*/

}

SMALL{

Text-indent:      7px;

Font-size:        9pt;

Color:            #A0A0A0;

}

</STYLE>

<SCRIPT Language="JavaScript">

<!--

function tryShow()

{if ((content.style.visibility == "hidden") &&

(event.x < 2)

)

{ content.style.left = event.offsetX + 2;

content.style.top = event.offsetY + 2;

showcont();

}

}

function showcont(){

content.style.visibility = "visible";

}

function hidecont(){

content.style.visibility = "hidden";

}

//-->

</SCRIPT>

</head>

<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" onMouseMove="tryShow()">

<center>

<DIV Id="content" Style="visibility:hidden; position:absolute;">

<TABLE CellPadding="0" CellSpacing="0" border="0" onMouseOver="showcont()" onMouseOut="hidecont()" Width="150" Class="table">

<TBODY>

<TR>

<TD onMouseOver="this.className='hvr'" onMouseOut= "this.className='out'" Class="out">раздел <I>1</I>

</TR>

<TR>

<TD onMouseOver="this.className='hvr'" onMouseOut= "this.className='out'" Class="out">раздел <I>2</I>

</TR>

<TR>

<TD onMouseOver="this.className='hvr'" onMouseOut= "this.className='out'" Class="out">раздел <I>3</I>

</TR>

</TBODY>

</TABLE></DIV>

<center>

<H2>&nbsp;Подведите курсор мыши к левой части зкрана</H2>

</html>


7

<html>

<head>

<title>скрипт вертикального меню</title>

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

var cuMsg = 'MouseOver Message!';

function update(msg) {

var pad_str="";

n = msg.length;

if(n<80) {

pad = (80-n)/2;

for(var i=0; i<pad; i++) {

pad_str+=" ";

}         

}         

cuMsg = pad_str + msg;

document.ccMsg.field.value = cuMsg;

}

</SCRIPT>

</HEAD>

<body bgcolor="36456c" text="white" link="white" vlink="white">

<CENTER>

<FONT FACE=VERDANA SIZE=3>

<FORM NAME="ccMsg" onSubmit="return false">

<input type="text" name="field" size=60 value="приветствие" onChange="nochange()">

</form></center>

<CENTER>

<A HREF="ваша ссылка"

onMouseOver="update('краткое описание раздела 1')"  onMouseOut="update(' ')" onClick="update('Here we go...............')"><B>раздел 1</B></A><P>

<A HREF="ваша ссылка"

onMouseOver="update('краткое описание раздела 2')" onMouseOut="update(' ')" onClick="update('Here we go...............')"><B>раздел 2</B></A><P>

<A HREF="ваша ссылка"

onMouseOver="update('краткое описание раздела 3')" onMouseOut="update(' ')" onClick="update('Here we go...............')"><B>раздел3</B></A><P>

</CENTER>

</FONT>

</html>

</script>


8

<html>

<head>

<title>скрипт вертикального меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<style>

.menulines{

border:2.5px solid #F0F0F0;

}

.menulines a{

text-decoration:none;

color:black;

}

</style>

<script language="JavaScript1.2">

function over_effect(e,state){

if (document.all)

source4=event.srcElement

else if (document.getElementById)

source4=e.target

if (source4.className=="menulines")

source4.style.borderStyle=state

else{

while(source4.tagName!="TABLE"){

source4=document.getElementById? source4.parentNode : source4.parentElement

if (source4.className=="menulines")

source4.style.borderStyle=state

}

}

}

</script>

</head>

<body bgcolor="#F0F0F0" text="#00FF00" link="#00FFFF" topmargin="0" leftmargin="0">

<table border="0" width="200" cellspacing="0" cellpadding="0" onMouseover="over_effect(event,'outset')"

onMouseout="over_effect(event,'solid')" onMousedown="over_effect(event,'inset')" onMouseup="over_effect(event,'outset')"

style="background-color:#00FFFF" height="419">

<tr><td width="100%" bgcolor="#E5E5E5" height="31">

<p align="center"><font face="Arial" size="5" color="#0000FF"><b>Навигация</b></font></td></tr>

<tr><td width="100%" class="menulines" height="50" bgcolor="#FFFFFF">

<p align="center"><b><font face="Arial" size="5"><a href="ваша ссылка">

<font color="#FF0000">раздел 1</font></a></font></b></td></tr>

<tr><td width="100%" class="menulines" height="50" bgcolor="#FFFFFF">

<p align="center"><b><font face="Arial" size="5"><a href="ваша ссылка">

<font color="#FF0000">раздел 2</font></a><font color="#FF0000"> </font> </font>

</b></td></tr>

<tr><td width="100%" class="menulines" height="50" bgcolor="#FFFFFF">

<p align="center"><b><font face="Arial" size="5"><a href="ваша ссылка">

<font color="#FF0000">раздел 3</font></a><font color="#FF0000"> </font> </font>

</b></td></tr>

<tr><td width="100%" class="menulines" height="50" bgcolor="#FFFFFF">

<p align="center"><b><font face="Arial" size="5"><a href="ваша ссылка">

<font color="#FF0000">раздел 4</font></a></font></b></td></tr>

<tr><td width="100%" class="menulines" height="50" bgcolor="#FFFFFF">

<p align="center"><b><font face="Arial" size="5"><a href="ваша ссылка">

<font color="#FF0000">раздел 5</font></a><font color="#FF0000"> </font> </font>

</b></td></tr>

</table>

</body>

</html>


9

<html>

<head>

<title>скрипт вертикального меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: white; Text-decoration: underline}

A:Hover{ Color: white; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

<style>

<!--

.menuskin{

position:absolute;

width:165px;

background-color:menu;

border:2px solid black;

font:normal 12px Verdana;

line-height:18px;

z-index:100;

visibility:hidden;

}

.menuskin a{

text-decoration:none;

color:black;

padding-left:10px;

padding-right:10px;

}

#mouseoverstyle{

background-color:highlight;

}

#mouseoverstyle a{

color:white;

}

-->

</style>

<script language="JavaScript1.2">

var linkset=new Array()

linkset[0]='<div class="menuitems"><a href="ваша ссылка">раздел 1</a></div>'

linkset[0]+='<div class="menuitems"><a href="ваша ссылка">раздел 2</a></div>'

linkset[0]+='<div class="menuitems"><a href="ваша ссылка">раздел 3</a></div>'

linkset[1]='<div class="menuitems"><a href="ваша ссылка">раздел 1</a></div>'

linkset[1]+='<div class="menuitems"><a href="ваша ссылка">раздел 2</a></div>'

linkset[1]+='<div class="menuitems"><a href="ваша ссылка">раздел 3</a></div>'

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

var ns6=document.getElementById&&!document.all

var ns4=document.layers

function showmenu(e,which){

if (!document.all&&!document.getElementById&&!document.layers)

return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""

menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)

menuobj.innerHTML=which

else{

menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')

menuobj.document.close()

}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width

menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height

eventX=ie4? event.clientX : ns6? e.clientX : e.x

eventY=ie4? event.clientY : ns6? e.clientY : e.y

var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX

var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

if (rightedge<menuobj.contentwidth)

menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth

else

menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX

if (bottomedge<menuobj.contentheight)

menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight

else

menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY

menuobj.thestyle.visibility="visible"

return false

}

function contains_ns6(a, b) {

while (b.parentNode)

if ((b = b.parentNode) == a)

return true;

return false;

}

function hidemenu(){

if (window.menuobj)

menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"

}

function dynamichide(e){

if (ie4&&!menuobj.contains(e.toElement))

hidemenu()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

hidemenu()

}

function delayhidemenu(){

if (ie4||ns6||ns4)

delayhide=setTimeout("hidemenu()",500)

}

function clearhidemenu(){

if (window.delayhide)

clearTimeout(delayhide)

}

function highlightmenu(e,state){

if (document.all)

source_el=event.srcElement

else if (document.getElementById)

source_el=e.target

if (source_el.className=="menuitems"){

source_el.id=(state=="on")? "mouseoverstyle" : ""

}

else{

while(source_el.id!="popmenu"){

source_el=document.getElementById? source_el.parentNode : source_el.parentElement

if (source_el.className=="menuitems"){

source_el.id=(state=="on")? "mouseoverstyle" : ""

}

}

}

}

if (ie4||ns6)

document.onclick=hidemenu

</script>

</head>

<body bgcolor="#737994" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" >

<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">

</div>

<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">раздел 1</a><br>

<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">раздел 2</a>

</body>

</html>


10

<html>

<head>

<title>скрипт вертикального меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: black; Text-decoration: underline}

A:Visited{ Color: black; Text-decoration: underline}

A:Hover{ Color: black; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:9px;} 

</Style>

<STYLE TYPE="text/css">

<!--

.menuh {

BORDER-COLOR : #FFFF99 ;

cursor : hand ;

Border-Left : #FFFF99 ;

Border-Top : #FFFF99 ;

Padding-Left : 1px ;

Padding-Top : 1px ;

Background-Color : #FFFF99 ;

}

.menu   {

Background-Color : white ;

}

.home   {

cursor : hand ;

}

.menulinks{

text-decoration:none;

}

//-->

</STYLE>

</head>

<body bgcolor="#737994" topmargin="0" leftmargin="0">

<SCRIPT Language="Javascript1.2">

<!--

var menuwidth=110

var offsetleft=10

var offsettop=90

var ns4=document.layers?1:0

var ie4=document.all?1:0

var ns6=document.getElementById&&!document.all?1:0

function makeStatic() {

if (ie4) {object1.style.pixelTop=document.body.scrollTop+offsettop}

else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop}

else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));}

setTimeout("makeStatic()",0);

}

if (ie4||ns6) {document.write('<span ALIGN="CENTER" ID="object1" STYLE="Position:absolute; Top:20; Left:'+offsetleft+'; Z-Index:5;cursor:hand;background-color:black;"><TABLE BORDER="1" width="'+menuwidth+'" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="black" bgcolor="white">')}

else if (ns4){ document.write('<LAYER top="20" name="object1" left="'+offsetleft+'" BGCOLOR=black><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="'+menuwidth+'">')}

if (ie4||ns6||ns4)

document.write('<TR><TD BGCOLOR="#3399FF" BORDERCOLORDARK="#99CCFF" BORDERCOLORLIGHT="#003399"><P ALIGN=CENTER><FONT SIZE="4" FACE=ARIAL>Меню</FONT></TD></TR>')

var menui = new Array();

var menul = new Array();

menui[0]="раздел 1";

menui[1]="раздел 2";

menui[2]="раздел 3";

menul[0]="ваша ссылка";

menul[1]="ваша ссылка";

menul[2]="ваша ссылка";

for (i=0;i<=menui.length-1;i++)

if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuh\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}

else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}

if (ie4||ns6) {document.write('</TABLE></span>')}

else if (ns4){document.write('</TABLE></TD></TR></TABLE></LAYER>')}

function menu3(){

if (ns6||ie4||ns4)

makeStatic()

}

window.onload=menu3

//-->

</SCRIPT>

<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

</body>

</html>


11

<html>

<head>

<title>вертикальное меню</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: #000000; Text-decoration: underline}

A:Visited{ Color: #000000; Text-decoration: underline}

A:Hover{ Color: #000000; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

<script language="JavaScript">

var eypos=-200, ejump=-4;

var typos=-260, tjump=-4;

var delay=2;

function do_menue()

{

if(typos>-260)

{

tjump=-4;

if(typos>=130)

head_fahren();

}

ejump=-ejump;

if(eypos<=-200 || eypos>=20)

menue_fahren();

}

function menue_fahren()

{

if(document.layers) document.menue.top=eypos; else document.all.menue.style.top=eypos;

eypos+=ejump;

if(eypos>-200 && eypos<20)

setTimeout("menue_fahren()", delay);

}

function do_head()

{

if(eypos>-200)

{

ejump=-4;

if(eypos>=20)

menue_fahren();

}

tjump=-tjump;

if(typos<=-260 || typos>=130)

head_fahren();

}

function head_fahren()

{

if(document.layers) document.head.top=typos; else document.all.head.style.top=typos;

typos+=tjump;

if(typos>-260 && typos<130)

setTimeout("head_fahren()", delay);

}

</script>

</head>

<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">

<div style="position:absolute; z-index:2; left:480;">

<TABLE BORDER=0>

<p><input type="button" value="Навигация по разделу"

onClick="javascript:do_menue()">

</p>

</TABLE>

</div>

<div id=menue style="position:absolute; top:-200; left:50; z-index: 2;">

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 width=450>

<TR>

<TD>

<A ONMOUSEOVER="window.status='краткое описание раздела 1' ;return true" HREF="ваша ссылка" target="dummy">раздел 1</a><br>

<A ONMOUSEOVER="window.status='краткое описание раздела 2' ;return true" HREF="ваша ссылка" target="dummy">раздел 2</a><br>

<A ONMOUSEOVER="window.status='краткое описание раздела 3' ;return true" HREF="ваша ссылка" target="dummy">раздел 3</a><br>

</TR>

</TABLE>

</div>

</html>

Автор не несет никакой ответственности за испорченное программное обеспечение и другие возможные осложнения при использовании этих скриптов.



Web site engine's code is Copyright © 2007 by Sjava Программисты. All Rights Reserved.
Hosted by uCoz