ОсновноеRadiotalkПользовательское
MPCHAT - CMS хостинг чатов для профессионалов
90   •   Посмотреть все темы

JavaScript - Скрипты

 

20090
Dimitry @Dimitry
Все скрипты которые могут помочь в развитии чата!
Просьба ничего другово не постить~!

2536
удалён @crigon
То, что я у себя нашел из старой темы, наиболее полезное...

Бегущая строка в СтатусБаре by Тёмный Ангел
<script language="JavaScript">

<!-- var scrollCounter = 0; var scrollText

= "Пример бегущей строки. ";

var scrollDelay = 70;

var i = 0;

while (i ++ < 140)

scrollText = " " + scrollText;

function Scroller()

{

window.status = scrollText.substring(scrollCounter++,

scrollText.length);

if (scrollCounter == scrollText.length)

scrollCounter = 0;

setTimeout("Scroller()",

scrollDelay);}Scroller();

//-->

</script>


К курсору привязаны слова by demon
<body bgcolor="#000000" link="#FFFF99" vlink="#FFFF99"
alink="#FFFF99" onload="makesnake()"
style="OVERFLOW-X: hidden; OVERFLOW-Y: scroll; WIDTH: 100%">
<p><br><STYLE fprolloverstyle></p>
<p>A:hover { COLOR: #ffFFFF; FONT-WEIGHT: bold; TEXT-DECORATION:
blink } </STYLE> <STYLE>.spanstyle { FONT-FAMILY: Arial; FONT-SIZE: 14pt;
POSITION: absolute; TOP: 150px; VISIBILITY: visible } </STYLE><font
color="#ffffff">

<script>
var x,y
var step=15
var flag=1
var message=" text "
message=message.split("")
var xpos=new Array()
for (i=0;i<=message.length-1;i++)
{ xpos[i]=-50 }
var ypos=new Array()
for (i=0;i<=message.length-1;i++) { ypos[i]=-50 }
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}
function makesnake() {
if (flag==1 && document.all) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval("span"+(i)+".style")
thisspan.posLeft=xpos[i]
thisspan.posTop=ypos[i]
}
}
else if (flag==1 && document.layers) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval("document.span"+i)
thisspan.left=xpos[i]
thisspan.top=ypos[i]
}
}
var timer=setTimeout("makesnake()",30)
}
</script> <script>
<!-- Beginning of JavaScript -
for (i=0;i<=message.length-1;i++) {
document.write("<span id='span"+i+"' class='spanstyle'>")
document.write(message[i])
document.write("</span>")
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
// - End of JavaScript - -->
</script>


На страничке идет снег by tip4ik
<script language=JavaScript1.2>
//Configure below to change URL path to the snow image
var snowsrc="http://mpchat.com/smile/img/snow.gif"

// Configure below to change number of snow to render
var no = 15;

var ns4up = (document.layers) ? 1 : 0; &nbsp;// browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

var dx, xp, yp; &nbsp; &nbsp;// coordinate and position variables
var am, stx, sty; &nbsp;// amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i) { &nbsp;
dx[i] = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set coordinate variables
xp[i] = Math.random()*(doc_width-50); &nbsp;// set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; &nbsp; &nbsp; &nbsp; &nbsp; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); &nbsp; &nbsp; // set step variables
if (ns4up) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set layers
&nbsp;if (i == 0) {
&nbsp; &nbsp;document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></a></layer>");
&nbsp;} else {
&nbsp; &nbsp;document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
&nbsp;}
} else if (ie4up||ns6up) {
&nbsp;if (i == 0) {
&nbsp; &nbsp;document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></a></div>");
&nbsp;} else {
&nbsp; &nbsp;document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
&nbsp;}
}
}

function snowNS() { &nbsp;// Netscape main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
&nbsp;yp[i] += sty[i];
&nbsp;if (yp[i] > doc_height-50) {
&nbsp; &nbsp;xp[i] = Math.random()*(doc_width-am[i]-30);
&nbsp; &nbsp;yp[i] = 0;
&nbsp; &nbsp;stx[i] = 0.02 + Math.random()/10;
&nbsp; &nbsp;sty[i] = 0.7 + Math.random();
&nbsp; &nbsp;doc_width = self.innerWidth;
&nbsp; &nbsp;doc_height = self.innerHeight;
&nbsp;}
&nbsp;dx[i] += stx[i];
&nbsp;document.layers["dot"+i].top = yp[i];
&nbsp;document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}

function snowIE_NS6() { &nbsp;// IE and NS6 main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
&nbsp;yp[i] += sty[i];
&nbsp;if (yp[i] > doc_height-50) {
&nbsp; &nbsp;xp[i] = Math.random()*(doc_width-am[i]-30);
&nbsp; &nbsp;yp[i] = 0;
&nbsp; &nbsp;stx[i] = 0.02 + Math.random()/10;
&nbsp; &nbsp;sty[i] = 0.7 + Math.random();
&nbsp; &nbsp;doc_width = ns6up?window.innerWidth : document.body.clientWidth;
&nbsp; &nbsp;doc_height = ns6up?window.innerHeight : document.body.clientHeight;
&nbsp;}
&nbsp;dx[i] += stx[i];
&nbsp;if (ie4up){
&nbsp;document.all["dot"+i].style.pixelTop = yp[i];
&nbsp;document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
&nbsp;}
&nbsp;else if (ns6up){
&nbsp;document.getElementById("dot"+i).style.top=yp[i];
&nbsp;document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
&nbsp;} &nbsp;
}
setTimeout("snowIE_NS6()", 10);
}

if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
</SCRIPT>


Скролл текста в рамке by Brain
<script LANGUAGE="JavaScript">
<!-- Begin
document.write('<marquee id="iescroller" direction="up" width="100%" height="65" scrollamount="1" scrolldelay="100" style="border:1 solid white;background-color:#374B6">');
iescroller.onmouseover=new Function("iescroller.scrollAmount=0");
iescroller.onmouseout=new Function("iescroller.scrollAmount=2");

document.write('<font size="3" face="Arial" color="#FFFFFF">')
document.write('<Div align="center">Добро пожаловать в НАШ ЧАТ!!! </div><br>');
document.write('<Div align="center">НАШ ЧАТ</div><br>');
document.write('<Div align="center">Самый чатлански чат из чатов чатландии...</div><br><br>');

document.write('</font>');
document.write('</marquee>');
//  End -->
</script>


светящийся текст (типа неоновой мигающей вывески) by tip4ik
<span span id="glowtext" style="text-decoration: none">
<font color="#000080"><span style="text-decoration: none">ТЕКСТ</span>
</font></span>
<style>
                                               <!--
                                               #glowtext{
                                               filter:glow(color=red,strength=3);
                                               width:100%;
                                               }
                                               -->
                                               </style>
<script language="JavaScript1.2">

                                               /*
                                               Glowing Text Script-
                                               © Dynamic Drive (www.dynamicdrive.com)
                                               For full source code, installation instructions,
                                               100's more DHTML scripts, and Terms Of
                                               Use, visit dynamicdrive.com
                                               */

                                               function glowit(which){
                                               if (document.all.glowtext[which].filters[0].strength==3)
                                               document.all.glowtext[which].filters[0].strength=2;
                                               else
                                               document.all.glowtext[which].filters[0].strength=3;
                                               }

                                               function glowit2(which){
                                               if (document.all.glowtext.filters[0].strength==3)
                                               document.all.glowtext.filters[0].strength=2;
                                               else
                                               document.all.glowtext.filters[0].strength=3;
                                               }

                                               function startglowing(){
                                               if (document.all.glowtext&&glowtext.length){
                                               for (i=0;i<glowtext.length;i++)
                                               eval('setInterval("glowit('+i+')",150)');
                                               }
                                               else if (glowtext);
                                               setInterval("glowit2(0)",150);
                                               }

                                               if (document.all)
                                               window.onload=startglowing;
                                               </script>


пример обьёмного текста by wizard
<H1
style="FILTER: shadow(color:996633,direction=225,enabled:1); FONT-FAMILY: verdana; COLOR:lightgreen;
FONT-SIZE: 30px; LINE-HEIGHT: 40px; WIDTH: 85%">Объемный текст</H1>

1732
DirtyDollar @DirtyDollar
Блокирует правую кнопку мышки:
<script LANGUAGE="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
// -->
</script>

500
Veerpool @Veerpool
Сколько Вы уже находитесь в чате
этот код между тегами <head></head>
<script language="JavaScript">
<!--
mytimes = 0;
mytimem = 0;
mytimeh = 0;
times = "";
timem = "";
timeh = "";
function whotime() {
mytimes = mytimes + 1;
if (mytimes == 60) {
mytimes = 0;
mytimem = mytimem + 1; }
if (mytimem == 60) {
mytimem = 0;
mytimeh = mytimeh + 1; }
times = mytimes;
if (times < 10) {
times = "0" + mytimes; }
timem = mytimem;
if (timem < 10) {
timem = "0" + mytimem; }
timeh = mytimeh;
if (timeh < 10) {
timeh = "0" + mytimeh; }

document.time_form.count.value = timeh + ":" + timem + ":" + times;
setTimeout("whotime()",1000);
}
// -->
</script>


этот туда где хотите чтобы время отображалось


<form name=time_form>
<input type=button name="count" size="20" maxlength="10" readonly title='Время вашего пребывания в чате'>
</form>
<script LANGUAGE = "JavaScript">
whotime();
</script>


___________________________________________________________________
Переводит текст в строке ввода на русский

<input type=submit title='На русский' onclick='russ(); return false;' value=RU>

____________________________________________________________________

Панель появляется при нажатии (к примеру смайлы)

<script>
function s() {
wr="";
wr+="<a href=\"javascript:SendTo(' ***1 ');\" target=chat><img src=http://live-co.com/img/bigsmile2/55.gif border=0></a>";


sm.innerHTML=wr+"<a href=# onclick=\"sm.innerHTML=''; return false;\"> Close Smiles</a>";
}


</script>


а этот код туда где будет сама панель

<a href=# onclick="s(); return false;"> Add Smiles</a>
<div id=sm> </div>

500
Veerpool @Veerpool
Отправка ICQ из чата

Между <head> и </head> вставить

<script language="javascript">
&nbsp;n = (document.layers) ? 1 : 0;
&nbsp;ie = (document.all) ? 1 : 0;
&nbsp;ver4 = (n || ie) ? 1 : 0;
&nbsp;var n6 = ((document.getElementById)&&(!ie)) ? 1 : 0;
&nbsp;var maxLen = 450;
&nbsp;var enable;
&nbsp;var session = true;
&nbsp;var now_date = new Date();
&nbsp;var cookie_date = new Date();


&nbsp;function chPager () {
&nbsp; var name = document.pagerform.from.value;
&nbsp; var msg = document.pagerform.body.value;
&nbsp; var mail = document.pagerform.fromemail.value;

&nbsp; if ( name=="" ) {
&nbsp; &nbsp;alert("Please enter your name.");
&nbsp; &nbsp;document.pagerform.from.focus();
&nbsp; &nbsp;return false;
&nbsp; }

&nbsp; if ( mail == "" ) {
&nbsp; &nbsp;alert("Please enter your Email.");
&nbsp; &nbsp;document.pagerform.fromemail.focus();
&nbsp; &nbsp;return false;
&nbsp; }

&nbsp; if ( mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1 ){
&nbsp; &nbsp;alert("You have entered an invalid email address.\\nPlease check again and re-enter your email address.");
&nbsp; &nbsp;document.pagerform.fromemail.value="";
&nbsp; &nbsp;document.pagerform.fromemail.focus();
&nbsp; &nbsp;return false;
&nbsp; }

&nbsp; if ( msg == "" ) {
&nbsp; &nbsp;alert("Please enter your message.");{
&nbsp; &nbsp;document.pagerform.body.focus();
&nbsp; &nbsp;return false;
&nbsp; }

&nbsp; &nbsp;return true;
&nbsp; }
&nbsp;}

&nbsp;function init(){
&nbsp; if(n)document.captureEvents(Event.KEYDOWN)
&nbsp; document.onkeydown=counter;
&nbsp; document.myform.charcount.value = 450 - document.pagerform.body.value.length;

&nbsp;}

&nbsp;function Enablecounter() {
&nbsp; enable = setInterval("counter()",500);
&nbsp;}

&nbsp;function counter(){
&nbsp; var msLen, clLen,niLen, totLen, tmp;
&nbsp; var done = 0;
&nbsp; msLen = document.pagerform.body.value.length;
&nbsp; totLen = msLen;

&nbsp; tmp = maxLen - totLen;
&nbsp; if ( document.myform.charcount.value != tmp ) {
&nbsp; &nbsp;if ( tmp > 0 ) {
&nbsp; &nbsp;// update counter
&nbsp; &nbsp;document.myform.charcount.value = tmp;
&nbsp; &nbsp;} else {
&nbsp; &nbsp; if ( tmp == 0 ) {
&nbsp; &nbsp; &nbsp;// alert once and update counter to be 0
&nbsp; &nbsp; &nbsp;alert("Your message is too long");
&nbsp; &nbsp; &nbsp;document.myform.charcount.value = 0;
&nbsp; &nbsp; &nbsp;clearTimeout(enable);
&nbsp; &nbsp; &nbsp;document.pagerform.body.value = document.pagerform.body.value.substring(0,maxLen);
&nbsp; &nbsp; } else {
&nbsp; &nbsp; &nbsp;document.myform.charcount.value = 0;
&nbsp; &nbsp; &nbsp;document.pagerform.body.value = document.pagerform.body.value.substring(0,maxLen)
&nbsp; &nbsp; }
&nbsp; &nbsp;}
&nbsp; }
&nbsp;}


&nbsp; function ClearForm () {
&nbsp; &nbsp;document.pagerform.from.value ="";
&nbsp; &nbsp;document.pagerform.fromemail.value ="";
&nbsp; &nbsp;document.pagerform.body.value ="";
&nbsp; }
</script>


после гега BODY где Вам удобно

<form name="myform"><input type="hidden" name="charcount" value="450"></form>
<form name="pagerform" action="http://www.icq.com/whitepages/page_me.php" method="post" onSubmit="return chPager();" target="_self">
<table width="400" border="0" align="center">
<tr><td valign="top">Отправка ICQ</td></tr>
<tr>
<td>ICQ Получателя:</td><td><input type="text" name="to" value="" size="13"></td></tr><tr>
<td>Ваше имя:</td><td> <input type="text" name="from" size="13"></td></tr><tr>
<td>Ваш Email:</td><td><input type="text" name="fromemail" size="13"></td></tr><tr>
<td>Текст Сообщения:</td><td>
<textarea name="body" cols="50" rows="5" wrap="hard" onblur="Enablecounter();" onChange="Enablecounter();"></textarea></td></tr><tr>
<tr><td valign="top">&nbsp;</td><td>
<input type=submit class=ko2 value=Отправить border="0" alt="Отправить ICQ"></td></tr><tr>
<tr><td valign="top">&nbsp;</td><td><font color=red>Все поля обязательны для заполнения</font>
</td></tr></table>
</form>

500
Veerpool @Veerpool
Отправка E-mail

<table width=400 align=center>
<tr><td>Отправить e-mail</td></tr>
<tr>
<form action=********** method=post>
<center><b>
<td>Ваше имя</td><td><input type=text class=ko2 name=name size=30></td></tr>
<td>Ваш e-mail</td><td><input type=text class=ko2 name=email size=30></td></tr>
<td>E-mail получателя</td><td><input type=text class=ko2 name=toname size=30></td></tr>
<td>Ваше сообщение</td><td><textarea name=mess class=ko2 rows=5 cols=50></textarea></td></tr>
<tr><td>&nbsp;</td><td>
<input type=submit class=ko2 value="Отправить сообщение">
</form>
</td></tr></table>

Вид письма которое приходит на эл.ящик

Имя пославшего:tester
Электронный адрес:tester@tester.ru
Сообщение:your message
IP-адрес:212.5.103.2


Это поля для ввода сообщения, сам скрипт лежит на моем хостинге
Распостраняется бесплатно 😉

52
haker2005 @haker2005
прикольный скрипит календаря

<html>
<!-- This file is NON-EDITABLE! Any modification to this file is PROHIBITED and will VOID the technical support permanently! -->
<head>
<title>FlatCalendarXP 4.10 Limited Edition, By Liming(Victor) Weng, email: flatcal@yahoo.com</title>
<script language="JavaScript">
var IE4=false;
var gd=new Date();
var gToday=[gd.getFullYear(),gd.getMonth()+1,gd.getDate()];
var agenda=[];
var gTheme=self.name.split(":");
var gCurMonth=eval(gTheme[0]);

function fGetById(doc, id) {
&nbsp;if (IE4) return doc.all(id);
&nbsp;else return doc.getElementById(id);
}

function addEvent(date, message, color, action, imgsrc) {
&nbsp;agenda[date] = new Array(message, color, action, imgsrc);
}

function popup(url, framename) {
&nbsp;var w=parent.open(url,framename,gsPopConfig);
&nbsp;if (w&&!framename) w.focus();
}

var gfSelf=fGetById(parent.document,self.name);
with (document) {
write("<lin"+"k rel='stylesheet' type='text/css' href='"+gTheme[1]+".css'>");
write("<scr"+"ipt language='JavaScript' src='"+gTheme[1]+".js'></scr"+"ipt>");
write("<scr"+"ipt language='JavaScript' src='"+gTheme[2]+"'></scr"+"ipt>");
}
</script>
</head>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onmouseup="self.status='FlatCalendarXP 4.10 Limited Edition, Copyright 2001';return true;">
<script language="JavaScript">
//********************************************************
// FlatCalendarXP 4.10 Limited Edition (emailware), by Liming(Victor) Weng
// Release date: 2001.8.14 &nbsp;Email: flatcal@yahoo.com
// Notice:
// 1. This emailware is only free for private use, and must mail me first!
// 2. For any commercial use, contact me to pay a small amount of license fee.
// 3. Please respect my hard work. Any usage of or modification to this script without
// &nbsp; &nbsp;the authorization from the author may be sued for a reimbursement up to USD$10,000 !!!
// 4. This script is unlicensed, report to the author if you find it on a commercial site.
//********************************************************
var gdBegin=new Date(gBegin[0],gBegin[1]-1,gBegin[2]);
var gdEnd=new Date(gEnd[0],gEnd[1]-1,gEnd[2]);
var gcbMon,gcbYear;
var gcTemp=gcBG;
var gCellSet=[];
var giSat=(gbEuroCal)?5:6;
var giSun=(gbEuroCal)?6:0;
if (gbEuroCal)
gWeekDay=[].concat(gWeekDay.slice(1), gWeekDay[0]);
var cal=[];
for (var i=0;i<6;i++)
&nbsp; cal[i]=[];

//--------

function fGetAgenda(d) {
&nbsp;var s=fCalibrate(d[0],d[1]);
&nbsp;if (!fValidRange(s[0],s[1],d[2]))
return [gsOutOfRange, gcBG, null];
&nbsp;var ag=fHoliday(s[0],s[1],d[2]);
&nbsp;if (ag==null)
ag=["",gcBG,gsAction];
&nbsp;return ag;
}

function fValidRange(y,m,d) {
&nbsp;var date=new Date(y,m-1,d);
&nbsp;return (date>=gdBegin)&&(date<=gdEnd);
}

function fCalibrate(y,m) {
&nbsp;if (m<1) { y--; m=12; }
&nbsp;else if (m>12) { y++; m=1; }
&nbsp;return [y,m];
}

function fBuildCal(y,m) {
&nbsp;m=parseInt(m,10);
&nbsp;var days=[31,31,(y%4==0&&y%100!=0||y%400==0)?29:28,31,30,31,30,31,31,30,31,30,31];
&nbsp;var dCalDate=new Date(y,m-1,1);
&nbsp;var iDayOfFirst=dCalDate.getDay();
&nbsp;if (gbEuroCal)
if (--iDayOfFirst<0)
&nbsp;iDayOfFirst=6;
&nbsp;var iOffsetLast=days[m-1]-iDayOfFirst+1;
&nbsp;var iDate=1;
&nbsp;var iNext=1;
&nbsp;for (var d=0;d<7;d++)
cal[0][d]=(d<iDayOfFirst)?[m-1,-(iOffsetLast+d)]:[m,iDate++];
&nbsp;for (var w=1;w<6;w++)
&nbsp; for (var d=0;d<7;d++)
&nbsp;cal[w][d]=(iDate<=days[m])?[m,iDate++]:[m+1,-(iNext++)];
&nbsp;return cal;
}

function fCheckRange(y,m) {
&nbsp;if (y>gEnd[0]||y<gBegin[0]||(y==gBegin[0]&&m<gBegin[1])||(y==gEnd[0]&&m>gEnd[1])) {
alert(gsOutOfRange);
if (gcbMon) gcbMon.options[gCurMonth[1]-1].selected=true;
if (gcbYear) gcbYear.options[gCurMonth[0]-gBegin[0]].selected=true;
return false;
&nbsp;}
&nbsp;return true;
}

function fSetDate(y,m,d) {
&nbsp;if (!fCheckRange(y,m))
return;
&nbsp;var action=fGetAgenda([y,m,d])[2];
&nbsp;if (action!=null)
eval(action);
}

//------------------

function fSetSelected(aCell) {
&nbsp;var s=fGetSelected(aCell);
&nbsp;fSetDate(s[0],s[1],s[2]);
}

function fGetSelected(aCell){
&nbsp;var y=gCurMonth[0];
&nbsp;var m=gCurMonth[1];
&nbsp;aCell.bgColor=gcBG;
&nbsp;var chd=(IE4)?aCell.children[0]:aCell.firstChild;
&nbsp;with (chd) {
&nbsp; var d=parseInt(innerHTML,10);
&nbsp; if (style.color==gcOtherDay)
&nbsp;m+=(id<10)?-1:1;
if (m<1) {y--; m=12;}
else if (m>12) { y++; m=1;}
return [y,m,d];
&nbsp;}
}

function fDrawCal() {
&nbsp;var sTD=" width='"+giCellWidth+"' style='height:"+giCellHeight+";' ";
&nbsp;var sDIV=" style='position:relative;height:"+(giCellHeight-4)+";width:"+giCellWidth+";' ";
&nbsp;var id=0;
&nbsp;with (document) {
write("<tr>");
for (var i=0; i<7; i++)
&nbsp;write("<td class='CalHead' "+sTD+">"+gWeekDay[i]+"</td>");
write("</tr>");
&nbsp; for (var w=1; w<7; w++) {
&nbsp;write("<tr>");
&nbsp;for (var d=0; d<7; d++) {
&nbsp; write("<td "+sTD+"><div class='CalCell' "+sDIV+" onMouseOver='gcTemp=this.style.backgroundColor;this.style.backgroundColor=gcToggle;self.status=this.title;return true;' onMouseOut='this.style.backgroundColor=gcTemp?gcTemp:\"transparent\";' onclick='fSetSelected(this)'>"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Coded by Liming Weng(Victor Won) &nbsp;email:victorwon@netease.com
&nbsp; write("<A id='"+(id++)+"' href='javascript:' class='CellAnchor' onfocus='this.blur();' onclick='return false;' >00</A></div></td>")
&nbsp;}
&nbsp;write("</tr>");
}
&nbsp;}
}

function fUpdateCal(y,m) {
&nbsp;var c=fBuildCal(y,m);
&nbsp;var ag,d;
&nbsp;var offset=(giDCStyle==1)?2:0;
&nbsp;for (var week=0; week<6; week++)
for (var day=0; day<7; day++) {
&nbsp;m=c[week][day][0];
&nbsp;d=c[week][day][1];
&nbsp;with (gCellSet[(7*week)+day+offset]) {
&nbsp; if (d<0) {
&nbsp; &nbsp;style.color=gcOtherDay;
&nbsp; &nbsp;d=-d;
&nbsp; }else{
&nbsp; &nbsp;style.color=(day==giSun)?gcSun:(day==giSat)?gcSat:gcWorkday;
&nbsp; }
&nbsp; innerHTML=d;
&nbsp; ag=fGetAgenda([y,m,d]);
&nbsp; if (IE4) parentNode=parentElement;
&nbsp; parentNode.title=ag[0];
&nbsp; style.textDecoration=(ag[2])?"none":"line-through";
&nbsp; if (ag[3]) innerHTML+="<BR><IMG SRC='"+ag[3]+"' BORDER=0></IMG>";
&nbsp; with (parentNode) {
&nbsp; &nbsp;style.backgroundColor=(gToday[2]==d&&gToday[1]==m&&m==gCurMonth[1]&&gToday[0]==y)?gcTodayBG:ag[1];
&nbsp; &nbsp;style.backgroundColor=style.backgroundColor;
&nbsp; &nbsp;if (IE4) parentElement.bgColor=ag[1];
&nbsp; &nbsp;else {
&nbsp; &nbsp; parentNode.bgColor=ag[1];
&nbsp; &nbsp; parentNode.bgColor=ag[1];
&nbsp; &nbsp;}
&nbsp; }
&nbsp;}
}
}

function fSetCal(y,m){
&nbsp;if (!fCheckRange(y,m))
return;
&nbsp;if (gcbMon) gcbMon.options[m-1].selected=true;
&nbsp;if (gcbYear) gcbYear.options[y-gBegin[0]].selected=true;
&nbsp;gCurMonth=[y,m];
&nbsp;if (giDCStyle>0) fGetById(document,"calTitle").innerHTML=eval(gsCalTitle);
&nbsp;fUpdateCal(y,m);
&nbsp;if (!IE4) {
gfSelf.width=fGetById(document,"popTable").offsetWidth;
gfSelf.height=fGetById(document,"popTable").offsetHeight;
&nbsp;}
}

function fPrevMonth(){
&nbsp;var m=gCurMonth[1];
&nbsp;var y=gCurMonth[0];
&nbsp;if (--m<1) { m=12; y--; }
&nbsp;fSetCal(y,m);
}

function fNextMonth(){
&nbsp;var m=gCurMonth[1];
&nbsp;var y=gCurMonth[0];
&nbsp;if (++m>12) { m=1; y++; }
&nbsp;fSetCal(y,m);
}

with (document) {
&nbsp;body.bgColor=gcCalBG;
&nbsp;write("<TABLE id='popTable' "+gsPopTable+" >");
&nbsp;var sTitle="<SPAN id='calTitle' class='CalTitle'>"+eval(gsCalTitle)+"</SPAN>";
&nbsp;if (giDCStyle==2)
write("<TR align='center'><TD colspan='3'>"+sTitle+"</TD></TR>");
&nbsp;else if (giDCStyle==1){
write("<TR align='center'><TD><A href='javascript:fPrevMonth()' class='MonthNav'>"+gsNavPrev+"</A></TD><TD align='center'>");
write(sTitle);
write("</TD><TD><A href='javascript:fNextMonth()' class='MonthNav'>"+gsNavNext+"</A></TD></TR>");
&nbsp;} else {
write("<TR align='center'><TD colspan='3'><input type='button' value='"+gsNavPrev+"' class='MonthNav' onClick='fPrevMonth()'> ");
var mstr="<select id='MonSelect' class='CalTitle' onchange='fSetCal(gcbYear.value, gcbMon.value)'>";
for (var i=0; i<12; i++)
&nbsp;mstr+="<option value='"+(i+1)+"'>"+gMonths[i]+"</option>";
mstr+="</SELECT>"; &nbsp;
var ystr="<SELECT id='YearSelect' class='CalTitle' onchange='fSetCal(gcbYear.value, gcbMon.value)'>";
for(var i=gBegin[0];i<=gEnd[0];i++)
&nbsp;ystr+="<OPTION value='"+i+"'>"+i+"</OPTION>";
ystr+="</SELECT>";
if (gbDCSeq)
&nbsp;write(mstr+ystr);
else
&nbsp;write(ystr+mstr);
gcbMon=fGetById(document,"MonSelect");
gcbYear=fGetById(document,"YearSelect");
write(" <input type='button' value='"+gsNavNext+"' class='MonthNav' onclick='fNextMonth()'></TD></TR>");
&nbsp;}

&nbsp;write("<TR><TD align='center' colspan='3'><DIV style='background:"+gcFrame+(gpicBG?" url("+gpicBG+") ":" ")+gsBGRepeat+";'><TABLE "+gsCalTable+" >");
&nbsp;fDrawCal();
&nbsp;gCellSet=getElementsByTagName("A");
&nbsp;fSetCal(gCurMonth[0],gCurMonth[1]);
&nbsp;write("</TABLE></DIV></TD></TR>");
&nbsp;if (!gbHideToday) {
write("<TR><TD align='center' colspan='3'>");
write("<A id='AToday' href='javascript:' class='Today' onclick='if(gbCMFocus)fSetCal(gToday[0],gToday[1]);fSetDate(gToday[0],gToday[1],gToday[2]);this.blur();return false;' onMouseOver='gcTemp=this.style.color;this.style.color=gcToggle;self.status=this.title;return true;' onMouseOut='this.style.color=gcTemp'>"+gsToday+"</A>");
fGetById(document,"AToday").title=fGetAgenda(gToday)[0];
write("</TD></TR>");
&nbsp;}
&nbsp;write("</TABLE>");
&nbsp;gfSelf.width=fGetById(document,"popTable").offsetWidth;
&nbsp;gfSelf.height=fGetById(document,"popTable").offsetHeight;
}
</script>
</body>
</html>

52
haker2005 @haker2005
на страничке падают сердечки

<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Hearts Rain</title></head>
<body bgcolor="#EDEDED" text="#000000" link="#000000">
<center>

<!-- BODY STARTS HERE -->

<script LANGUAGE="JavaScript1.2">

<!-- Begin
var no = 12; // number of hearts
var speed = 10; // smaller number moves the hearts faster
var heart = "heart.gif";
var flag;
var ns4up = (document.layers) ? 1 : 0; &nbsp;// browser sniffer
var ie4up = (document.all) ? 1 : 0;

var dx, xp, yp; &nbsp; &nbsp;// coordinate and position variables
var am, stx, sty; &nbsp;// amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
amx = new Array();
amy = new Array();
stx = new Array();
sty = new Array();
flag = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set coordinate variables
xp[i] = Math.random()*(doc_width-30)+10; &nbsp;// set position variables
yp[i] = Math.random()*doc_height;
amy[i] = 12+ Math.random()*20; &nbsp; &nbsp; &nbsp; &nbsp; // set amplitude variables
amx[i] = 10+ Math.random()*40;
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); &nbsp; &nbsp; // set step variables
flag[i] = (Math.random()>0.5)?1:0;
if (ns4up) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(heart+ "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(heart+ "\" border=\"0\"></layer>");
}
} else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(heart+ "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(heart+ "\" border=\"0\"></div>");
}
}
}

function snowNS() { &nbsp;// Netscape main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
if (yp[i] > doc_height-50) {
xp[i] = 10+ Math.random()*(doc_width-amx[i]-30);
yp[i] = 0;
flag[i]=(Math.random()<0.5)?1:0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
if (flag[i])
dx[i] += stx[i];
else
dx[i] -= stx[i];
if (Math.abs(dx[i]) > Math.PI) {
yp[i]+=Math.abs(amy[i]*dx[i]);
xp[i]+=amx[i]*dx[i];
dx[i]=0;
flag[i]=!flag[i];
}
document.layers["dot"+i].top = yp[i] + amy[i]*(Math.abs(Math.sin(dx[i])+dx[i]));
document.layers["dot"+i].left = xp[i] + amx[i]*dx[i];

}
setTimeout("snowNS()", speed);
}

function snowIE() { &nbsp;// IE main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
if (yp[i] > doc_height-50) {
xp[i] = 10+ Math.random()*(doc_width-amx[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
flag[i]=(Math.random()<0.5)?1:0;
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
if (flag[i])
dx[i] += stx[i];
else
dx[i] -= stx[i];
if (Math.abs(dx[i]) > Math.PI) {
yp[i]+=Math.abs(amy[i]*dx[i]);
xp[i]+=amx[i]*dx[i];
dx[i]=0;
flag[i]=!flag[i];
}

document.all["dot"+i].style.pixelTop = yp[i] + amy[i]*(Math.abs(Math.sin(dx[i])+dx[i]));
document.all["dot"+i].style.pixelLeft = xp[i] + amx[i]*dx[i];
}
setTimeout("snowIE()", speed);
}

if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>

<!-- BODY ENDS HERE -->

</body>

52
haker2005 @haker2005
эфект дождя

<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Rain</title></head>
<body bgcolor="#EDEDED" text="#000000" link="#000000">
<center>

<!-- BODY STARTS HERE -->

<script LANGUAGE="JavaScript">

<!-- Begin
var no = 50;
var speed = 1;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
else
if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8;
for (i = 0; i < no; ++ i) { &nbsp;
initRain();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
else {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
&nbsp; }
}
else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
&nbsp; &nbsp; &nbsp;}
&nbsp; }
}
function initRain() {
a = 6;
r[i] = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx[i] = Math.random() * doc_width + 1;
cy[i] = Math.random() * doc_height + 1;
x[i] = r[i] * sn + cx[i];
y[i] = cy[i];
}
function makeRain() {
r[i] = 1;
cx[i] = Math.random() * doc_width + 1;
cy[i] = 1;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
function updateRain() {
r[i] += s;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
function raindropNS() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
document.layers["dot"+i].top = y[i];
document.layers["dot"+i].left = x[i];
}
setTimeout("raindropNS()", speed);
}
function raindropIE() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
document.all["dot"+i].style.pixelTop = y[i];
document.all["dot"+i].style.pixelLeft = x[i];
}
setTimeout("raindropIE()", speed);
}
if (ns4up) {
raindropNS();
}
else
if (ie4up) {
raindropIE();
}
// &nbsp;End -->
</script>

<!-- BODY ENDS HERE -->

</body>
</html>

20090
Dimitry @Dimitry
Инклудер - в хтмл фаил, вставляет другой хтмл или пхп фаил.
Работает как include() в пхп, только это в хтмл и если данный функции отключенны у юзера работать не будет 😒
Но вещь очень интересная.


<script>
function include(id, url) {
var element = document.getElementById(id);
if (!element) {alert("Bad ID-element!");return;}
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {try {req = new XMLHttpRequest();} catch (e) {req = false;}}
// For Internet Explorer on Windows
else if (window.ActiveXObject) {try {req = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try {req = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) { req = false;}}}
// If active supported
if (req) {req.open('GET', url, false); req.send(null);element.innerHTML = req.responseText;}
else element.innerHTML ="Include not supported!";
}
</script>

<span id="htmlsite">
<script>include("htmlsite", "file.html");</script>
</span>

52
haker2005 @haker2005
слово вращаются спералью

<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Spiral Text</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<META NAME="description" CONTENT="Коллекции CGI, PHP, JavaScript скриптов, Java апплеты, огромное количество документации по разным языкам программирования, анимированные гифы, фоны, полезные программы, форум, ссылки по теме.">
<META NAME="keywords" CONTENT="perl scripts, perl, cgi scripts, cgi, перл, java, java scripts, веб-программирование, web-programming, &nbsp;html, &nbsp;каталог ссылок, документация по веб-программированию, cgi скрипты, java скрипты, игры, java апплеты, &nbsp;апплеты, гифы, скрипты, скрипт, книги по веб-программированию, форум по perl, CGI, Perl, script, HTML">
<Style>
&nbsp; A:Link{ Color: white; Text-decoration: underline}
&nbsp; A:Visited{ Color: white; Text-decoration: underline}
&nbsp; A:Hover{ Color: white; Text-decoration: none}
td, body {font-family: verdana, arial, helvetica; font-size:11px;} &nbsp;
</Style>

<!-- HEAD START HERE -->

<script language=JavaScript>

arrCos = new Array(360); &nbsp; &nbsp;/* Hold the COS lookup table for 0 to 359 deg */
arrSin = new Array(360); &nbsp; &nbsp;/* Hold the SIN lookup table for 0 to 359 deg */

for (i=0;i<360;i++) {
&nbsp; &nbsp;arrSin[i] = Math.sin(i * Math.PI / 180);
&nbsp; &nbsp;arrCos[i] = Math.cos(i * Math.PI / 180);
}

function rotate(objID, x, y, r, deg, rinc) {
&nbsp; &nbsp;/* objID &nbsp; &nbsp;- the ID of the object we're gonna manipulate
&nbsp; &nbsp; * x &nbsp; &nbsp; &nbsp; &nbsp;- current object x-axis
&nbsp; &nbsp; * y &nbsp; &nbsp; &nbsp; &nbsp;- current object y-axis
&nbsp; &nbsp; * r &nbsp; &nbsp; &nbsp; &nbsp;- current object radius
&nbsp; &nbsp; * deg &nbsp; &nbsp; &nbsp;- current rotation around axis in degrees
&nbsp; &nbsp; * rinc &nbsp; &nbsp; - by how much we'll increment the radius this time
&nbsp; &nbsp; */

&nbsp; &nbsp;y = r * arrSin[deg];
&nbsp; &nbsp;x = r * arrCos[deg];
&nbsp; &nbsp;
&nbsp; &nbsp;document.all[objID].style.pixelLeft = x;
&nbsp; &nbsp;document.all[objID].style.pixelTop = y+r+10;
&nbsp; &nbsp;
&nbsp; &nbsp;if (deg % 60 == 0) r += rinc;
&nbsp; &nbsp;
&nbsp; &nbsp;/* Has the radius reached it's maximum/minumum? If so, change the sign of the rinc
&nbsp; &nbsp; * so that instead of incrementing we decrement - and visa versa
&nbsp; &nbsp; */
&nbsp; &nbsp;if (r > 60 || r < 10) {
&nbsp; &nbsp; &nbsp; &nbsp;rinc *= -1;
&nbsp; &nbsp; &nbsp; &nbsp;r += rinc;
&nbsp; &nbsp;}
&nbsp; &nbsp;
&nbsp; &nbsp;deg += 5;
&nbsp; &nbsp;if (deg >= 360) deg = 0;

&nbsp; &nbsp;setTimeout("rotate('" + objID + "'," + x + "," + y + "," + r + "," + deg + "," + rinc + ")", 10);
}

function highlight(objNum, lastNum) {
&nbsp; &nbsp;/* objNum &nbsp; - &nbsp; which object to highlight
&nbsp; &nbsp; * lastNum &nbsp;- &nbsp; which object is currently highlighted
&nbsp; &nbsp; */
&nbsp; &nbsp;
&nbsp; &nbsp;document.all["obj" + objNum].style.color = "#FFFFFF";
&nbsp; &nbsp;document.all["obj" + objNum].style.fontStyle = "italic";
&nbsp; &nbsp;
&nbsp; &nbsp;if (lastNum != 0) document.all["obj" + lastNum].style.color = "";
&nbsp; &nbsp;if (lastNum != 0) document.all["obj" + lastNum].style.fontStyle = "";
&nbsp; &nbsp;
&nbsp; &nbsp;lastNum = objNum;
&nbsp; &nbsp;if (++objNum > 3) objNum = 1; &nbsp; /* Have we reached the last object? */

&nbsp; &nbsp;document.all["obj" + objNum].style.color = "#AAAAAA";
&nbsp; &nbsp;
&nbsp; &nbsp;setTimeout("highlight(" + objNum+ "," + lastNum + ")", 2000);
}

function doit() {
&nbsp; &nbsp;x=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* initial x-axis position &nbsp;*/
&nbsp; &nbsp;y=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* initial y-axis position &nbsp;*/
&nbsp; &nbsp;r=10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* initial radius &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */
&nbsp; &nbsp;deg=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* initial rotation around axis (in degrees) */
&nbsp; &nbsp;rinc = 1; &nbsp; &nbsp; &nbsp; /* radius increment &nbsp; &nbsp; &nbsp; &nbsp; */

&nbsp; &nbsp;/* Begin rotating each phrase with possible offsets to the initial values */
&nbsp; &nbsp;rotate("obj1", x, y, r+10, deg, rinc);
&nbsp; &nbsp;rotate("obj2", x, y, r, deg+45, rinc);
&nbsp; &nbsp;rotate("obj3", x, y, r+20, deg+90, rinc);
&nbsp; &nbsp;rotate("obj4", x, y, r, deg+270, rinc);
&nbsp; &nbsp;
&nbsp; &nbsp;/* Begin highlighting each phase in turn */
&nbsp; &nbsp;highlight(1,0);
}

</SCRIPT>

<STYLE>.rotateOBJ {
POSITION: relative
}
</STYLE>


<!-- HEAD END HERE -->




</head>
<body bgcolor="#737994" text="#FFFFFF" link="#FFFFFF" topmargin="0" leftmargin="0" onload=doit()>



<!-- BODY START HERE -->

<CENTER><FONT color=#cccccc><B><I><FONT face="" size=5><SPAN class=rotateOBJ
id=obj1>"Никогда не</SPAN></FONT><BR><FONT face="" size=5><SPAN
class=rotateOBJ id=obj2>знаешь чем</SPAN></FONT><BR><FONT face=""
size=5><SPAN class=rotateOBJ id=obj3>все это"</SPAN></FONT><BR></I><FONT
face="" size=3><SPAN class=rotateOBJ id=obj4>закончится</SPAN></FONT>
</CENTER></B></FONT>

<!-- BODY END HERE -->








</body>
</html>

52
haker2005 @haker2005
глаза бегающие за курсором

<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Eyes </title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<META NAME="description" CONTENT="Коллекции CGI, PHP, JavaScript скриптов, Java апплеты, огромное количество документации по разным языкам программирования, анимированные гифы, фоны, полезные программы, форум, ссылки по теме.">
<META NAME="keywords" CONTENT="perl scripts, perl, cgi scripts, cgi, перл, java, java scripts, веб-программирование, web-programming, &nbsp;html, &nbsp;каталог ссылок, документация по веб-программированию, cgi скрипты, java скрипты, игры, java апплеты, &nbsp;апплеты, гифы, скрипты, скрипт, книги по веб-программированию, форум по perl, CGI, Perl, script, HTML">
<Style>
&nbsp; A:Link{ Color: #000000; Text-decoration: underline}
&nbsp; A:Visited{ Color: #000000; Text-decoration: underline}
&nbsp; A:Hover{ Color: #000000; Text-decoration: none}
td, body {font-family: verdana, arial, helvetica; font-size:11px;} &nbsp;
</Style>

<!-- HEAD START HERE -->



<!-- HEAD END HERE -->




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

<!-- BODY START HERE -->



<script LANGUAGE="JavaScript1.2">
<!-- Original: &nbsp;demigod@psxexchange.com -->
<!-- Web Site: &nbsp;http://www.psxexchange.com -->

<!-- Begin
var brOK = false, mie = false;
if (document.layers || document.all) brOK = true;
if (document.all) mie = true;
var ex = 0, ey = 0;
var ae, le, re, x0, y0, tid, realx, realy;
function navMove(e) {
ex = e.pageX;
ey = e.pageY;
moveeye()
return routeEvent(e);
}
function mieMove() {
ex = document.body.scrollLeft + event.x;
ey = document.body.scrollTop + event.y;
moveeye();
}
function moveeye() {
dy = ey - y0 - 20;
dx1 = ex - x0 - 20;
dx2 = ex - x0 - 60;
r = Math.sqrt(dx1 * dx1 + dy * dy);
if (r < 20) r = 20;
dx1 = dx1 * 10 / r + x0 + 10;
dy1 = dy * 10 / r + y0 + 10;
r = Math.sqrt(dx2 * dx2 + dy * dy);
if (r < 20) r = 20;
dx2 = dx2 * 10 / r + x0 + 50;
ae.left = x0;
ae.top = y0;
le.left = dx1;
le.top = dy1;
re.left = dx2;
re.top = dy1;
}
function setHandlers() {
if (!mie) {
y0 = document.eyeballs.top;
x0 = document.eyeballs.left;
ae = document.eyeballs;
le = document.lefteye; &nbsp;
re = document.righteye; &nbsp;
window.captureEvents(Event.MOUSEMOVE);
window.onMouseMove = navMove;
}
else {
y0 = document.all.eyeballs.style.pixelTop;
x0 = document.all.eyeballs.style.pixelLeft;
ae = document.all.eyeballs.style;
le = document.all.lefteye.style;
re = document.all.righteye.style;
window.document.onmousemove = mieMove;
}
realx = x0 + 0.1;
realy = y0 + 0.1;
moveall();
}
function moveall() {
rx = realx + 40;
ry = realy + 40;
rx += (ex - rx) * 0.1;
ry += (ey - ry) * 0.1;
realx = rx - 40;
realy = ry - 40;
x0 = Math.round(realx);
y0 = Math.round(realy);
moveeye();
tid = setTimeout('moveall()', 100);
}
function placeeyes(x, y) {
if (brOK) {
ex = x + 40;
ey = y + 40;
s = '<DIV ID ="dummy" STYLE="position:absolute; ' +
'top:'+y+'; left:'+x+'; width:10; height:10;"> </DIV>';
s += '<DIV ID="eyeballs" STYLE="position:absolute; ' +
'top:'+y+'; left:'+x+'; width:80; height:40;"><IMG SRC=' +
'"whites.gif" border=0></DIV>';
s += '<DIV ID="lefteye" STYLE="position:absolute; ' +
'top:'+(y+10)+'; left:'+(x+10)+'; width:20; height:20;">' +
'<IMG SRC="pupil.gif" border=0></DIV>';
s += '<DIV ID="righteye" STYLE="position:absolute; ' +
'top:'+(y+10)+'; left:'+(x+50)+'; width:20; height:20;">' +
'<IMG SRC="pupil.gif" border=0></DIV>';
document.writeln(s);
&nbsp; }
}
function clearEyes() &nbsp;{
if (tid) clearTimeout(tid);
}
placeeyes(200, 100);
window.onload = setHandlers;
window.onunload = clearEyes;
// &nbsp;End -->
</script>


<!-- BODY END HERE -->











<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<div align="center">
&nbsp;<center>
<table border="0" cellspacing="0" cellpadding="0">
&nbsp;<tr>
&nbsp; &nbsp;<td width="100%">
&nbsp; &nbsp; &nbsp;<p align="center"><!--#exec cgi="/cgi-bin/inside/ads/ads.cgi" -->
&nbsp; &nbsp; &nbsp;</td>
&nbsp;</tr>
</table>

&nbsp;</center>
</div>

</body>
</html>


:ph34r: :ph34r:

121
Дима @mb-2
СКРИПТ "затемнения картинок"

<script>
min_opacity=50; // максимальная прозрачность
max_opacity=100; // минимальная...
time_pause=10; // время такта (обратно скорости)
gradient_opacity=5; // ступень изменения затемнения
function f_light(img,type) {
&nbsp;f=img.style.filter;
&nbsp;opacity=f.slice(f.indexOf("opacity=")+8,f.length-f.indexOf("opacity=")+8);
&nbsp;opacity=opacity.slice(0,opacity.indexOf(")"));
&nbsp;int_opacity=eval(opacity);
&nbsp;if (type=="up") {
&nbsp; &nbsp;if (int_opacity<max_opacity) {
&nbsp; &nbsp; &nbsp;new_opacity=int_opacity+gradient_opacity;
&nbsp; &nbsp; &nbsp;eval("img.style.filter='Alpha(opacity="+(new_opacity)+")';");
&nbsp; &nbsp;}
&nbsp;}
&nbsp;if (type=="down") {
&nbsp; &nbsp;if (int_opacity>min_opacity) {
&nbsp; &nbsp; &nbsp;new_opacity=int_opacity-gradient_opacity;
&nbsp; &nbsp; &nbsp;eval("img.style.filter='Alpha(opacity="+(new_opacity)+")';");
&nbsp; &nbsp;}
&nbsp;} &nbsp; &nbsp; &nbsp;
}
function ring() {
&nbsp;array_imgs=document.images;
&nbsp;for(i=0;i<array_imgs.length;i++) {
&nbsp; &nbsp;if (array_imgs[i].light=='up') f_light(array_imgs[i],"up");
&nbsp; &nbsp;if (array_imgs[i].light=='down') f_light(array_imgs[i],"down");
&nbsp;}
&nbsp;setTimeout("ring();",time_pause);
}
function start_ring() {
&nbsp;array_imgs=document.images;
&nbsp;for(i=0;i<array_imgs.length;i++) {
&nbsp; &nbsp;if (array_imgs[i].light=='yes') {
&nbsp; &nbsp; &nbsp;array_imgs[i].onmouseover=function up() {this.light='up';}
&nbsp; &nbsp; &nbsp;array_imgs[i].onmouseout=function down() {this.light='down';}
&nbsp; &nbsp; &nbsp;eval("array_imgs[i].style.filter='Alpha(opacity="+min_opacity+")';");
&nbsp; &nbsp;}
&nbsp;}
&nbsp;setTimeout("ring();",time_pause);
}
</script>
<img src="1.jpg" light="yes">
<img src="2.jpg" light="yes">
<img src="3.jpg" light="yes">
<script>
start_ring();
</script>

Чтобы картинка подчинялась осветлению нужно указать в теге параметр light="yes"

696
Евгений @Advocat
иньнресный скрипт ! эмулятор правой кнопки мыши
<style>
/*right_button_menu*/
#right_button_menu{
position: absolute;
visibility:hidden;
background-color: white;
border-right:#F9F8F2 3px ridge;
border-bottom:#F9F8F2 3px ridge;
border-top: #F7EFE7 3px double;
border-left: #F7EFE7 3px double;
font:8pt Tahoma;
pfadding:5 0 5 0;
}
#right_button_menu a{
padding:3 0 3 15;
text-decoration:none;
cursor:default;
display:block;
color:black;
}
#right_button_menu a:hover{
color:white;
background-color: #3169C6;
width: 100%;
}
#shadow{
position: absolute;
visibility:hidden;
background-color:#949EAD;
}
/*end right_button_menu*/
</style>

<script language=javascript type=text/javascript>
//var insertToRight_button_menu
var items_right_button_menu=new Array()
var favorite_url=location.href
var favorite_titel=document.title
var menu_width=160 &nbsp; &nbsp; &nbsp; //ширина меню
var view_shadow=true &nbsp; &nbsp; &nbsp;//тень от меню. Измените на false чтобы не показывать
var offsetY=0
var offsetX=menu_width

//разделы меню. Закоментируйте если что-то не нужно
items_right_button_menu[0]="<a href=javascript:location.reload(); onmouseover=\"window.status='Обновить страничку';return true;\" onmouseout=window.status=''>Обновить</a>";offsetY+=21
items_right_button_menu[1]="<hr size=1 width=98%>";offsetY+=15
items_right_button_menu[2]="<a href=javascript:history.back(); onmouseover=\"window.status='Назад';return true;\" onmouseout=window.status=''>Назад</a>";offsetY+=21
items_right_button_menu[3]="<a href=javascript:history.forward(); onmouseover=\"window.status='Вперед';return true;\" onmouseout=window.status=''>Вперед</a>";offsetY+=21
items_right_button_menu[4]="<hr size=1 width=98%>";offsetY+=15
items_right_button_menu[5]="<a href=javascript:window.external.AddFavorite(favorite_url,favorite_titel); onmouseover=\"window.status='Добавить в избранное';return true;\" onmouseout=window.status=''><nobr>Добавить в избранное</nobr></a>";offsetY+=21
items_right_button_menu[6]="<hr size=1 width=98%>";offsetY+=15
items_right_button_menu[7]="<a href=\"mailto:advocat-gt@yandex.ru?subject=:)\" onmouseover=\"window.status='Написать письмо Автору';return true;\" onmouseout=window.status=''><nobr>Написать письмо автору</nobr></a>";offsetY+=21

items_right_button_menu=items_right_button_menu.join("")

function open_r_menu()
{
if(event.button==2)
{
var menu=document.all["right_button_menu"];
var x=event["clientX"];
var y=event["clientY"];

if(event.clientY+offsetY>document.body["clientHeight"]) {y-=offsetY}
if(event.clientX+offsetX>document.body["clientWidth"]) {x-=offsetX}

menu.innerHTML=items_right_button_menu
menu.style["width"]=menu_width
menu.style["left"]=x
menu.style["top"]=y
menu.style["visibility"]="visible";

if(view_shadow==true){
var shadow=document.all["shadow"];
shadow.style["width"]=menu_width-7;
shadow.style["height"]=offsetY-8
shadow.style["left"]=x+10
shadow.style["top"]=y+10
shadow.style["visibility"]="visible";
}
}
}

function close_r_menu() {
document.all["right_button_menu"].style["visibility"]="hidden";
document.all["shadow"].style["visibility"]="hidden";
}
</script>
<body oncontextmenu="return false" onmousedown="open_r_menu()" onclick="close_r_menu()">
<div id=shadow></div>
<div id=right_button_menu></div>

5397
FF @Lion
В тексте буква меняет свой цвет


<!-- BODY START HERE -->
<body>
<script LANGUAGE="JavaScript">
<!-- Original: K. Rama Moorthy -->
<!-- Web Site: http://www.suyambhu.bizhosting.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
text = "ТУТ ТЕКСТ"; // текст
color1 = "#КОД ЦВЕТА"; // начальный цвет букв
color2 = "#КОД ЦВЕТА"; // цвет выделяемой буквы
fontsize = "3"; // размер шрифта
speed = 200; // скорость пробегания выделения

i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<center><font size =" + fontsize + "><font color=" + color1 + ">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font color=" + color2 + ">" + text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></center>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<center><font size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></center>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++; // reset after going through all letters
}
setInterval("changeCharColor()", speed);
// End -->
</script>
</div>

161
band-girl @band-girl
Вылетающие сообщение в строке статуса:
<html>
<head>
<title>Вылетающие сообщение в строке статуса</title>
<script language="JavaScript" type="text/javascript">
function snapIn(jumpSpaces,position) {
&nbsp;var msg = "Добро пожаловать!!!"
&nbsp;var out = ""
&nbsp;if (killScroll) {return false}
&nbsp;for (var i=0; i<position; i++)
&nbsp; &nbsp;{out += msg.charAt(i)}
&nbsp;for (i=1;i<jumpSpaces;i++)
&nbsp; &nbsp;{out += " "}
&nbsp;out += msg.charAt(position)
&nbsp;window.status = out
&nbsp;if (jumpSpaces <= 1) {
&nbsp; &nbsp;position++
&nbsp; &nbsp;if (msg.charAt(position) == ' ')
&nbsp; &nbsp; &nbsp;{position++ }
&nbsp; &nbsp;jumpSpaces = 100-position
&nbsp;} else if (jumpSpaces > &nbsp;3)
&nbsp; &nbsp; &nbsp; {jumpSpaces *= .75}
&nbsp;else
&nbsp; &nbsp;{jumpSpaces--}
&nbsp;if (position != msg.length) {
&nbsp; &nbsp;var cmd = "snapIn(" + jumpSpaces + "," + position + ")";
&nbsp; &nbsp;scrollID = window.setTimeout(cmd,5);
&nbsp;} else {
&nbsp; &nbsp;scrolling = false
&nbsp; &nbsp;return false
&nbsp;}
&nbsp;return true
}
function snapSetup() {
if (scrolling)
&nbsp;if (!confirm('Re-initialize snapIn?'))
&nbsp; return false
&nbsp; killScroll = true
&nbsp; scrolling = true
&nbsp; var killID = window.setTimeout('killScroll=false',6)
&nbsp; scrollID = window.setTimeout('snapIn(100,0)',10)
&nbsp; return true
}
var scrollID = Object
var scrolling = false
var killScroll = false
</script>
</head>
<body onLoad="snapSetup()" ?>
</body>
</html>


Увеличивающийся текст: <script Language="Javascript"> &nbsp;
<!-- Hiding &nbsp;

bname=navigator.appName; &nbsp;

bversion=parseInt(navigator.appVersion) &nbsp;

if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){ &nbsp;

if (bname=="Netscape"){ &nbsp;

brows=true &nbsp;

del=30 &nbsp;

} &nbsp;
&nbsp;
else{ &nbsp;

brows=false &nbsp;

del=80 &nbsp;

} &nbsp;

var msg=0; &nbsp;

var z=0; &nbsp;

var timer1; &nbsp;

var message= new Array(); &nbsp;

var color= new Array(); &nbsp;

var values= new Array('-6','-5','-4','-3','-2','-1','+1','+2','+3','+4','+5','+6') &nbsp;

// Here is text &nbsp;
&nbsp;
&nbsp;
message[0]='WOweb.ru' &nbsp;
color[0]='#FF0000' &nbsp;
&nbsp;

message[1]='New JavaScript' &nbsp;
color[1]='#0000FF' &nbsp;
&nbsp;

message[2]='Easily tunes and in use' &nbsp;
color[2]='#FFFF00' &nbsp;
&nbsp;

message[3]='Netscape 4' &nbsp;
color[3]='#000000' &nbsp;
&nbsp;

message[4]='Explorer 4' &nbsp;
color[4]='#00FF00' &nbsp;
&nbsp;
// Here is some more text
&nbsp;

function start(){ &nbsp;

if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){ &nbsp;

if(z<values.length){ &nbsp;

if (brows){ &nbsp;

document.layers['text'].document.writeln('<P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'"face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P>') &nbsp;
&nbsp;
&nbsp;
&nbsp;document.layers['text'].document.close(); &nbsp;
&nbsp;
} &nbsp;
&nbsp;

else{ &nbsp;
&nbsp;

text.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'" face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P></Pre>' &nbsp;
&nbsp;

} &nbsp;
&nbsp;

z++; &nbsp;

timer1=window.setTimeout('start()',del) &nbsp;

} &nbsp;
&nbsp;

else &nbsp;
&nbsp;

chg(); &nbsp;
&nbsp;

} &nbsp;
&nbsp;

} &nbsp;
&nbsp;

function stop(){ &nbsp;
&nbsp;

if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)) &nbsp;

window.clearTimeout(timer1); &nbsp;
&nbsp;
window.clearTimeout(timer2); &nbsp;

} &nbsp;

function chg(){ &nbsp;

if (brows){ &nbsp;

document.layers['text'].document.writeln('') &nbsp;

document.layers['text'].document.close(); &nbsp;

} &nbsp;
&nbsp;

else &nbsp;

text.innerHTML=''; &nbsp;

if(msg<message.length-1){ &nbsp;

msg++; &nbsp;

} &nbsp;

else &nbsp;

msg=0; &nbsp;

z=0; &nbsp;

timer2=window.setTimeout('start()',1000) &nbsp;

} &nbsp;

} &nbsp;

// done hiding --> &nbsp;
</Script> &nbsp;

<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" onLoad="start()" onUnload="stop()">
<center>

<!-- BODY START HERE -->

<Div id="text" style="position: absolute; left: 40; top: 80"> </Div>
<Layer name="text" left=4 top=80> </Layer>

<!-- BODY END HERE -->



</body>
</html>



Плавающие меню:
<script language=JavaScript>


&nbsp; &nbsp;/* Show an object */
&nbsp; &nbsp;function showObject(object) {
&nbsp; &nbsp; &nbsp; &nbsp;object.visibility = VISIBLE;
&nbsp; &nbsp;}

&nbsp; &nbsp;/* Hide an object */
&nbsp; &nbsp;function hideObject(object) {
&nbsp; &nbsp; &nbsp; &nbsp;object.visibility = HIDDEN;
&nbsp; &nbsp;}

&nbsp; &nbsp;/* Slide the logo from top to middle */
&nbsp; &nbsp;function slideLogo(from, to) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (from < to) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;company.top = (from += 10);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setTimeout('slideLogo(' + from + ',' + to + ')', 75);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else initObjects();
&nbsp; &nbsp;}

&nbsp; &nbsp;/* Rotate selected objects */
&nbsp; &nbsp;function rotateObjects() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (var i = 0; i < pos.length; i++) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pos[i] += inc; objects[i].visibility = 'visible';
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;objects[i].left = (r * Math.cos(pos[i])) + xoff
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;objects[i].top = (r * Math.sin(pos[i])) + yoff;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;rotateTimer = setTimeout("rotateObjects()", 70);
&nbsp; &nbsp;}

&nbsp; &nbsp; /* Initialize selected objects for rotation */
&nbsp; &nbsp; function initObjects() {
&nbsp; &nbsp; &nbsp; &nbsp;/* Here is the array of HTML elements that will be rotated, from fly1 to fly4
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Just put the shortcut variables to the HTML elements in this little array
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and they will be rotated automatically */
&nbsp; &nbsp; &nbsp; &nbsp;objects = new Array(fly1, fly2, fly3, fly4);
&nbsp; &nbsp; &nbsp; &nbsp;pos = new Array();
&nbsp; &nbsp; &nbsp; &nbsp;pos[0] = 0;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (var i = 1; i < objects.length; i++) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;rotateObjects();
&nbsp; &nbsp;}

/* Variables for rotating objects */
&nbsp; &nbsp;var objects;
&nbsp; &nbsp;var pos;
&nbsp; &nbsp;var r = 160; &nbsp; &nbsp; &nbsp; &nbsp;// radius
&nbsp; &nbsp;var xoff = 180; &nbsp; &nbsp; // x offset
&nbsp; &nbsp;var yoff = 270; &nbsp; &nbsp; // y offset
&nbsp; &nbsp;var pi = Math.PI; &nbsp; // get pi
&nbsp; &nbsp;var inc = pi / 180; // degrees per rotation cycle
&nbsp; &nbsp;var objects; &nbsp; &nbsp; &nbsp; &nbsp;// objects to be rotated
&nbsp; &nbsp;var pos; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// position for objects


</SCRIPT>

<!-- HEAD END HERE -->




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

<!-- BODY START HERE -->

<DIV class=fly id=fly1>
<P><A
href="http://www.woweb.ru"
onmouseout=hideObject(desc1) onmouseover=showObject(desc1) target=_blank>Ваша ссылка</A> </P></DIV>
<DIV class=fly id=fly2>
<P><A
href="http://www.woweb.ru"
onmouseout=hideObject(desc2) onmouseover=showObject(desc2) target=_blank
_blank??>JavaScript scripts</A> </P></DIV>
<DIV class=fly id=fly3>
<P><A
href="http://www.woweb.ru"
onmouseout=hideObject(desc3) onmouseover=showObject(desc3)
target=_blank>Скрипты</A> </P></DIV>
<DIV class=fly id=fly4>
<P><A
href="http://www.woweb.ru"
onmouseout=hideObject(desc4) onmouseover=showObject(desc4)
target=_blank>Главная</A> </P></DIV>
<DIV class=logo id=company>
<P>Плавающее меню</P></DIV>
<DIV class=desc id=desc1>
<P>Ваша ссылка</P></DIV>
<DIV class=desc id=desc2>
<P>JavaScript scripts</P></DIV>
<DIV class=desc id=desc3>
<P>Скрипты</P></DIV>
<DIV class=desc id=desc4>
<P>Главная</P></DIV>
<script language=JavaScript>


&nbsp; &nbsp;/* Simple version detection */
&nbsp; &nbsp;var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);

/* They can be used in place
&nbsp; &nbsp; &nbsp; of hidden and visible because on occasion Navigator has problems with the two */
&nbsp; &nbsp;var HIDDEN = (isNS) ? 'hide' : 'hidden';
&nbsp; &nbsp;var VISIBLE = (isNS) ? 'show' : 'visible';

&nbsp; &nbsp;/* Create shortcut variables for different absolutely positioned elements */
&nbsp; &nbsp;var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
&nbsp; &nbsp;var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
&nbsp; &nbsp;var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
&nbsp; &nbsp;var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
&nbsp; &nbsp;var company = (isNS) ? document.company : document.all.company.style;
&nbsp; &nbsp;var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
&nbsp; &nbsp;var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
&nbsp; &nbsp;var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
&nbsp; &nbsp;var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;

&nbsp; &nbsp;/* Begin the sliding of the logo */
&nbsp; &nbsp;slideLogo(0, 140);



</SCRIPT>


<!-- BODY END HERE -->



</body>
</html>


17
Country @Country
Прожектор

<html>
<head>
<title>WOscripts.com - JavaScript - Spotlight </title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<META NAME="description" CONTENT="Коллекции CGI, PHP, JavaScript скриптов, Java апплеты, огромное количество документации по разным языкам программирования, анимированные гифы, фоны, полезные программы, форум, ссылки по теме.">
<META NAME="keywords" CONTENT="perl scripts, perl, cgi scripts, cgi, перл, java, java scripts, веб-программирование, web-programming, &nbsp;html, &nbsp;каталог ссылок, документация по веб-программированию, cgi скрипты, java скрипты, игры, java апплеты, &nbsp;апплеты, гифы, скрипты, скрипт, книги по веб-программированию, форум по perl, CGI, Perl, script, HTML">


<!-- HEAD START HERE -->

<style type="text/css">
#divExCont {position:absolute; left:0px; top:0px; clip:rect(0px 0px 0px 0px); layer-background-color:#ffffff; background-color:#ffffff;}
#divCircle {position:absolute; z-index:500; visibility:hidden; width:170px;}
body &nbsp; &nbsp; &nbsp; {background-color:#000000; overflow:hidden;} &nbsp;
</style>
<script language="JavaScript" type="text/javascript">
/********************************************************************************** &nbsp;
Spotlight
* &nbsp; Copyright (C) 2001 Thomas Brattli
* &nbsp; This script was released at WOscripts.com
* &nbsp; Visit for more great scripts!
* &nbsp; This may be used and changed freely as long as this msg is intact!
* &nbsp; We will also appreciate any links you could give us.
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
return this
}
var bw=new lib_bwcheck()



/*** Variables to set ***/
sCircleWidth = 168 //The width the script will clip to
sCircleHeight = 168 //The height the script will clip to
sStarty = 200 &nbsp;//Where do you want it to initially start
sStartx = 200 &nbsp;//Where do you want it to initially start
clipSpeed = 20 &nbsp;//Number of pixels for each step in the animation.

/******************************************************************************
Making the clipobject part
******************************************************************************/
function makeObj(obj, nest, x, y){
nest = (!nest) ? "":'document.'+nest+'.'; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;this.css = bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0; &nbsp;
this.evnt = bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
this.clip = b_clip;
this.clipIt = b_clipIt;
this.clipTo = b_clipTo;
this.obj = obj + "Object";
eval(this.obj + "=this");
return this;
}

// A unit of measure that will be added when setting the position or size of a layer.
var px = bw.ns4||window.opera?"":"px";

//clip part
function b_clipTo(t,r,b,l){
if (bw.ns4){
&nbsp;this.css.clip.top=t;this.css.clip.right=r;this.css.clip.bottom=b;this.css.clip.left=l;
}
else {
&nbsp;this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";
}
}
function b_clipIt(tstop,rstop,bstop,lstop,step,fn){
if (!fn) fn = null
var clipval = new Array()
if (bw.dom || bw.ie4) {
&nbsp;clipval = this.css.clip
&nbsp;clipval = clipval.slice(5,clipval.length-1);
&nbsp;clipval = clipval.split(' ')
&nbsp;for (var i=0; i<4; i++) clipval[i] = parseInt(clipval[i])
}
else {
&nbsp;clipval[0] = this.css.clip.top
&nbsp; &nbsp; clipval[1] = this.css.clip.right
&nbsp; &nbsp; clipval[2] = this.css.clip.bottom
&nbsp; &nbsp; clipval[3] = this.css.clip.left
}
totantstep = Math.max(Math.max(Math.abs((tstop-clipval[0])/step),Math.abs((rstop-clipval[1])/step)),
&nbsp;Math.max(Math.abs((bstop-clipval[2])/step),Math.abs((lstop-clipval[3])/step)))
if (!this.clipactive)
&nbsp;this.clip(clipval[0],clipval[1],clipval[2],clipval[3],(tstop-clipval[0])/totantstep,
&nbsp; (rstop-clipval[1])/totantstep,(bstop-clipval[2])/totantstep,
&nbsp; &nbsp;(lstop-clipval[3])/totantstep,totantstep,0, fn)
}
function b_clip(tcurr,rcurr,bcurr,lcurr,tperstep,rperstep,bperstep,lperstep,totantstep,antstep, fn){
tcurr=tcurr+tperstep; rcurr=rcurr+rperstep
bcurr=bcurr+bperstep; lcurr=lcurr+lperstep
this.clipTo(tcurr,rcurr,bcurr,lcurr)
if(antstep<totantstep){
&nbsp;this.clipactive=true
&nbsp;antstep++
&nbsp;setTimeout(this.obj+".clip("+tcurr+","+rcurr+","+bcurr+","+lcurr+","+tperstep+","
&nbsp; +rperstep+","+bperstep+","+lperstep+","+totantstep+","+antstep+",'"+fn+"')", 40)
}else{
&nbsp;this.clipactive = false
&nbsp;eval(fn)
}
}
/******************************************************************************
Initiating the page and the clip objects.
******************************************************************************/
function spotInit(){
pageWidth = (bw.ns4 || bw.ns6)?innerWidth:document.body.clientWidth;
pageHeight = (bw.ns4 || bw.ns6)?innerHeight:document.body.clientHeight;
oExCont = new makeObj('divExCont')
if (bw.dom || bw.ie4){
&nbsp;oExCont.css.width = pageWidth+px
&nbsp;oExCont.css.height = pageHeight+px
}
oCircle = new makeObj('divCircle','divExCont')
oExCont.clipTo(sStarty,sStartx+sCircleWidth,sStarty+sCircleHeight,sStartx)
oCircle.css.left = sStartx+px
oCircle.css.top = sStarty+px
oCircle.css.visibility = "visible"
if (bw.ns4)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = moveCircle;
}
function moveCircle(e){
x = (bw.ns4 || bw.ns6)?e.pageX:event.x
y = (bw.ns4 || bw.ns6)?e.pageY:event.y
oExCont.clipTo(y-sCircleHeight/2, x+sCircleWidth/2, y+sCircleHeight/2, x-sCircleWidth/2)
oCircle.css.left = x - sCircleWidth/2 + px
oCircle.css.top = y - sCircleHeight/2 + px
}
//This is being called when someone clicks the circle.
function showCont(){
document.onmousemove = null
oCircle.css.visibility = "hidden"
oCircle.css.left = 0+px
oCircle.css.top = 0+px
oExCont.clipIt(-clipSpeed, pageWidth+clipSpeed, pageHeight+clipSpeed, -clipSpeed, clipSpeed, 'oExCont.css.overflow="auto"')
}

if (bw.bw) onload = spotInit
</script>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#000000" topmargin="0" leftmargin="0">



<!-- BODY START HERE -->

<div id="divExCont">
<div id="divCircle"><a href="#" onclick="showCont(); return false" onfocus="if(this.blur)this.blur()"><img src="spotlight_circle.gif" width="170" height="170" alt="" border="0"></a></div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<font face="arial,helvetica,sans-serif" size="2" color="#000000">Your regular body content goes here.</font>
</div>


<!-- BODY END HERE -->







</body>
</html>


161
band-girl @band-girl
Показывает поситителю сколько раз он был на вашей странице:
<script LANGUAGE="JavaScript">
<!--

// Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.webmastersonline.hpage.net

// Boolean variable specified if alert should be displayed if cookie exceeds 4KB
var caution = false

// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
&nbsp;var curCookie = name + "=" + escape(value) +
&nbsp; ((expires) ? "; expires=" + expires.toGMTString() : "") +
&nbsp; ((path) ? "; path=" + path : "") +
&nbsp; ((domain) ? "; domain=" + domain : "") +
&nbsp; ((secure) ? "; secure" : "")
&nbsp;if (!caution || (name + "=" + escape(value)).length <= 4000)
&nbsp; document.cookie = curCookie
&nbsp;else
&nbsp; if (confirm("Cookie exceeds 4KB and will be cut!"))
&nbsp; &nbsp;document.cookie = curCookie
}

// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
&nbsp;var prefix = name + "="
&nbsp;var cookieStartIndex = document.cookie.indexOf(prefix)
&nbsp;if (cookieStartIndex == -1)
&nbsp; return null
&nbsp;var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
&nbsp;if (cookieEndIndex == -1)
&nbsp; cookieEndIndex = document.cookie.length
&nbsp;return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}

// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
&nbsp;if (getCookie(name)) {
&nbsp; document.cookie = name + "=" +
&nbsp; ((path) ? "; path=" + path : "") +
&nbsp; ((domain) ? "; domain=" + domain : "") +
&nbsp; "; expires=Thu, 01-Jan-70 00:00:01 GMT"
&nbsp;}
}

// date - any instance of the Date object
// * you should hand all instances of the Date object to this function for "repairs"
// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn Advanced JavaScript Programming"
function fixDate(date) {
&nbsp;var base = new Date(0)
&nbsp;var skew = base.getTime()
&nbsp;if (skew > 0)
&nbsp; date.setTime(date.getTime() - skew)
}

var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000)
var visits = getCookie("counter")
if (!visits)
&nbsp;visits = 1
else
&nbsp;visits = parseInt(visits) + 1
setCookie("counter", visits, now)
document.write("You have been here " + visits + " time(s).")

// -->
</SCRIPT>

<!-- BODY END HERE -->



</body>
</html>



Мерцающие точки около курсора:
<html>
<head>
<title>Мерцающие точки около курсора</title>
</head>
<body>
</head>
<body>
<script language="JavaScript">
function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) { //v1.2
if ((document.layers)||(document.all)){
with (Math) {yynextx= eval(yyfnx)}
with (Math) {yynexty= eval(yyfny)}
yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep;
if (document.layers){
eval(yydiv+".top="+(yynexty+yytop))
eval(yydiv+".left="+(yynextx+yyleft)) &nbsp;}
if (document.all){
eval("yydiv=yydiv.replace(/.layers/gi, '.all')");
eval(yydiv+".style.pixelTop="+(yynexty+yytop));
eval(yydiv+".style.pixelLeft="+(yynextx+yyleft)); &nbsp;}
argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')';
if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");} }}
function YY_Mousetrace(evnt) {
if (yyns4)
{if (evnt.pageX) {yy_ml=evnt.pageX; &nbsp;yy_mt=evnt.pageY;} &nbsp;}
else{
yy_ml=(event.clientX + document.body.scrollLeft);
yy_mt=(event.clientY + document.body.scrollTop);}
if (yy_tracescript)eval(yy_tracescript)}
</script>
<div id="yyd0" style="position:absolute; left:10px; top:50px; width:3px; height:3px; z-index:1; background-color: #19636c; layer-background-color: #19636c; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd1" style="position:absolute; left:20px; top:50px; width:3px; height:3px; z-index:1; background-color: #708574; layer-background-color: #708574; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd2" style="position:absolute; left:30px; top:50px; width:3px; height:3px; z-index:1; background-color: #379bbf; layer-background-color: #379bbf; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd3" style="position:absolute; left:40px; top:50px; width:3px; height:3px; z-index:1; background-color: #25184c; layer-background-color: #25184c; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd4" style="position:absolute; left:50px; top:50px; width:3px; height:3px; z-index:1; background-color: #31bd3c; layer-background-color: #31bd3c; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd5" style="position:absolute; left:60px; top:50px; width:3px; height:3px; z-index:1; background-color: #c11efd; layer-background-color: #c11efd; border: 1px none #000000; clip: rect(0 3 3 0)"></div>
<script>
var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0;
document.onmousemove = YY_Mousetrace;
yy_tracescript = '';
if (yyns4){ document.captureEvents(Event.mousemove);
&nbsp;YY_Mousetrace('',',document.YY_Mousetrace1')}
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/39.83007847812662))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/34.224861639800686))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd0\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/27.66510707209673))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/9.240632767417667))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd1\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/16.45318944579641))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/16.0564452288292))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd2\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/6.95348954836835))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/44.13697049887155))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd3\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/33.90077294583733))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/2.2378828869411587))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd4\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/37.858312521039835))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/18.083839795990098))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd5\']',2000,true,80,0,1);
</script>
</body>
</html>


Салют при остоновки курсора:
<html>
<head>
<title>Салют при постановке курсора</title>
<script language="JavaScript1.2">
<!--
var ver &nbsp;= navigator.appVersion;
var dom &nbsp;= document.getElementById ? 1 : 0;
var ie5 &nbsp;= (ver.indexOf("MSIE 5") > -1 && dom) ? 1 : 0;
var n &nbsp;= (document.layers);
var ie = (document.all);
var sparksAflyin = 0;
var totalSparks = 0;
var sparksOn = 1;
function initMouseEvents() {
document.onmousedown = mouseDown;
if (n) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
}
function mouseDown(e) {
if (sparksOn) {
var mousex = (n) ? e.pageX : event.x+document.body.scrollLeft;
var mousey = (n) ? e.pageY : event.y+document.body.scrollTop;
if (!sparksAflyin) {
for (var k = 0; k <= 9; k++)
&nbsp; eval('SHOW("sDiv'+k+'")');
sparksAflyin = 1;
totalSparks = 0;
for(i = 0;i <= 9; i++)
eval('moveTo('+i+',0,'+mousex+','+mousey+')');
&nbsp; &nbsp; &nbsp;}
&nbsp; }
}
function moveTo(i,j, mousex, mousey){
if (j < eval('anim_'+i+'_x.length') ){
var tempx = eval('anim_'+i+'_x[j]+mousex');
var tempy = eval('anim_'+i+'_y[j]+mousey');
if (ie) {
if(tempy+30 > (document.body.offsetHeight+document.body.scrollTop))
tempy = document.body.offsetHeight+document.body.scrollTop-30;
if(tempx+30 > (document.body.offsetWidth+document.body.scrollLeft))
tempx = document.body.offsetWidth+document.body.scrollLeft-30;
eval('document.all.sDiv'+i+'.style.left = tempx;');
eval('document.all.sDiv'+i+'.style.top &nbsp;= tempy;');
}
if (n) {
eval('document.layers.sDiv'+i+'.left = tempx;');
eval('document.layers.sDiv'+i+'.top &nbsp;= tempy;');
}
j++;
// &nbsp;timeout: 50 = fireworks speed, larger number = slower speed
&nbsp; &nbsp;setTimeout("moveTo("+i+","+j+","+mousex+","+mousey+")",50)
}
else {
eval('HIDE("sDiv'+i+'")');
totalSparks++;
}
if (totalSparks == 10) {
sparksAflyin = 0;
totalSparks &nbsp;= 0;
&nbsp; }
}
function SHOW(divName){
if (document.all)
eval('document.all.'+divName+'.style.visibility = "visible";');
else if (document.layers)
eval('document.layers["'+divName+'"].visibility = "visible";');
}
function HIDE(divName){
if (document.all)
eval('document.all.'+divName+'.style.visibility = "hidden";');
else if (document.layers)
eval('document.layers["'+divName+'"].visibility = "hide";');
}
anim_0_x=new Array(20,20,10,0,0,0,0,0,0,0,0,0);
anim_0_y=new Array(-20,-40,-60,-80,-60,-40,-20,0,20,40,60,80);
anim_1_x=new Array(20,20,17,36,60,78,90,92,93,98,108,120,133,152,181);
anim_1_y=new Array(-20,-20,-33,-38,-38,-27,-2,25,51,84,113,141,162,212,253);
anim_2_x=new Array(20,20,2,3,4,5,6,7,8,9,10,12,13,15,18);
anim_2_y=new Array(-20,-20,-33,-38,-38,-27,-2,25,51,84,113,141,162,212,253);
anim_3_x=new Array(-20,-20,-2,-1,7,10,18,35,60,102,94,94,93,97,108,111,117,127);
anim_3_y=new Array(-20,-25,-64,-89,-104,-150,-173,-197,-213,-199,-151,-101,-66,-17,27,87,140,189);
anim_4_x=new Array(-20,-20,-10,-39,-30,-69,-64,-138,-154,-200,-181,-209,-191,-207,-203,-213,-202,-221,-211);
anim_4_y=new Array(-20,-20,-28,-51,-79,-100,-135,-154,-193,-183,-149,-134,-89,-60,8,51,107,157,201);
anim_5_x=new Array(-20,-29,-51,-72,-105,-133,-164,-189,-209,-229,-247,-270,-279,-282,-283,-283,-285,-286,-288);
anim_5_y=new Array(-20,-55,-86,-116,-154,-183,-205,-217,-217,-198,-169,-120,-44,-8,40,87,144,190,248);
anim_6_x=new Array(-20,-20,-7,14,44,79,143,186,217,226,234,244,250,259,265,274);
anim_6_y=new Array(-20,-21,-72,-113,-139,-166,-188,-181,-126,-68,-3,54,134,187,215,257);
anim_7_x=new Array(20,20,-3,-9,-13,-27,-33,-44,-54,-66,-77,-95,-107,-136,-150,-160,-164,-168,-171,-172,-172,-176,-175);
anim_7_y=new Array(-20,-26,-43,-63,-89,-116,-145,-169,-201,-222,-240,-253,-254,-245,-220,-195,-160,-124,-81,-53,-26,19,68);
anim_8_x=new Array(-20,20,-35,39,0,45,-1,24,-15,14,-20,35,-18,38,-11,16,49,64,81,93,100,103,109);
anim_8_y=new Array(-20,-20,-32,-42,-62,-76,-89,-107,-132,-147,-173,-180,-192,-209,-236,-193,-119,-73,-24,51,95,130,188);
anim_9_x=new Array(-20,-51,-89,-110,-165,-191,-228,-240,-259,-271,-277,-281,-287);
anim_9_y=new Array(-20,-20,-35,-37,-34,-16,10,47,105,150,189,227,273);
// &nbsp;End -->
</script>
</head>
<body bgcolor="#000000" text="#9B4E00" link="#8000FF" alink="#9B4E00" vlink="#9B4E00" OnLoad="initMouseEvents()">
<iframe src="menu.htm" align="left" width="140" height="560" scrolling="no" frameborder="0"></iframe>
<div id="sparks">
<div id="sDiv0" style="position:absolute; visibility: hidden;"><font face="arial black" color="red">.</font></div>
<div id="sDiv1" style="position:absolute; visibility: hidden;"><font face="arial black" color="yellow">.</font></div>
<div id="sDiv2" style="position:absolute; visibility: hidden;"><font face="arial black" color="blue">.</font></div>
<div id="sDiv3" style="position:absolute; visibility: hidden;"><font face="arial black" color="red">.</font></div>
<div id="sDiv4" style="position:absolute; visibility: hidden;"><font face="arial black" color="orange">.</font></div>
<div id="sDiv5" style="position:absolute; visibility: hidden;"><font face="arial black" color="white">.</font></div>
<div id="sDiv6" style="position:absolute; visibility: hidden;"><font face="arial black" color="green">.</font></div>
<div id="sDiv7" style="position:absolute; visibility: hidden;"><font face="arial black" color="skyblue">.</font></div>
<div id="sDiv8" style="position:absolute; visibility: hidden;"><font face="arial black" color="yellow">.</font></div>
<div id="sDiv9" style="position:absolute; visibility: hidden;"><font face="arial black" color="white">.</font></div>
</div>
</body>
</html>


Кнопка с цветным текстом:
<html>
<head>
<title>Кнопка с цветным текстом</title>
<script>
function h(color)
{
hn = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A" ,"B", "C", "D", "E", "F")
if(color<0){return "00"}
else if(color>255){
return "FF"
}
else {
s = "" + hn[Math.floor(color/16)] + hn[color%16]
return s
}
}
function toH(red, green, blue){
return h(red) + h(green) + h(blue)
}
function RGB(red, green, blue){
return toH(red, green, blue)
}
</script>
<script>
var sR = 5
var sG = 256
var sB = 56
var R = 5
var G = 256
var B = 256
var b = true;
function setButtonColor(r, g, b) {
document.all["button"].style.color=RGB(r, g, b);
}
function startChanging(){
if(b==true) {
if((R>256)||(G>256)||(B>256)) &nbsp;{
&nbsp;b=false;
&nbsp;}
R+=sR;G+=sG;B+=sB;
}
else {
if((R<0)||(G<0)||(B<0)) &nbsp;{
&nbsp;b=true;
&nbsp;}
R-=sR; G-=sG; B-=sB
}
setButtonColor(R, G, B);
setTimeout("startChanging()", 3)
}
</script>
</head>
<body &nbsp;onload="startChanging()">
<button style="background-color:#ffff33; font: 8pt Fixedsys;" id="button"><p>Кнопка с цветным текстом</p></button>
</body>
</html>

161
band-girl @band-girl
Бегущие на изображении сообщения:
<script LANGUAGE="JavaScript">
<!--

// Your messages. Add as many as you like
var message=new Array()
message[0]="ГЛАВНАЯ СТРАНИЦА: collections, tricks, tutorials, CLICK HERE."
message[1]="ФОРУМ: спросите у автора, напишите свое мнение о сайте. CLICK HERE."
message[2]="О СКРИПТЕ: можно использовать как меню, регулятор скорости прокрутки. CLICK HERE."


// the URLs of your messages
var messageurl=new Array()
messageurl[0]="http://www.woweb.ru"
messageurl[1]="http://www.woweb.ru"
messageurl[2]="http://www.woweb.ru"

// 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"

// font-color of messages
var messagecolor= new Array()
messagecolor[0]="yellow"
messagecolor[1]="lightgreen"
messagecolor[2]="orange"

// font-color of the messagecounter just below the scroller
textcountercolor="white"

// font-size of the messagecounter just below the scroller
textcountersize=7

// distance of the scroller to the left margin of the browser-window (pixels)
var scrollerleft=20

// distance of the scroller to the top margin of the browser-window (pixels)
var scrollertop=20

// speed 1: lower means faster
var pause=20

// speed 2: higher means faster
var step=2

// font-size
var fntsize=8

// font-family
var fntfamily="Arial"

// font-weight: 1 means bold, 0 means normal
var fntweight=1

// do not edit the variables below
var scrollerwidth=368
var scrollerheight=20
var scrollerleft_in=scrollerleft+16
var scrollertop_in=scrollertop+12
var backgroundimagecontent
var clipleft,clipright,cliptop,clipbottom
var i_message=0
var timer
var textwidth
var textcontent=""
var textcountercontent=""
if (fntweight==1) {fntweight="700"}
else {fntweight="100"}

function init() {
gettextcontent()

&nbsp; &nbsp;if (document.all) {
&nbsp;text.innerHTML=textcontent
&nbsp;textcounter.innerHTML=textcountercontent
&nbsp;textwidth=text.offsetWidth
&nbsp;document.all.text.style.posTop=scrollertop_in
&nbsp; &nbsp; &nbsp; &nbsp;document.all.text.style.posLeft=scrollerleft_in+scrollerwidth
&nbsp;document.all.textcounter.style.posTop=scrollertop_in+26
&nbsp; &nbsp; &nbsp; &nbsp;document.all.textcounter.style.posLeft=scrollerleft_in+2
&nbsp;document.all.backgroundimage.style.posTop=scrollertop
&nbsp; &nbsp; &nbsp; &nbsp;document.all.backgroundimage.style.posLeft=scrollerleft

&nbsp;clipleft=0
&nbsp;clipright=0
&nbsp;cliptop=0
&nbsp;clipbottom=scrollerheight
&nbsp;document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
&nbsp; &nbsp;}
if (document.layers) {
&nbsp;document.text.document.write(textcontent)
&nbsp;document.text.document.close()
&nbsp;document.textcounter.document.write(textcountercontent)
&nbsp;document.textcounter.document.close()
&nbsp;textwidth=document.text.document.width
&nbsp;document.text.top=scrollertop_in
&nbsp;document.text.left=scrollerleft_in+scrollerwidth
&nbsp;document.textcounter.top=scrollertop_in+26
&nbsp;document.textcounter.left=scrollerleft_in+2
&nbsp;document.backgroundimage.top=scrollertop
&nbsp; &nbsp; &nbsp; &nbsp;document.backgroundimage.left=scrollerleft
&nbsp;
&nbsp;document.text.clip.left=0
&nbsp;document.text.clip.right=0
&nbsp;document.text.clip.top=0
&nbsp;document.text.clip.bottom=scrollerheight

&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
&nbsp; &nbsp;}
}

function scrolltext() {
&nbsp; &nbsp;if (document.all) {
&nbsp;if (document.all.text.style.posLeft>=scrollerleft_in-textwidth) {
&nbsp; document.all.text.style.posLeft-=step
&nbsp; clipright+=step
&nbsp; if (clipright>scrollerwidth) {
&nbsp; &nbsp;clipleft+=step
&nbsp; }
&nbsp; document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp;
&nbsp; var timer=setTimeout("scrolltext()",pause)
&nbsp;}
&nbsp;else {
&nbsp; changetext()
&nbsp;}
}
&nbsp; if (document.layers) {
&nbsp;if (document.text.left>=scrollerleft_in-textwidth) {
&nbsp; document.text.left-=step
&nbsp; document.text.clip.right+=step
&nbsp; if (document.text.clip.right>scrollerwidth) {
&nbsp; &nbsp;document.text.clip.left+=step
&nbsp; }
&nbsp; var timer=setTimeout("scrolltext()",pause)
&nbsp;}
&nbsp;else {
&nbsp; changetext()
&nbsp;}
}
}

function changetext() {
&nbsp; &nbsp;i_message++
if (i_message>message.length-1) {i_message=0}
gettextcontent()
if (document.all) {
&nbsp;text.innerHTML=textcontent
&nbsp;textwidth=text.offsetWidth
&nbsp;textcounter.innerHTML=textcountercontent
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;document.all.text.style.posLeft=scrollerleft_in+scrollerwidth
&nbsp;clipleft=0
&nbsp;clipright=0
&nbsp;document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
}

if (document.layers) {
&nbsp; &nbsp; document.text.document.write(textcontent)
&nbsp;document.text.document.close()
&nbsp;
&nbsp;document.textcounter.document.write(textcountercontent)
&nbsp;document.textcounter.document.close()
&nbsp;
&nbsp;textwidth=document.text.document.width

&nbsp;document.text.left=scrollerleft_in+scrollerwidth
&nbsp;document.text.clip.left=0
&nbsp;document.text.clip.right=0
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
}
}

function gettextcontent() {
textcontent="<span style='position:relative;font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>"
textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">"
textcontent+="<nobr><font color="+messagecolor[i_message]+">"+message[i_message]+"</font></nobr></a></span>"

var i_textcounter=i_message+1
textcountercontent="<span style='position:relative;font-size:"+textcountersize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>"
textcountercontent+="<nobr><font color="+textcountercolor+">This is message "+i_textcounter+" of "+message.length+"</font></nobr></span>"
}

function changespeed(newspeed) {
&nbsp; &nbsp;if (newspeed=="faster") {
&nbsp;step=step+1
&nbsp;if (step>=20) {step=20}
}
else if (newspeed=="slower") {
&nbsp;step=step-1
&nbsp;if (step<0) {step=0}
}
}

window.onresize=init;

// - End of JavaScript - -->
</SCRIPT>

<STYLE>
A {
text-decoration:none;
}

A:Hover {
text-decoration:underline;
}

body{
overflow-x:hidden;
overflow-y:scroll;
}
</STYLE>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" onLoad="init()">
<center>

<!-- BODY START HERE -->

<DIV ID="backgroundimage" style="position:absolute;left:-2000px"><IMG SRC="textrighttoleftdesign.gif" USEMAP="#textrighttoleft" BORDER=0>
<MAP NAME="textrighttoleft">
&nbsp;<AREA SHAPE=RECT COORDS="271,33,297,54" HREF="#" onClick="changespeed('slower')">
&nbsp;<AREA SHAPE=RECT COORDS="364,33,388,53" HREF="#" onClick="changespeed('faster')">
</MAP></DIV>

<DIV ID="text" style="position:absolute;left:-2000px"></DIV>
<DIV ID="textcounter" style="position:absolute;left:-2000px"></DIV>

<!-- BODY END HERE -->



</body>
</html>



Текст Matrix в полный экран когда пользователь нажмёт на ссылку:

<script LANGUAGE="JavaScript">
<!-- Original: &nbsp;Matt Lewis (matt999_999@yahoo.com) --> <!-- Begin
var matrix_window;
function MatrixWrite(string, bold, italic, speed) {
var height = window.screen.height;
var width = window.screen.width;
var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30);
matrix_window = window.open("blank.htm", "matrix_window", win_dimensions);
matrix_window.document.open("text/html", "replace");
var i;
var timer = 0;
if(matrix_window.moveTo)
matrix_window.moveTo(-10, -30);
if(matrix_window.resizeBy)
matrix_window.resizeBy(0, 50);
matrix_window.document.write("<body bgcolor=000000 text=00ff00 onBlur='self.focus()'>");
matrix_window.document.write("<font face=system>");
if(bold == true) matrix_window.document.write("<b>");
if(italic == true) matrix_window.document.write("<i>");
for(i = 0; i <= string.length; i++) {
timer += (Math.random() * speed);
setTimeout("matrix_window.document.write('" + string.charAt(i) + "');", timer);
}
timer += 2000;
setTimeout("matrix_window.close()", timer);
}
var messages = new Array("The Matrix has you...", "Follow the white rabbit", "Wake up, Neo");
function GetRndIndex() {
return (parseInt(Math.random() * messages.length));
}
function WriteRndMsg(bold, italic, speed) {
MatrixWrite(messages[GetRndIndex()], bold, italic, speed);
}
// &nbsp;End -->
</script>

<!-- HEAD ENDS HERE -->

</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000">

<!-- BODY STARTS HERE -->

<center>
<table>
<tr>
<td>
<a href="javascript:WriteRndMsg(false, false, 750)">Normal text</a>
<br>
<a href="javascript:WriteRndMsg(true, false, 750)"><b>Bold text</b></a>
<br>
<a href="javascript:WriteRndMsg(false, true, 750)"><i>Italic text</i></a><br>
<a href="javascript:WriteRndMsg(true, true, 750)"><b><i>Bold and italic text</i></b></a>
<br>
<a href="javascript:MatrixWrite('Knock knock, Neo', false, false, 750)">Normal string constant</a>
</td>
</tr>
</table>
</center>

<!-- BODY ENDS HERE -->

</body>
</html>


Уменьшение изображения до полного исчезновения:

<script>
<!--

// The width of your images (pixels). All pictures should have the same width.
var imgwidth=240

// The height of your images (pixels). All pictures should have the same height.
var imgheight=160

// The horizontal and vertical position of the images (pixels).
var pos_left=10
var pos_top=10

// The file-names of your images. You may add as many images as you like.
var imgname=new Array()
imgname[0]="imgzoom1_294.jpg"
imgname[1]="imgzoom2_294.jpg"
imgname[2]="imgzoom3_294.jpg"

// Where should those images be linked to?
// Add an URL for each image.
// If you don't want to add an URL just write '#' instead of the URL.
var imgurl=new Array()
imgurl[0]="http://www.woweb.ru"
imgurl[1]="http://www.woweb.ru"
imgurl[2]="http://www.woweb.ru"

// This block will preload your images. Do not edit this block.
var imgpreload=new Array()
for (i=0;i<=imgname.length-1;i++) {
imgpreload[i]=new Image()
imgpreload[i].src=imgname[i]
}

// Standstill-time between the images (microseconds).
var pause=2000

// Speed of the stretching and shrinking effect. More means slower.
var speed=20

// This variable also affects the speed (the length of the step between each inmage-frame measured in pixels). More means faster.
var step=10

// Do not edit the variables below
var cliptop=0
var clipbottom=imgheight
var clipleft=0
var clipright=imgwidth
var i_loop=4*imgwidth
var i_image=0

function shrinkin() {
if (i_loop>=imgwidth) {
&nbsp; &nbsp; imgcontainer.innerHTML="<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>"
&nbsp;i_loop=i_loop-step
&nbsp;var timer=setTimeout("shrinkin()",speed)
&nbsp; }
else {
&nbsp;clearTimeout(timer)
&nbsp;var timer=setTimeout("shrinkout()",pause)
}
}

function shrinkinNN() {
if (i_loop>=imgwidth) {
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.document.write("<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>")
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.document.close()
&nbsp;i_loop=i_loop-step*10
&nbsp;var timer=setTimeout("shrinkinNN()",speed*40)
&nbsp; }
else {
&nbsp;clearTimeout(timer)
&nbsp;var timer=setTimeout("shrinkoutNN()",pause)
}
}

function shrinkout() {
if (i_loop>-step) {
&nbsp; &nbsp; &nbsp; &nbsp;imgcontainer.innerHTML="<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>"
&nbsp;i_loop=i_loop-step
&nbsp;var timer=setTimeout("shrinkout()",speed)
&nbsp; }
else {
&nbsp;clearTimeout(timer)
&nbsp;changeimage()
}
}

function shrinkoutNN() {
if (i_loop>-step) {
&nbsp; &nbsp; &nbsp; &nbsp; document.imgcontainer.document.write("<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>")
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.document.close()
&nbsp;i_loop=i_loop-step*10
&nbsp;var timer=setTimeout("shrinkoutNN()",speed*40)
&nbsp; }
else {
&nbsp;clearTimeout(timer)
&nbsp; &nbsp; &nbsp; &nbsp; document.imgcontainer.document.write("<a href='"+imgurl[i_image]+"' target='_blank'><img width='1' src='"+imgname[i_image]+"' border='0'></a>")
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.document.close()
&nbsp;changeimageNN()
}
}

function changeimage() {
i_loop=4*imgwidth
i_image++
if (i_image>imgname.length-1) {i_image=0}
&nbsp; &nbsp;var timer=setTimeout("shrinkin()",pause)
}

function changeimageNN() {
i_loop=4*imgwidth
i_image++
if (i_image>imgname.length-1) {i_image=0}
&nbsp; &nbsp;var timer=setTimeout("shrinkinNN()",pause)
}

function initiate() {
if (document.all) {
&nbsp;document.all.imgcontainer.style.posLeft=pos_left
&nbsp;document.all.imgcontainer.style.posTop=pos_top
&nbsp; &nbsp; &nbsp; &nbsp;document.all.imgcontainer.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp;changeimage()
}
if (document.layers) {
&nbsp;document.imgcontainer.left=pos_left
&nbsp;document.imgcontainer.top=pos_top
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.clip.left=clipleft
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.clip.right=clipright
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.clip.top=cliptop
&nbsp; &nbsp; &nbsp; &nbsp;document.imgcontainer.clip.bottom=clipbottom
&nbsp;changeimageNN()
}
}

// - End of JavaScript - -->
</script>

<!-- HEAD ENDS HERE -->

</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" onLoad="initiate()">
<center>

<!-- BODY STARTS HERE -->

<span id="imgcontainer" style="position:absolute"></span>

<!-- BODY ENDS HERE -->

</body>
</html>

215
Сатана @Сатана
Скрипт типа светомузыки за курсором (Круче мерц.точек)
</script></center>
<script language=JavaScript>
if (document.all){
colours=new Array('ff0000','00ff00','3366ff','ff00ff','ffa500','ffffff','fff000')
amount=colours.length;
YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,step=0.2,currStep=0,my=0,mx=0;//osw
document.write('<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">');
for (i=0; i < amount; i++)
document.write('<div id="iestars" style="position:absolute;top:0px;left:0px;height:50px;width:50px;font-family:Courier New;font-size:5px;color:'+colours[i]+';padding-top:20px;text-align:center">.</div>');
document.write('</div></div>');
ini=1;<!--fantasyflash.ru-->
gstep=1;
function iMouse(){
my=event.y;mx=event.x;
}
document.onmousemove=iMouse
function dim(){
ini-=gstep;
dt=setTimeout('dim()',10);
if (ini < 2){
clearTimeout(dt);
glow();
}
}
function glow(){
ini+=gstep;
gt=setTimeout('glow()',10);
if (ini > 14){
clearTimeout(gt);
dim();
}
}
function stars(){
ie.style.top=document.body.scrollTop;
for (i=0; i < amount; i++)
{
var layer=iestars[i].style;
layer.filter='glow(color='+colours[i]+', strength='+ini+')';
layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
layer.left=Xdelay+180*Math.cos((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
}
currStep+=step;
}
function delay(){
Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
stars();//osw
setTimeout('delay()',10);
}
delay();
glow();
}
//-->
</SCRIPT>