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

JavaScript - Скрипты

 

19
__JavaScript__ @__JavaScript__
Бегущая строка в строке состояния

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

<script language = "JavaScript">
<!-- Begin
window.status = 'Бегущая строка'
// End -->
</script>

19
__JavaScript__ @__JavaScript__
Бегающий заголовок

<script language=JavaScript>
var titletext="Сборник JavaScripts > Бегающий заголовок"
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
document.title = titletext;
setTimeout("anim()",1);
}
thetext = titletext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==29) {step=1}
if (step==29) {document.title='[ Сборник JavaScripts ~~~~~~~~~~~~~~]'}
if (step==28) {document.title='[~ Сборник JavaScripts ~~~~~~~~~~~~~]'}
if (step==27) {document.title='[~~ Сборник JavaScripts ~~~~~~~~~~~~]'}
if (step==26) {document.title='[~~~ Сборник JavaScripts ~~~~~~~~~~~]'}
if (step==25) {document.title='[~~~~ Сборник JavaScripts ~~~~~~~~~~]'}
if (step==24) {document.title='[~~~~~ Сборник JavaScripts ~~~~~~~~~]'}
if (step==23) {document.title='[~~~~~~ Сборник JavaScripts ~~~~~~~~]'}
if (step==22) {document.title='[~~~~~~~ Сборник JavaScripts~~~~~~~]'}
if (step==21) {document.title='[~~~~~~~~ Сборник JavaScripts ~~~~~~]'}
if (step==20) {document.title='[~~~~~~~~~ Сборник JavaScripts ~~~~~]'}
if (step==19) {document.title='[~~~~~~~~~~ Сборник JavaScripts ~~~~]'}
if (step==18) {document.title='[~~~~~~~~~~~ Сборник JavaScripts ~~~]'}
if (step==17) {document.title='[~~~~~~~~~~~~ Сборник JavaScripts ~~]'}
if (step==16) {document.title='[~~~~~~~~~~~~~ Сборник JavaScripts ~]'}
if (step==15) {document.title='[~~~~~~~~~~~~~~ Сборник JavaScripts]'}
if (step==14) {document.title='[~~~~~~~~~~~~~ Сборник JavaScripts ~]'}
if (step==13) {document.title='[~~~~~~~~~~~~ Сборник JavaScripts ~~]'}
if (step==12) {document.title='[~~~~~~~~~~~ Сборник JavaScripts ~~~]'}
if (step==11) {document.title='[~~~~~~~~~~ Сборник JavaScripts~~~~]'}
if (step==10) {document.title='[~~~~~~~~~ Сборник JavaScripts~~~~~]'}
if (step==9) {document.title='[~~~~~~~~ Сборник JavaScripts ~~~~~~]'}
if (step==8) {document.title='[~~~~~~~ Сборник JavaScripts~~~~~~~]'}
if (step==7) {document.title='[~~~~~~ Сборник JavaScripts~~~~~~~~]'}
if (step==6) {document.title='[~~~~~ Сборник JavaScripts~~~~~~~~~]'}
if (step==5) {document.title='[~~~~ Сборник JavaScripts ~~~~~~~~~~]'}
if (step==4) {document.title='[~~~ Сборник JavaScripts ~~~~~~~~~~~]'}
if (step==3) {document.title='[~~ Сборник JavaScripts ~~~~~~~~~~~~]'}
if (step==2) {document.title='[~ Сборник JavaScripts ~~~~~~~~~~~~~]'}
if (step==1) {document.title='[ Текст ~~~~~~~~~~~~~~]'}

setTimeout("anim()",150); //скорость выбега, чем больше тем медленней выбег.
}
if (document.title)
window.onload=onload=welcometext
</script>

1989
Artur @KillSkill
Не большой скриптики бегущей строки

<!-- Polosa -->
<table style="background: rgb(0, 0, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%" border="1" cellpadding="0" cellspacing="0" height="11">
<tbody><tr>
<td style="background: rgb(0, 0, 0) none no-repeat scroll center center; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<marquee style="color: rgb(0, 0, 0);" width="100%">
<font color="#00ff00"><b>ТУТ ВАШ ТЕКСТ</font></b>
</marquee></td>
</tr></tbody></table>
<!-- /Polosa -->

1989
Artur @KillSkill
Ефект для title

<SCRIPT>
var titletext="Ваш текст"
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
document.title = titletext;
setTimeout("anim()",1);
}
thetext = titletext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==7) {step=1}
if (step==1) {document.title='>==='+thetext+'===<'}
if (step==2) {document.title='=>=='+thetext+'==<='}
if (step==3) {document.title='>=>='+thetext+'=<=<'}
if (step==4) {document.title='=>=>'+thetext+'<=<='}
if (step==5) {document.title='==>='+thetext+'=<=='}
if (step==6) {document.title='===>'+thetext+'<==='}
setTimeout("anim()",200);
}
if (document.title)
window.onload=onload=welcometext
</SCRIPT>

1989
Artur @KillSkill
Анимирований фон вапше ексклюзив 😀

<script language=javaScript>
<!-- Beginning of JavaScript -

img0 = new Image();
img0.src = "1.jpg";

img1 = new Image();
img1.src = "2.jpg";

img2 = new Image();
img2.src = "3.jpg";

img3 = new Image();
img3.src = "4.jpg";

var i_strngth=1
var i_image=0

var imageurl = new Array()
imageurl[0] ="1.jpg"
imageurl[1] ="2.jpg"
imageurl[2] ="3.jpg"
imageurl[3] ="4.jpg"

function showimage() {
if(document.all) {
if (i_strngth <=80) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth+3
var timer=setTimeout("showimage()",400)
}
else {
clearTimeout(timer)
var timer=setTimeout("hideimage()",1000)
}
}

if(document.layers) {
clearTimeout(timer)
document.testimage.document.write("<img src="+imageurl[i_image]+" border=0>")
document.close()
i_image++
if (i_image >= imageurl.length) {i_image=0}
var timer=setTimeout("showimage()",2000)

}
}


function hideimage() {
if (i_strngth >=-3) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth-4
var timer=setTimeout("hideimage()",400)
}
else {
clearTimeout(timer)
i_image++
if (i_image >= imageurl.length) {i_image=0}
i_strngth=1
var timer=setTimeout("showimage()",500)
}
}


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

Отредактировано KillSkill - 13.05.2009
6600
Александр @admiral
;) Сборник JAVASCRIPTS - в этом сборнике содержится 238 скриптов в примерах.

Скачать: **********

PS пароль на сам сборник в архиве в файле pass.txt или Пароль 666754679117666

Отредактировано admiral - 16.05.2009
1989
Artur @KillSkill
Текст в стиле Web 2.0
Ето в стилях пропишите
.cooltext {
position: relative;
height: 23px;
}
.ct-top,.ct-bot,.ct-contur {
font: bold 20px Tahoma;
display: inline-block;
position: absolute;
}
.ct-top {
color: #f19193;
overflow: hidden;
height: 13px;
top: 0px;
left: 0px;
z-index: 999;
}
.ct-bot {
color: #b41118;
z-index: 888;
}
.ct-contur {
top: 1px;
left: 1px;
color: #8c1517;
z-index: 777;
}

а вот ето куда хотите текст
<div class="cooltext">
<b class="ct-top">текст</b>
<b class="ct-bot">текст</b>
<b class="ct-contur">текст</b>
</div>

РЕЗУЛЬТАТ

Отредактировано KillSkill - 01.06.2009
1989
Artur @KillSkill
вот незнаю чо делать решыл скриптов натворить 😀

Скрипт ---поровоз тянет баннеры


<Marquee Behavior="Scroll" Direction="left" width="600" width="100" ScrollAmount="1" ScrollDelay="2" onMouseOver="this.stop()" onMouseOut="this.start()">
<img height="35" src='http://jscriptix.ru/parovozik.gif'>
<a href="javascript:openLayerA('obsv','/baner.html','Банерообмен','520','220','auto'); "><img src='ссылка на банер'></a>
<a href="javascript:openLayerA('obsv','/baner.html','Банерообмен','520','220','auto'); "><img src='ссылка на банер'></a>
<a href="javascript:openLayerA('obsv','/baner.html','Банерообмен','520','220','auto'); "><img src='ссылка на банер'></a>
</MARQUEE>


Отредактировано KillSkill - 02.07.2009
1989
Artur @KillSkill
банер кружыт по всему титульнику как бабочка прикольно

<style>
#normal {POSITION: absolute; VISIBILITY: visible; left: 10px; top: 10px; Z-INDEX: 10000;}
#moving {POSITION: absolute; VISIBILITY: visible; left: 260px; top: 180px; width: 50px; Z-INDEX: 10030;}
</style>
</head>
<body>
<script LANGUAGE="JavaScript1.2">
<!--
var layerRef="null",layerStyleRef="null",styleSwitch="null";
// globale variablen fuers animieren
var dx = 1;
var dy = 1;
var maxgeschw = 99;
if (window.innerWidth) {
var x = (window.innerWidth / 2) - 23;
var y = (window.innerHeight / 2) - 15;
var maxx = window.innerWidth - 46;
var maxy= window.innerHeight - 30;
}
else {
var x = (640 / 2) - 23;
var y = (400 / 2) - 15;
var maxx = 640 - 46;
var maxy= 400 - 30;
}
function init(){
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
} else {
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}

}
function moveLayerTo(layerName,left,top){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
}
function animieren(){
moveLayerTo('moving',x,y);
if (Math.random() < .2) {
if (Math.random() < .5) {
if (Math.random() < .5) {
dx= Math.max(-maxgeschw,dx - 1);
} else {
dx= Math.min( maxgeschw,dx + 1);
}
} else {
if (Math.random() < .5) {
dy= Math.max(-maxgeschw,dy-1);
} else {
dy= Math.min( maxgeschw,dy+1);
}
}
}
x += dx;
y += dy;
x = Math.max(Math.min(maxx,x),0);
y = Math.max(Math.min(maxy,y),0);
if (x==0) {dx = 1}
if (y==0) {dy = 1}
if (x==maxx) {dx=-1}
if (y==maxy) {dy=-1}
setTimeout('animieren()',70);
}
// -->
</script>
<script LANGUAGE="JavaScript1.2">
<!--
if (navigator.userAgent.indexOf("MSIE 4.0; Mac") == -1 ) {
init();
document.writeln('<div id="moving">');
document.writeln('КОД БАННЕРА');
document.writeln('</div>');
animieren();
}
// -->
</script>
</body>

Отредактировано KillSkill - 02.07.2009
1989
Artur @KillSkill
Очень крутые Эффекты с текстом (NEW)
№-1
<marquee direction="right"><img src='http://img68.imageshackus/img68/9234/lm7br.gif'>ННПИШИ СВОЮ НАДПИСЬ<img src='http://img68.imageshackus/img68/9234/lm7br.gif'></marquee>

№-2
<marquee direction="left"><img src='http://img232.imageshackus/img232/3982/hnhj8ej.gif'> НАПИШИ СВОЮ НАДПИСЬ<img src='http://img232.imageshackus/img232/3982/hnhj8ej.gif'></marquee>

№-3
<marquee behavior=alternate direction=up scrollamount=1 scrolldelay=60 height=60 style="text-align;filter:wave(add=0,phase=1, freq=1,strength=15,color=#FF0033)"><center>Твой текст<br>Твой текст <br>Твой текст</center></marquee>

№-4
<marquee behavior="alternate" style="color: #000000; font-family: Arial Narrow; font-size: 12pt; font-style: italic; font-weight: bold" width="80%" height="20"><marquee behavior=alternate width="75"><font face="Comic Sans MS" size="2" color="#FF0033">НАПИШИ СВОЮ НАДПИСЬ</marquee><style="color: #000000; font-family: Arial Narrow; font-size: 12pt; font-style: italic; font-weight: bold"></marquee>

№-5
<marquee behavior="alternate" style="color: #ff99ff; font-family: Arial Narrow; font-size: 12pt; font-style: italic; font-weight: bold" bgcolor="#000000" width="80%" height="20">Твой текст<marquee behavior=alternate width="50"><font face="Comic Sans MS" size="4" color="#FFffFF"> Твой текст</marquee><style="color: #000000; font-family: Arial Narrow; font-size: 12pt; font-style: italic; font-weight: bold">Твой текст</marquee>

<marquee direction="down"><img src='http://img76.imageshackus/img76/1749/0050ut.gif'>НАПИШИ ТУТ ВСЁ ЧТО ЗАХОЧЕТСЯ, НАДЕЮСЬ ПОНРАВИТСЯ!!!!!!!!!!!<img src='http://img76.imageshackus/img76/1749/0050ut.gif'></marquee>

№-6
<marquee direction="up"><img src='http://img238.imageshackus/img238/4063/0015cc.gif'>ТУТ НАПИШИ СВОЙ ТЕКСТ<img src='http://img238.imageshackus/img238/4063/0015cc.gif'></marquee>

№-7
<marquee behavior="alternate" direction="up" width="70%"><marquee direction="right">ВСЕМ ПРИВЕТ</marquee
,color=#FFFFFF)"><center>ТВОЙ ТЕКСТ<br>МОЙ ТЕКСТ<br>НАШ ТЕКСТ</center></marquee>

№-8
<marquee behavior="alternate" direction="up" width="70%"><marquee direction="right"><img src='http://img71.imageshackus/img71/2079/uju2dg.gif'>ВСЕМ ПРИВЕТ<img src='http://img71.imageshackus/img71/2079/uju2dg.gif'> </marquee
,color=#FFFFFF)"><center><img src='http://img231.imageshackus/img231/6199/pix197sa.gif'>ТВОЙ ТЕКСТ<img src='http://img231.imageshackus/img231/6199/pix197sa.gif'> <br><img src='http://img231.imageshackus/img231/6199/pix197sa.gif'> МОЙ ТЕКСТ<img src='http://img231.imageshackus/img231/6199/pix197sa.gif'> <br><img src='http://img231.imageshackus/img231/6199/pix197sa.gif'> НАШ ТЕКСТ<img src='http://img231.imageshackus/img231/6199/pix197sa.gif'></center></marquee>

№-9
<marquee direction=up scrollAmount=0scrollDelay=0 style="filter:wave(add=10,phase=1,freq=2,strength=35)" width=100 height=225><font style="font-size:50px;color:deeppink"><center><b><br>П<br>Р<br>И<br>В<br>Е<br>Т<br>В<br>С<br>Е<br>М<br></font></marquee>

<h2>
<script language="JavaScript1.2">

/*
Neon Lights Text
By JavaScript Kit ()
For this script, TOS, and 100s more DHTML scripts,
Visit
*/

var message="Напиши свою надпись"
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100 //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)

function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
return crossobj
}

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
//eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor

if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
</h2>

№-000 😀
<Style type = "text/css">

.big { color: blue;
font-family: monotype corsiva;
font-size: 38pt;
font-weight: bold}

</style>

<script language = "JavaScript">

//Wave Text! by Spookdog (spookydog3@hotmail.com)
//Submitted to DynamicDrive.com
//For this script and more, visit

<!--you can use this on your web page as long as the above stays in the script-->

var TimerID;
var updown = true;
var str = 1;

function start()
{
if (document.all)
TimerID = window.setInterval( "wave()", 100 );
}

function wave()
{
if ( str > 20 || str < 1 )
updown = !updown;

if ( updown )
str++;
else
str--;

wft.filters( "wave" ).phase = str * 20;
wft.filters( "wave" ).strength = str;
}

window.onload=start
</Script>
<div ID = "wft" Style = "width:600px; filter:wave(add=0, freq=4, light=0, phase=0, strength=5)" class = "big">
Добро пожаловать на мой сайт!!!!</div>

№-10
<center><p align="center"><font size="+1" color="#ff33ff"><marquee behavior="alternate" scrolldelay="65" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="20" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="60" width="15%">ТЕКСТ </marquee><marquee behavior="alternate" scrolldelay="20" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="40" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="55" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="45" width="15%">ТЕКСТ </marquee><marquee behavior="alternate" scrolldelay="55" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="40" width="15%">ТЕКСТ</marquee><marquee behavior="alternate" scrolldelay="20" width="15%">ТЕКСТ</marquee></center></font>

№-11
</script>
<marquee><font face="Monotype Corsiva" size="6pt" color="#ff0000">~~~Напиши тут своё приветствие или пожелание~~~</marquee>

<font color=green><tr><td><font face="tahoma" size="4pt">
<p align="center"><font size="4"><a name="home">
<marquee align="middle" behavior="alternate"
style="font-family: Arial Black; font-size: 25; color:#00ff33" border="4"
width="500" height="33">~~~Незабудь про гостевую~~~</marquee></a></font></font>

<P style="FILTER: Shadow(color=#F08080,direction=45); WIDTH: 600px; FONT-WEIGHT: bold; FONT-SIZE: 25px;FONT-FAMILY: georgia; TEXT-ALIGN: center;"><FONT color=#483D8B><BR> СПАСИБО, ЧТО ПОСЕТИЛИ МОЙ САЙТ!!!<BR><BR></FONT></P>

№-12
<center>
<script language="JavaScript">
<!-- Hide the script from old browsers --

function MakeArray(n){
this.length=n;
for(var i=1; i<=n; i++) this[i]=i-1;
return this
}

hex=new MakeArray(16);
hex[11]="A"; hex[12]="B"; hex[13]="C"; hex[14]="D"; hex[15]="E"; hex[16]="F";

function ToHex(x){
var high=x/16;
var s=high+"";
s=s.substring(0,2);
high=parseInt(s,10);
var left=hex[high+1];
var low=x-high*16;
s=low+"";
s=s.substring(0,2);
low=parseInt(s,10);
var right=hex[low+1];
var string=left+""+right;
return string;
}

function rainbow(text){
text=text.substring(3,text.length-4);
color_d1=255;
mul=color_d1/text.length;
for(i=0;i < text.length;i++){
color_d1=255*Math.sin(i/(text.length/3)); "255*Math.sin(i/(text.length/3))"
color_h1=ToHex(color_d1);
color_d2=mul*i;
color_h2=ToHex(color_d2);
document.write("<FONT COLOR='#FF"+color_h1+color_h2+"'>"+text.substring(i,i+1)+'</FONT>');
}
}

// --End Hiding Here -->
</script>

<SCRIPT>
<!--
{rainbow("--> Очень красивый текст!!!!!!<!--");}
//-->
</SCRIPT>
</center>

№-13
<script language="JavaScript1.2">
<!--
//Secify scroller contents
var line=new Array()
line[1]="Добро пожаловать на сайт Lady Dance!!!"
line[2]="Распологайтесь поудобнее.."
line[3]="Посетите все уголки сайта"
line[4]="Не забудте оставить отзыв в Гостевой книге"
line[5]="Приходите ещё, и приводите друзей"

//Specify font size for scoller
var ts_fontsize="16px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
document.write(' style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}

nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>

вот новички дофига вам текстов вы такое любите 😀

Отредактировано KillSkill - 02.07.2009
1989
Artur @KillSkill
Облако фоток (типа как облако сылок ток переделано

<script type="text/javascript" src="http://golo.do.am/swfobject.js"></script><div id="oblapics"><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРААНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРААНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a><a href="ССЫЛКА НА СТРАНИЦУ ФОТОАЛЬБОМА">ССЫЛКА НА ИЗОБРАЖЕНИЕ</a></div><script type="text/javascript"> var flashvars = {};flashvars.mode = 'images';eTagz = document.getElementById('oblapics').getElementsByTagName('A');flashvars.thumbcloud = '<images>';for (var i=0; eTagz[i]; ++i) flashvars.thumbcloud += '<image href=\'' + eTagz[i].getAttribute('href')+ '\' target=\'_self\'>'+ eTagz[i].innerHTML + '</image>';delete eTagz;flashvars.thumbcloud += '</images>';var params = {};params.wmode = 'transparent';params.bgcolor = '#FFFFFF';params.allowscriptaccess = 'always';var attributes = {};attributes.id = 'oblapics';attributes.name = 'thumbcloud';swfobject.embedSWF('http://golo.do.am/photowidget.swf', 'oblapics', '170', '170', '9.0.0', false, flashvars, params, attributes);</script>

Пример

1989
Artur @KillSkill
При наводки на ссылку воспроизводиться ваша музыка
Между <head>и </head>

<SCRIPT>
<!--//
function playHome() {
document.all.sound.src = "midi/7.mid"
//Адрес композиции
}
//-->
</SCRIPT>
<BGSOUND id="sound">

между <body> и </body>

<a href="Ваша ссылка" onmouseover="playHome()">Музыкальная ссылка</a>
<!-- адрес и текст ссылки -->

1989
Artur @KillSkill
Данный скрипт позволяет при наведении на ссылку увидеть какой-то эффект
Вот щас я вас научу как их посавить:
ставить в низ сайта можно перед

</BODY>
</HTML>


1 эффект
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/flames2.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


2ой эффект
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/9476822_l.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


3-ий эффект капающей крови
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/blood.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


4ый эффект шариков
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/9476822_l.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


5ый Эффект синего,желтого,зеленого,голубого снежка
зеленый

<style type="text/css">A:hover{background:url(http://www.layoutstar.com/images/myspacelayoutspy/glg/glitter/green.gif);}</style><br><a href="http://www.glitx.com/glitter_link_generator.php" target="_blank">glitter link generator</a><br>


голубого
<style type="text/css">A:hover{background:url(http://www.layoutstar.com/images/myspacelayoutspy/glg/glitter/aqua.gif);}</style>
<a href="http://www.glitx.com/glitter_link_generator.php" target="_blank">glitter link generator</a>



желтого
<style type="text/css">A:hover{background:url(http://www.layoutstar.com/images/myspacelayoutspy/glg/glitter/yellow.gif);}</style><br><a href="http://www.glitx.com/glitter_link_generator.php" target="_blank">glitter link generator</a><br>


6ой эффект молния
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/lightning.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


7ой эффект комета
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/comet.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


8ой эффект (стрелки)
<style type="text/css">A:hover{background:url(http://www.poqbum.com/animated_hover/images/redarrowline.gif);}</style><script type="text/javascript" src="http://prouserscs.moy.su/rtr/4-18"></script><br><a href="http://www.prouserscs.moy.su" target="_blank">ProUserS glitter link OWNER</a><br>


Вот и всьо (:

Отредактировано KillSkill - 10.08.2009
602
Женя @zhekaosincev
Скрытие раскрытие радио 🙁 на примере World Radio)
https://vmeste.eu/forum?tid=10739

<script type="text/javascript" src="http://worldradio.ru/includes/player.js"></script>
<small style="color: #FECB01;"><a href="http://worldradio.ru" target="_blank" class="simplink" style="color: #FECB01;">World Radio</a>: <span id="preplayer" style="background: #FECB01; color: #000; cursor: hand; cursor: pointer;" onclick="document.getElementById('player').style.display = 'inline'; document.getElementById('preplayer').style.display = 'none'; play(0); document.getElementById('radioff').style.display = 'inline';">включить?</span> <span style="display: none;" id="player"><a href="http://get.adobe.com/flashplayer/" target="_blank">Install Flash</a></span> <span id="radioff" style="display: none; background: #FECB01; color: #000; cursor: hand; cursor: pointer;" onclick="document.getElementById('player').innerHTML = ''; document.getElementById('player').style.display = 'none'; document.getElementById('preplayer').style.display = 'inline'; document.getElementById('radioff').style.display = 'none';">×</span></small>
</div></div>

Теперь разбераем:
<script type="text/javascript" src="http://worldradio.ru/includes/player.js"></script>
Скрипт проигрователя радио!

********** заменяем на свою ссылку! (Это главная страница сайта радио)
Ну и надписи соответственоо тоже!

458
ridz @ridz
для любителей снега содержимое фаила irc.html (тема перенесена)
<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<link rel=STYLESHEET type=text/css href=style.css>
</head>
<script>
/* Функция - перенаправитель команд */
function f(var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11,var12,var13,var14) {
parent.f(var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11,var12,var13,var14);
}
</script>
<body class=header-body onload="re=confirm('Извините, связь прервалась! Перезагрузить чат?'); if(re) parent.loadframes();">
<center><font size=4><b>Мы приветствуем Вас в нашем чате!</b></font></center><br>
<!--Этот фаил должен быть не больше 1кб, ниже будет загрузка сообщений-->
<script >
document.write('<input type="button" name="pysk" value="стоп/пуск" onclick="nnn=(nnn==1)? 0:1;if (nnn==1)fall();" />')
var nnn=1;

grphcs=new Array(2)
Image0=new Image();
Image0.src=grphcs[0]="http://fantasyflash.ru/script/web/image/sneg1.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://fantasyflash.ru/script/web/image/sneg1.gif";
Amount=25;
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];//osw
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*2+1;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*2+1;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i])+"px";
document.getElementById("si"+i).style.top=Ypos[i]+hscrll+"px";
}
else{
eval("document.all.si"+i).style.left=Xpos[i]+"px";
eval("document.all.si"+i).style.top=Ypos[i]+hscrll+"px";
}
Cstep[i]+=Step[i];
}
if (nnn==1) setTimeout('fall()',20);
}
fall();
</script>

Красным добавлена кнопка остановки/пуска скрипта

458
ridz @ridz
(тема перенесена)
ravshann пишет:

Прикольная функция!!!
<style>
#normal {POSITION: absolute; VISIBILITY: visible; left: 10px; top: 10px; Z-INDEX: 10000;}
#moving {POSITION: absolute; VISIBILITY: visible; left: 260px; top: 180px; width: 50px; Z-INDEX: 10030;}
</style>
</head>
<body>
<script LANGUAGE="JavaScript1.2">
<!--
var layerRef="null",layerStyleRef="null",styleSwitch="null";
// globale variablen fuers animieren
var dx = 1;
var dy = 1;
var maxgeschw = 99;
if (window.innerWidth) {
var x = (window.innerWidth / 2) - 23;
var y = (window.innerHeight / 2) - 15;
var maxx = window.innerWidth - 46;
var maxy= window.innerHeight - 30;
}
else {
var x = (640 / 2) - 23;
var y = (400 / 2) - 15;
var maxx = 640 - 46;
var maxy= 400 - 30;
}
function init(){
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
} else {
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}

}
function moveLayerTo(layerName,left,top){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
}
function animieren(){
moveLayerTo('moving',x,y);
if (Math.random() < .2) {
if (Math.random() < .5) {
if (Math.random() < .5) {
dx= Math.max(-maxgeschw,dx - 1);
} else {
dx= Math.min( maxgeschw,dx + 1);
}
} else {
if (Math.random() < .5) {
dy= Math.max(-maxgeschw,dy-1);
} else {
dy= Math.min( maxgeschw,dy+1);
}
}
}
x += dx;
y += dy;
x = Math.max(Math.min(maxx,x),0);
y = Math.max(Math.min(maxy,y),0);
if (x==0) {dx = 1}
if (y==0) {dy = 1}
if (x==maxx) {dx=-1}
if (y==maxy) {dy=-1}
setTimeout('animieren()',70);
}
// -->
</script>
<script LANGUAGE="JavaScript1.2">
<!--
if (navigator.userAgent.indexOf("MSIE 4.0; Mac") == -1 ) {
init();
document.writeln('<div id="moving">');
document.writeln('<img src="http://imgs.su/bigsmile2/130.gif">');
document.writeln('</div>');
animieren();
}
// -->
</script>
</body>

Смайл летает по сайту!!!

112
rаvshan @rаvshan
Скрипт До нового года осталось
<script LANGUAGE="javascript">
document.write('<span id="ny_date">До нового года</span>')
function ojidanieNG()
{
var today = new Date();

var BigDay = new Date("January 1, 2010");
var timeLeft = (BigDay.getTime() - today.getTime());

var e_daysLeft = timeLeft / 86400000;
var daysLeft = Math.floor(e_daysLeft);

var e_hrsLeft = (e_daysLeft - daysLeft)*24;
var hrsLeft = Math.floor(e_hrsLeft);

var e_minsLeft = (e_hrsLeft - hrsLeft)*60;
var minsLeft = Math.floor(e_minsLeft);

var seksLeft = Math.floor((e_minsLeft - minsLeft)*60);

if (BigDay.getTime() > today.getTime() )
document.getElementById("ny_date").innerHTML = ' до <font color=red><b>нового года осталось</b></font>: <b>'+daysLeft+'</b> дней, <b>'+hrsLeft+'</b> часов, <b>'+minsLeft+'</b> минут, <b>'+seksLeft+'</b> секунд !'
else
document.getElementById("ny_date").innerHTML = '<b>поздравляем с <font color=red>Новым 2010 годом</font> !!!</b>'
}
setInterval("ojidanieNG()", 50)
</SCRIPT>

3445
Андрей @VitrOn
Cнег падает, и образует сугробы внизу страницы:

<script src="http://livibetter.googlepages.com/snowstorm-nocollect.js" type="text/javascript"></script>

Мелкий белый снежок:

<script src="http://qepllg.bay.livefilestore.com/y1pxBz7qIgfLciAJXs7pL2JDRlbfYPy0h2AY4y2y7rjhA2XQNa1npWpRizyf
3HSPWyiUJeGINQ2BE8/snow9.js?download" type="text/javascript"/>

772
Kkkair @Kkkair
Большие снежинки:
// Indiquer l'URL de l'image du flocon :
var urlflocon="http://astuforum.free.fr/images/neige.gif"
// Ecrire le nombre de flocons :
var nombreflocons = 10;
// Indiquer si la neige doit disparaоtre aprиs x secondes (0=jamais) :
var cacherflocons = 0;
// Indiquer si la neige doit кtre vue sur la fenкtre ou toute la page avant de disparaоtre ("windowheight"=la fenкtre, "pageheight"=toute la page)
var voirflocons = "pageheight";

/////////// FIN DE LA PARTIE CONFIGURATION //////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function testIEcompatible(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // Variables de coordonnйes et de position
var am, stx, sty; // Variables d'amplitude
var i, doc_width = 1024, doc_height = 768; // Taille de l'йcran

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = testIEcompatible().clientWidth;
doc_height = testIEcompatible().clientHeight;
}

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

for (i = 0; i < nombreflocons; ++ i) {
dx[i] = 0; // Variables de coordonnйes
xp[i] = Math.random()*(doc_width-50); // Variables de position
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // Variables d'amplitude
stx[i] = 0.02 + Math.random()/10; // Variables de pas
sty[i] = 0.7 + Math.random(); // Variables de pas
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+urlflocon+"' border=\"0\"><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+urlflocon+"' border=\"0\"><\/div>");
}
}
}

function neigeIE_NS6() { // IE et NS6 : fonctions principales d'animation
doc_width = ns6up?window.innerWidth-10 : testIEcompatible().clientWidth-10;
doc_height=(window.innerHeight && voirflocons=="windowheight")? window.innerHeight : (ie4up && voirflocons=="windowheight")? testIEcompatible().clientHeight : (ie4up && !window.opera && voirflocons=="pageheight")? testIEcompatible().scrollHeight : testIEcompatible().offsetHeight;
for (i = 0; i < nombreflocons; ++ i) { // dйplacement pour chaque point ("dot")
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("neigeIE_NS6()", 10);
}

function cacherneige(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<nombreflocons; i++) document.getElementById("dot"+i).style.visibility="hidden"
}

if (ie4up||ns6up){
neigeIE_NS6();
if (cacherflocons>0)
setTimeout("cacherneige()", cacherflocons*1000)
}

Маленькие снежинки:
var snowmax = 30;
var snowcolor = new Array("#aaaacc", "#ddddFF", "#ccccDD");
var snowtype = new Array("Arial Black", "Arial Narrow", "Times", "Comic Sans MS");
var snowletter = "*";
var sinkspeed = 0.9;
var snowmaxsize = 30;
var snowminsize = 10;
var snowingzone = 1;
var snow = new Array();
var marginbottom;
var marginright;
var ScrollTop;
var timer;
var i_snow = 0;
var x_mv = new Array();
var crds = new Array();
var lftrght = new Array();
var browserinfos = navigator.userAgent;
var ie5 = document.all && document.getElementById && !browserinfos.match(/Opera/);
var ns6 = document.getElementById && !document.all;
var opera = browserinfos.match(/Opera/);
var browserok = ie5 || ns6 || opera;
function randommaker(a)
{
rand = Math.floor(a * Math.random());
return rand
}

function iecompattest()
{
return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body
}

function InitHeight() {
if (ie5 || opera) {
marginbottom = iecompattest().clientHeight + 5; //clientHeight;
marginright = iecompattest().scrollWidth + 5; //clientWidth
}
else {
if (ns6) {
marginbottom = self.innerHeight;
marginright = self.innerWidth
}
}
ScrollTop = document.body.scrollTop;
if (ScrollTop == 0) {
if (window.pageYOffset)
ScrollTop = window.pageYOffset;
else
ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
}
marginbottom += ScrollTop;
}

function initsnow()
{
InitHeight()
var a = snowmaxsize - snowminsize;
for (i = 0;i <= snowmax;i++)
{
crds[i] = 0;
lftrght[i] = Math.random() * 15;
x_mv[i] = 0.03 + Math.random() / 10;
snow[i] = document.getElementById("s" + i);
snow[i].style.fontFamily = snowtype[randommaker(snowtype.length)];
snow[i].size = randommaker(a) + snowminsize;
snow[i].style.fontSize = snow[i].size + "px";
snow[i].style.color = snowcolor[randommaker(snowcolor.length)];
snow[i].sink = sinkspeed * snow[i].size / 5;
if (snowingzone == 1) { snow[i].posx = randommaker(marginright - snow[i].size) }
if (snowingzone == 2) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) }
if (snowingzone == 3) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) + marginright / 4 }
if (snowingzone == 4) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) + marginright / 2 }
snow[i].posy = randommaker(2 * marginbottom - marginbottom - 2 * snow[i].size);
snow[i].style.left = snow[i].posx + "px";
snow[i].style.top = snow[i].posy + "px"
}
movesnow()
}

function movesnow()
{
InitHeight();
for (i = 0; i <= snowmax; i++)
{
crds[i] += x_mv[i];
snow[i].posy += snow[i].sink;
snow[i].style.left = snow[i].posx + lftrght[i] * Math.sin(crds[i]) + "px";
snow[i].style.top = snow[i].posy + "px";
if (snow[i].posy >= marginbottom - 2 * snow[i].size || parseInt(snow[i].style.left) > (marginright - 3 * lftrght[i]))
{
if (snowingzone == 1) { snow[i].posx = randommaker(marginright - snow[i].size) }
if (snowingzone == 2) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) }
if (snowingzone == 3) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) + marginright / 4 }
if (snowingzone == 4) { snow[i].posx = randommaker(marginright / 2 - snow[i].size) + marginright / 2 }
snow[i].posy = ScrollTop
}
}
var a = setTimeout("movesnow()", 60)
}
function hidesnow()
{
if (window.timer) { clearTimeout(timer) }
for (i = 0;i <= snowmax;i++)
{
document.getElementById("s" + i).style.visibility = "hidden"
}
}


for (i = 0;i <= snowmax;i++)
{
document.write('<div id="s' + i + '" style="POSITION: absolute; Z-INDEX: 9' + i + "; VISIBILITY: visible; TOP:-" + snowmaxsize + 'px; LEFT: 15px;">' + snowletter + "</div>")
}
if (browserok)
{ initsnow() }
else
{ document.write('Votre navigateur ne supporte pas ce Javascript, ') };

Средние снежинки:
// Indiquer l'URL de l'image du flocon :
var urlflocon="http://astuforum.free.fr/images/neige-mini.gif"
// Ecrire le nombre de flocons :
var nombreflocons = 10;
// Indiquer si la neige doit disparaоtre aprиs x secondes (0=jamais) :
var cacherflocons = 0;
// Indiquer si la neige doit кtre vue sur la fenкtre ou toute la page avant de disparaоtre ("windowheight"=la fenкtre, "pageheight"=toute la page)
var voirflocons = "pageheight";

/////////// FIN DE LA PARTIE CONFIGURATION //////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function testIEcompatible(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // Variables de coordonnйes et de position
var am, stx, sty; // Variables d'amplitude
var i, doc_width = 1024, doc_height = 768; // Taille de l'йcran

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = testIEcompatible().clientWidth;
doc_height = testIEcompatible().clientHeight;
}

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

for (i = 0; i < nombreflocons; ++ i) {
dx[i] = 0; // Variables de coordonnйes
xp[i] = Math.random()*(doc_width-50); // Variables de position
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // Variables d'amplitude
stx[i] = 0.02 + Math.random()/10; // Variables de pas
sty[i] = 0.7 + Math.random(); // Variables de pas
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+urlflocon+"' border=\"0\"><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+urlflocon+"' border=\"0\"><\/div>");
}
}
}

function neigeIE_NS6() { // IE et NS6 : fonctions principales d'animation
doc_width = ns6up?window.innerWidth-10 : testIEcompatible().clientWidth-10;
doc_height=(window.innerHeight && voirflocons=="windowheight")? window.innerHeight : (ie4up && voirflocons=="windowheight")? testIEcompatible().clientHeight : (ie4up && !window.opera && voirflocons=="pageheight")? testIEcompatible().scrollHeight : testIEcompatible().offsetHeight;
for (i = 0; i < nombreflocons; ++ i) { // dйplacement pour chaque point ("dot")
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("neigeIE_NS6()", 10);
}

function cacherneige(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<nombreflocons; i++) document.getElementById("dot"+i).style.visibility="hidden"
}

if (ie4up||ns6up){
neigeIE_NS6();
if (cacherflocons>0)
setTimeout("cacherneige()", cacherflocons*1000)
}

Очень маленькие снежинки сдуваются ветром:
if ((document.getElementById) &&
window.addEventListener || window.attachEvent){

(function(){

//Configure here.

var num = 50; //Number of flakes
var timer = 30; //setTimeout speed. Varies on different comps
var enableinNS6 = 1 //Enable script in NS6/Mozilla? Snow animation could be slow in those browsers. (1=yes, 0=no).

//End.

var y = [];
var x = [];
var fall = [];
var theFlakes = [];
var sfs = [];
var step = [];
var currStep = [];
var h,w,r;
var d = document;
var pix = "px";
var domWw = (typeof window.innerWidth == "number");
var domSy = (typeof window.pageYOffset == "number");
var idx = d.getElementsByTagName('div').length;

if (d.documentElement.style &&
typeof d.documentElement.style.MozOpacity == "string")
num = 12;

for (i = 0; i < num; i++){
sfs[i] = Math.round(1 + Math.random() * 1);

document.write('<div id="flake'+(idx+i)+'" style="position:absolute;top:0px;left:0px;width:'
+sfs[i]+'px;height:'+sfs[i]+'px;background-color:#ffffff;font-size:'+sfs[i]+'px"><\/div>');

currStep[i] = 0;
fall[i] = (sfs[i] == 1)?
Math.round(2 + Math.random() * 2): Math.round(3 + Math.random() * 2);
step[i] = (sfs[i] == 1)?
0.05 + Math.random() * 0.1 : 0.05 + Math.random() * 0.05 ;
}


if (domWw) r = window;
else{
if (d.documentElement &&
typeof d.documentElement.clientWidth == "number" &&
d.documentElement.clientWidth != 0)
r = d.documentElement;
else{
if (d.body &&
typeof d.body.clientWidth == "number")
r = d.body;
}
}


function winsize(){
var oh,sy,ow,sx,rh,rw;
if (domWw){
if (d.documentElement && d.defaultView &&
typeof d.defaultView.scrollMaxY == "number"){
oh = d.documentElement.offsetHeight;
sy = d.defaultView.scrollMaxY;
ow = d.documentElement.offsetWidth;
sx = d.defaultView.scrollMaxX;
rh = oh-sy;
rw = ow-sx;
}
else{
rh = r.innerHeight;
rw = r.innerWidth;
}
h = rh - 2;
w = rw - 2;
}
else{
h = r.clientHeight - 2;
w = r.clientWidth - 2;
}
}


function scrl(yx){
var y,x;
if (domSy){
y = r.pageYOffset;
x = r.pageXOffset;
}
else{
y = r.scrollTop;
x = r.scrollLeft;
}
return (yx == 0)?y:x;
}


function snow(){
var dy,dx;

for (i = 0; i < num; i++){
dy = fall[i];
dx = fall[i] * Math.cos(currStep[i]);

y[i]+=dy;
x[i]+=dx;

if (x[i] >= w || y[i] >= h){
y[i] = -10;
x[i] = Math.round(Math.random() * w);
fall[i] = (sfs[i] == 1)?
Math.round(2 + Math.random() * 2): Math.round(3 + Math.random() * 2);
step[i] = (sfs[i] == 1)?
0.05 + Math.random() * 0.1 : 0.05 + Math.random() * 0.05 ;
}

theFlakes[i].top = y[i] + scrl(0) + pix;
theFlakes[i].left = x[i] + scrl(1) + pix;

currStep[i]+=step[i];
}
setTimeout(snow,timer);
}


function init(){
winsize();
for (i = 0; i < num; i++){
theFlakes[i] = document.getElementById("flake"+(idx+i)).style;
y[i] = Math.round(Math.random()*h);
x[i] = Math.round(Math.random()*w);
}
snow();
}


if (window.addEventListener){
window.addEventListener("resize",winsize,false);
window.addEventListener("load",init,false);
}
else if (window.attachEvent){
window.attachEvent("onresize",winsize);
window.attachEvent("onload",init);
}

})();
}//End.

Маленькие снежинки:
var snowStorm=null;function SnowStorm(){var imagePath='http://s.wordpress.com/wp-content/plugins/snow/images/';var flakesMax=60;var flakesMaxActive=60;var vMaxX=2.5;var vMaxY=2.5;var usePNG=false;var flakeBottom=null;var snowStick=false;var snowCollect=false;var targetElement=null;var followMouse=true;var flakeTypes=6;var flakeWidth=5;var flakeHeight=5;var zIndex=0;var flakeLeftOffset=0;var flakeRightOffset=0;var addEvent=function(o,evtName,evtHandler){typeof(attachEvent)=='undefined'?o.addEventListener(evtName,evtHandler,false):o.attachEvent('on'+evtName,evtHandler);}
var removeEvent=function(o,evtName,evtHandler){typeof(attachEvent)=='undefined'?o.removeEventListener(evtName,evtHandler,false):o.detachEvent('on'+evtName,evtHandler);}
var classContains=function(o,cStr){return(typeof(o.className)!='undefined'?o.className.indexOf(cStr)+1:false);}
var s=this;var storm=this;this.timers=[];this.flakes=[];this.disabled=false;this.terrain=[];this.active=false;var isIE=navigator.userAgent.match(/msie/i);var isIE6=navigator.userAgent.match(/msie 6/i);var isOldIE=(isIE&&(isIE6||navigator.userAgent.match(/msie 5/i)));var isWin9X=navigator.appVersion.match(/windows 98/i);var isiPhone=navigator.userAgent.match(/iphone/i);var isOpera=navigator.userAgent.match(/opera/i);if(isOpera)isIE=false;var screenX=null;var screenX2=null;var screenY=null;var scrollY=null;var vRndX=null;var vRndY=null;var windOffset=1;var windMultiplier=2;var pngSupported=(!isIE||(isIE&&!isIE6&&!isOldIE));var docFrag=document.createDocumentFragment();this.oControl=null;if(flakeLeftOffset==null)flakeLeftOffset=0;if(flakeRightOffset==null)flakeRightOffset=0;function rnd(n,min){if(isNaN(min))min=0;return(Math.random()*n)+min;}
this.randomizeWind=function(){vRndX=plusMinus(rnd(vMaxX,0.2));vRndY=rnd(vMaxY,0.2);if(this.flakes){for(var i=0;i<this.flakes.length;i++){if(this.flakes[i].active)this.flakes[i].setVelocities();}}}
function plusMinus(n){return(parseInt(rnd(2))==1?n*-1:n);}
this.scrollHandler=function(){scrollY=(flakeBottom?0:parseInt(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop));if(isNaN(scrollY))scrollY=0;if(!flakeBottom&&s.flakes){for(var i=0;i<s.flakes.length;i++){if(s.flakes[i].active==0)s.flakes[i].stick();}}}
this.resizeHandler=function(){if(window.innerWidth||window.innerHeight){screenX=window.innerWidth-(!isIE?16:2)-flakeRightOffset;screenY=(flakeBottom?flakeBottom:window.innerHeight);}else{screenX=(document.documentElement.clientWidth||document.body.clientWidth||document.body.scrollWidth)-(!isIE?8:0)-flakeRightOffset;screenY=flakeBottom?flakeBottom 🙁 document.documentElement.clientHeight||document.body.clientHeight||document.body.scrollHeight);}
screenX2=parseInt(screenX/2);}
this.resizeHandlerAlt=function(){screenX=targetElement.offsetLeft+targetElement.offsetWidth-flakeRightOffset;screenY=flakeBottom?flakeBottom:targetElement.offsetTop+targetElement.offsetHeight;screenX2=parseInt(screenX/2);}
this.freeze=function(){if(!s.disabled){s.disabled=1;}else{return false;}
for(var i=0;i<s.timers.length;i++){clearInterval(s.timers[i]);}}
this.resume=function(){if(s.disabled){s.disabled=0;}else{return false;}
s.timerInit();}
this.toggleSnow=function(){if(!s.flakes.length){s.start();s.setControlActive(true);}else{s.active=!s.active;if(s.active){s.show();s.resume();s.setControlActive(true);}else{s.stop();s.freeze();s.setControlActive(false);}}}
this.setControlActive=function(bActive){}
this.stop=function(){this.freeze();for(var i=this.flakes.length;i--;){this.flakes[i].o.style.display='none';}
removeEvent(window,'scroll',s.scrollHandler);removeEvent(window,'resize',s.resizeHandler);if(!isIE){removeEvent(window,'blur',s.freeze);removeEvent(window,'focus',s.resume);}
}
this.show=function(){for(var i=this.flakes.length;i--;){this.flakes[i].o.style.display='block';}}
this.SnowFlake=function(parent,type,x,y){var s=this;var storm=parent;this.type=type;this.x=x||parseInt(rnd(screenX-20));this.y=(!isNaN(y)?y:-rnd(screenY)-12);this.vX=null;this.vY=null;this.vAmpTypes=[2.0,1.0,1.25,1.0,1.5,1.75];this.vAmp=this.vAmpTypes[this.type];this.active=1;this.o=document.createElement('img');this.o.style.position='absolute';this.o.style.width=flakeWidth+'px';this.o.style.height=flakeHeight+'px';this.o.style.fontSize='1px';this.o.style.zIndex=zIndex;this.o.src=imagePath+this.type+(pngSupported&&usePNG?'.png':'.gif');docFrag.appendChild(this.o);this.refresh=function(){s.o.style.left=s.x+'px';s.o.style.top=s.y+'px';}
this.stick=function(){if(isIE6||isiPhone||(targetElement!=document.documentElement&&targetElement!=document.body)){s.o.style.top=(screenY+scrollY-flakeHeight-storm.terrain[Math.floor(s.x)])+'px';}else{s.o.style.display='none';s.o.style.top='auto';s.o.style.bottom='0px';s.o.style.position='fixed';s.o.style.display='block';}}
this.vCheck=function(){if(s.vX>=0&&s.vX<0.2){s.vX=0.2;}else if(s.vX<0&&s.vX>-0.2){s.vX=-0.2;}
if(s.vY>=0&&s.vY<0.2){s.vY=0.2;}}
this.move=function(){s.x+=s.vX*windOffset;s.y+=(s.vY*s.vAmp);s.refresh();if(s.vX&&screenX-s.x<flakeWidth+(s.vX*windOffset)){s.x=0;}else if((s.vX<0||windOffset<0)&&s.x-flakeLeftOffset<0-flakeWidth){s.x=screenX-flakeWidth;}
var yDiff=screenY+scrollY-s.y-storm.terrain[Math.floor(s.x)];if(yDiff<flakeHeight){s.active=0;if(snowCollect&&snowStick){var height=[0.75,1.5,0.75];for(var i=0;i<2;i++){storm.terrain[Math.floor(s.x)+i+2]+=height[i];}}
s.o.style.left=(s.x/screenX*100)+'%';if(!flakeBottom){if(snowStick){s.stick();}else{s.recycle();}}}}
this.animate=function(){s.move();}
this.setVelocities=function(){s.vX=vRndX+rnd(vMaxX*0.12,0.1);s.vY=vRndY+rnd(vMaxY*0.12,0.1);}
this.recycle=function(){s.o.style.display='none';s.o.style.position='absolute';s.o.style.bottom='auto';s.setVelocities();s.vCheck();s.x=parseInt(rnd(screenX-flakeWidth-20));s.y=parseInt(rnd(screenY)*-1)-flakeHeight;s.o.style.left=s.x+'px';s.o.style.top=s.y+'px';s.o.style.display='block';s.active=1;}
this.recycle();this.refresh();}
this.snow=function(){var active=0;var used=0;var waiting=0;for(var i=s.flakes.length;i--;){if(s.flakes[i].active==1){s.flakes[i].move();active++;}else if(s.flakes[i].active==0){used++;}else{waiting++;}}
if(snowCollect&&!waiting){s.createSnow(flakesMaxActive,true);}
if(active<flakesMaxActive){with(s.flakes[parseInt(rnd(s.flakes.length))]){if(!snowCollect&&active==0){recycle();}else if(active==-1){active=1;}}}}
this.mouseMove=function(e){if(!followMouse)return true;var x=parseInt(e.clientX);if(x<screenX2){windOffset=-windMultiplier+(x/screenX2*windMultiplier);}else{x-=screenX2;windOffset=(x/screenX2)*windMultiplier;}}
this.createSnow=function(limit,allowInactive){for(var i=0;i<limit;i++){s.flakes[s.flakes.length]=new s.SnowFlake(s,parseInt(rnd(flakeTypes)));if(allowInactive||i>flakesMaxActive)s.flakes[s.flakes.length-1].active=-1;}
targetElement.appendChild(docFrag);}
this.timerInit=function(){s.timers=(!isWin9X?[setInterval(s.snow,20)]:[setInterval(s.snow,75),setInterval(s.snow,25)]);}
this.init=function(){for(var i=0;i<2048;i++){s.terrain[i]=0;}
s.randomizeWind();s.createSnow(snowCollect?flakesMaxActive:flakesMaxActive*2);addEvent(window,'resize',s.resizeHandler);addEvent(window,'scroll',s.scrollHandler);if(!isIE){addEvent(window,'blur',s.freeze);addEvent(window,'focus',s.resume);}
s.resizeHandler();s.scrollHandler();if(followMouse){addEvent(document,'mousemove',s.mouseMove);}
s.timerInit();}
var didInit=false;this.start=function(bFromOnLoad){if(!didInit){didInit=true;}else if(bFromOnLoad){return true;}
if(typeof targetElement=='string'){targetElement=document.getElementById(targetElement);if(!targetElement)throw new Error('Snowstorm: Unable to get targetElement');}
if(!targetElement){targetElement=(!isIE?(document.documentElement?document.documentElement:document.body):document.body);}
if(targetElement!=document.documentElement&&targetElement!=document.body)s.resizeHandler=s.resizeHandlerAlt;s.resizeHandler();if(screenX&&screenY&&!s.disabled){s.init();s.active=true;}}
if(document.addEventListener){document.addEventListener('DOMContentLoaded',function(){s.start(true)},false);window.addEventListener('load',function(){s.start(true)},false);}else{addEvent(window,'load',function(){s.start(true)});}}
snowStorm=new SnowStorm();

Белые, пушистые снежинки:
grphcs=new Array(1)
Image0=new Image();
Image0.src=grphcs[0]="http://i16.tinypic.com/6xi350j.gif";

Amount=5; // Nombre d'images - йviter de surcharger !
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;

if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+1;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+1;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]) + "px";
document.getElementById("si"+i).style.top=Ypos[i]+hscrll + "px";}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}

window.onload=fall

Красно-синие снежинки (цвета меняются во время падения):
grphcs=new Array(1)
Image0=new Image();
Image0.src=grphcs[0]="http://i2.tinypic.com/8bxw0li.gif";

Amount=4; // Nombre d'images - йviter de surcharger !
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;

if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+1;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+1;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}

window.onload=fall

Смесь цветных снежинок:
grphcs=new Array(6) //indiquez le nombre d'images diffйrentes
Image0=new Image();
Image0.src=grphcs[0]="http://i3.tinypic.com/85cqryx.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://i10.tinypic.com/8bxw0li.gif";
Image2=new Image();
Image2.src=grphcs[2]="http://i10.tinypic.com/8185e9v.gif";
Image3=new Image();
Image3.src=grphcs[3]="http://i1.tinypic.com/6ss048h.gif";
Image4=new Image();
Image4.src=grphcs[4]="http://i16.tinypic.com/6q0o1o5.gif";
Image5=new Image();
Image5.src=grphcs[5]="http://i11.tinypic.com/6lj6q2t.gif";

Amount=12; //Nombre d'images - йviter de surcharger.
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+1;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+1;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}
window.onload=fall

Большие белые снежинки:
grphcs=new Array(1)
Image0=new Image();
Image0.src=grphcs[0]="http://i12.tinypic.com/6uqsnsp.gif";

Amount=6; // Nombre d'images - йviter de surcharger !
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;

if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+1;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+1;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}

window.onload=fall

Большие голубые снежинки:
<script type="text/javascript">

/******************************************
* Snow Effect script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/

var snowsrc="http://i71.servimg.com/u/f71/12/41/10/67/snow10.gif"
var no = 10;
var hidesnowtime = 0;
var snowdistance = "windowheight";

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest()
{
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;

if (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)
{
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
if (ie4up||ns6up)
{
if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
}
else
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}

function snowIE_NS6()
{
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i)
{
yp[i] += sty[i];
if (yp[i] > doc_height-50)
{
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}

function hidesnow()
{
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up)
{
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}

</script>

Живые снежинки:
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var no = 25; //
var speed = 12; //
var snowflake = "http://img164.imageshackus/img164/1442/star71yx.gif";

var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
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();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" 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(snowflake + "\" 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(snowflake + "\" border=\"0\"></div>");
}
}
}
function snowNS() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>

772
Kkkair @Kkkair
Гирлянда с подарками (флеш):
function SWFLayer(){

this.swf_url = "";
this.swf_id = "Flash";
this.layer_name = "";
this.xx = 0;//window
this.yy = 0;//window
this.width = 1;
this.height = 1;
this.zIndex = 0;
this.body = document['CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];
this._oLayer = "";

this.flashvars_labels = [];
this.flashvars_values = [];

this._ww_full_flg = "false";
this._hh_full_flg = "false";
}

//----------------------------
// SWF
//----------------------------
SWFLayer.prototype._createFlashVarsValue = function(){
var value = "browser=" + this._checkBrowser() + "&";
var flashvars_labels = this.flashvars_labels;
var flashvars_values = this.flashvars_values;
for(var i=0; i < flashvars_labels.length; i++){
value += flashvars_labels[i] + "=" + flashvars_values[i] + "&";
}
value = value.substring(0,value.length - 1);
return value;
};


SWFLayer.prototype.create = function(){
var swf_url = this.swf_url;
var swf_id = this.swf_id;
var layer_name = this.layer_name;

var html = "";
html += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='100%' height='100%' id='"+swf_id+"' align='middle'>";
html += "<param name='allowScriptAccess' value='always' />";

if(this.flashvars_labels.length > 0){
html += "<param name='flashvars' value='" + this._createFlashVarsValue() + "'>";
}

html += "<param name='movie' value='" + swf_url + "' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='" + swf_url + "' quality='high' scale='noscale' salign='lt' wmode='transparent' width='100%' height='100%' name='"+swf_id+"' id='"+swf_id+"' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'";
if(this.flashvars_labels.length > 0){
html += " flashvars='" + this._createFlashVarsValue() + "'";
}
html += "/>";
html += "</object>";

var oLayer = document.createElement('div');
oLayer.setAttribute('id',layer_name);
//oLayer.style.background = "#FF0000";
oLayer.innerHTML = html;
oLayer.style.position = 'absolute';
oLayer.style.zIndex = this.zIndex;
document.body.appendChild(oLayer);
this._oLayer = oLayer;

};

//
//
//----------------------------
SWFLayer.prototype._checkBrowser = function(){
var uName = navigator.userAgent;
if (uName.indexOf("Safari") > -1) return "Safari";
if (uName.indexOf("MSIE") > -1){
return "MSIE";
}
return "Netscape";
};

//---------------------------------------------------------------
//
//---------------------------------------------------------------
SWFLayer.prototype.setSize = function(ww,hh){
var browser = this._checkBrowser();
//
if(ww == 'full'){
this._ww_full_flg = "true";
if(browser == "MSIE"){
this.width = this.body.clientWidth;
}else if(browser == "Netscape"){
this.width = window.innerWidth - 17;
}else{
this.width = window.innerWidth;
}
}else{
this._ww_full_flg = "false";
this.width = ww;
}

//щлШуБХ
if(hh == 'full'){
this._hh_full_flg = "true";
if(browser == "MSIE"){
this.height = this.body.clientHeight;
}else if(browser == "Netscape"){
this.height = window.innerHeight-17;
}else{
this.height = window.innerHeight;
}
}else{
this._hh_full_flg = "false";
this.height = hh;
}
this._oLayer.style.width = this.width + 'px';
this._oLayer.style.height = this.height + 'px';
};


//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setPos = function(xx,yy){
var browser = this._checkBrowser();

this.xx = xx;
this.yy = yy;

//Xх║зциЩ
if(browser == "MSIE"){
this._oLayer.style.left = this.xx + this.body.scrollLeft + 'px';
this._oLayer.style.top = this.yy + this.body.scrollTop + 'px';
}else {
this._oLayer.style.left = this.xx + pageXOffset + 'px';
this._oLayer.style.top = this.yy + pageYOffset + 'px';
}

};

//
//
//--------------------------------------------------------------------
SWFLayer.prototype.setPosFixed = function(xx,yy){

this.xx = xx;
this.yy = yy;

//
this._oLayer.style.left = this.xx + 'px';
this._oLayer.style.top = this.yy + 'px';

};

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

SWFLayer.prototype.setdPos = function(d_xx,d_yy){

this.xx += d_xx;
this.yy += d_yy;

this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
// str='left' or 'right'
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowAlign = function(str){
var browser = this._checkBrowser() ;
if(str == 'right'){
if(browser == "MSIE"){
this.xx = this.body.clientWidth - this.width;
}else {
this.xx = window.innerWidth - this.width;
//Mozilla
if(browser == "Netscape"){
this.xx -= 17;
}
}
}else{
if(browser == "MSIE"){
this.xx = 0;
}else {
this.xx = 0;
}
}


this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowAlignFixed = function(str){
//alert("aaa");
var browser = this._checkBrowser() ;
if(str == 'right'){
if(browser == "MSIE"){
this.xx = this.body.clientWidth - this.width + this.body.scrollLeft;
}else {
this.xx = window.innerWidth - this.width + pageXOffset;
//Mozilla
if(browser == "Netscape"){
this.xx -= 17;
}
}
}else{
if(browser == "MSIE"){
this.xx = 0;
}else {
this.xx = 0;
}
}


this.setPosFixed(this.xx,this.yy);
};

//--------------------------------------------------------------------
//str='top' or 'bottom'
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowValign = function(str){
//
var browser = this._checkBrowser();
if(str == 'bottom'){
if(browser == "MSIE"){
this.yy = this.body.clientHeight - this.height;
}else {
this.yy = window.innerHeight - this.height;
//Mozilla
if(browser == "Netscape"){
this.yy -= 17;
}
}
}else{
if(browser == "MSIE"){
this.yy = 0;
}else {
this.yy = 0;
}
}
this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowValignFixed = function(str){
//
var browser = this._checkBrowser();
if(str == 'bottom'){
if(browser == "MSIE"){
//alert(this.body.scrollHeight);
this.yy = this.body.scrollHeight - this.height;
}else {
this.yy = this.body.offsetHeight - this.height;
//this.yy = window.innerHeight - this.height;
//Mozilla
if(browser == "Netscape"){
this.yy -= 17;
}
}
}else{
if(browser == "MSIE"){
this.yy = 0;
}else {
this.yy = 0;
}
}
this.setPosFixed(this.xx,this.yy);
};

//--------------------------------------------------------------------
//(str = 'visible' or 'hidden')
//--------------------------------------------------------------------
SWFLayer.prototype.setVisible = function(str){
this._oLayer.style.visibility = str;
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.correctWindowSize = function(str){
if(this._ww_full_flg == "true" && this._hh_full_flg == "true"){
this.setSize("full","full");
}
else if(this._ww_full_flg == "true"){
//alert("_ww_full_flg = true");
this.setSize("full",this.height);
}
else if(this._hh_full_flg == "true"){
//alert("_hh_full_flg = true");
this.setSize(this.width,"full");
}
};


//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
function eventObserve(obj,e, func, bool){
if (obj.addEventListener){
obj.addEventListener(e, func, bool)
}else if (obj.attachEvent){
obj.attachEvent("on" + e, func)
}
}


var noel_deco = "";
var noel_deco_flashvars_labels = ["myUrl"];
var noel_deco_flashvars_values = [location.host];//location.hostname
var noel_deco_zIndex = 1;

//--------------------------------------------------------------------
//load
//--------------------------------------------------------------------
function loadnoeldeco(data){
noel_deco = new SWFLayer();
noel_deco.zIndex = noel_deco_zIndex;
noel_deco.swf_url = "http://sd-1.archive-host.com/membres/up/28346071248525984/guirlande.swf";
noel_deco.swf_id = "noel_deco_swf";
noel_deco.layer_name = "noel_deco";

noel_deco.flashvars_labels = noel_deco_flashvars_labels;
noel_deco.flashvars_values = noel_deco_flashvars_values;

noel_deco.create();
noel_deco.setSize(100,300);//win
noel_deco.setWindowAlignFixed('left');
noel_deco.setWindowValignFixed('top');
if(checkBrowser() == "Safari"){
window.resizeBy(1,0);
}
}

eventObserve(window, 'load', loadnoeldeco, false);

//--------------------------------------------------------------------
//scroll
//--------------------------------------------------------------------
function scrollnoeldeco(){
noel_deco.setWindowAlignFixed('left');

}
//
eventObserve(window, 'scroll', scrollnoeldeco, false);


//--------------------------------------------------------------------
//resize
//--------------------------------------------------------------------
function resizenoeldeco(){
noel_deco.setWindowAlignFixed('left');

}
//window.resize
eventObserve(window, 'resize', resizenoeldeco, false);

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
//
document.getElementsByTagName("html")[0].style.overflow="scroll";

function hidenoel_deco(){
noel_deco.setVisible("hidden");
}

function setClose(){
noel_deco.setSize(0,0);
}

function checkBrowser(){
var uName = navigator.userAgent;
if (uName.indexOf("Safari") > -1) return "Safari";
if (uName.indexOf("MSIE") > -1){
return "MSIE";
}
return "Netscape";
};

Еловые ветви с шишками (флеш):
function SWFLayer(){

this.swf_url = "";
this.swf_id = "Flash";
this.layer_name = "";
this.xx = 0;//window
this.yy = 0;//window
this.width = 1;
this.height = 1;
this.zIndex = 0;
this.body = document['CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];
this._oLayer = "";

this.flashvars_labels = [];
this.flashvars_values = [];

this._ww_full_flg = "false";
this._hh_full_flg = "false";
}

//----------------------------
// SWF
//----------------------------
SWFLayer.prototype._createFlashVarsValue = function(){
var value = "browser=" + this._checkBrowser() + "&";
var flashvars_labels = this.flashvars_labels;
var flashvars_values = this.flashvars_values;
for(var i=0; i < flashvars_labels.length; i++){
value += flashvars_labels[i] + "=" + flashvars_values[i] + "&";
}
value = value.substring(0,value.length - 1);
return value;
};


SWFLayer.prototype.create = function(){
var swf_url = this.swf_url;
var swf_id = this.swf_id;
var layer_name = this.layer_name;

var html = "";
html += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='100%' height='100%' id='"+swf_id+"' align='middle'>";
html += "<param name='allowScriptAccess' value='always' />";

if(this.flashvars_labels.length > 0){
html += "<param name='flashvars' value='" + this._createFlashVarsValue() + "'>";
}

html += "<param name='movie' value='" + swf_url + "' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='" + swf_url + "' quality='high' scale='noscale' salign='lt' wmode='transparent' width='100%' height='100%' name='"+swf_id+"' id='"+swf_id+"' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'";
if(this.flashvars_labels.length > 0){
html += " flashvars='" + this._createFlashVarsValue() + "'";
}
html += "/>";
html += "</object>";

var oLayer = document.createElement('div');
oLayer.setAttribute('id',layer_name);
//oLayer.style.background = "#FF0000";
oLayer.innerHTML = html;
oLayer.style.position = 'absolute';
oLayer.style.zIndex = this.zIndex;
document.body.appendChild(oLayer);
this._oLayer = oLayer;

};

//
//
//----------------------------
SWFLayer.prototype._checkBrowser = function(){
var uName = navigator.userAgent;
if (uName.indexOf("Safari") > -1) return "Safari";
if (uName.indexOf("MSIE") > -1){
return "MSIE";
}
return "Netscape";
};

//---------------------------------------------------------------
//
//---------------------------------------------------------------
SWFLayer.prototype.setSize = function(ww,hh){
var browser = this._checkBrowser();
//
if(ww == 'full'){
this._ww_full_flg = "true";
if(browser == "MSIE"){
this.width = this.body.clientWidth;
}else if(browser == "Netscape"){
this.width = window.innerWidth - 17;
}else{
this.width = window.innerWidth;
}
}else{
this._ww_full_flg = "false";
this.width = ww;
}

//щлШуБХ
if(hh == 'full'){
this._hh_full_flg = "true";
if(browser == "MSIE"){
this.height = this.body.clientHeight;
}else if(browser == "Netscape"){
this.height = window.innerHeight-17;
}else{
this.height = window.innerHeight;
}
}else{
this._hh_full_flg = "false";
this.height = hh;
}
this._oLayer.style.width = this.width + 'px';
this._oLayer.style.height = this.height + 'px';
};


//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setPos = function(xx,yy){
var browser = this._checkBrowser();

this.xx = xx;
this.yy = yy;

//Xх║зциЩ
if(browser == "MSIE"){
this._oLayer.style.left = this.xx + this.body.scrollLeft + 'px';
this._oLayer.style.top = this.yy + this.body.scrollTop + 'px';
}else {
this._oLayer.style.left = this.xx + pageXOffset + 'px';
this._oLayer.style.top = this.yy + pageYOffset + 'px';
}

};

//
//
//--------------------------------------------------------------------
SWFLayer.prototype.setPosFixed = function(xx,yy){

this.xx = xx;
this.yy = yy;

//Xх║зциЩ
this._oLayer.style.left = this.xx + 'px';
this._oLayer.style.top = this.yy + 'px';

};

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

SWFLayer.prototype.setdPos = function(d_xx,d_yy){

this.xx += d_xx;
this.yy += d_yy;

this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
// str='left' or 'right'
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowAlign = function(str){
var browser = this._checkBrowser() ;
if(str == 'right'){
if(browser == "MSIE"){
this.xx = this.body.clientWidth - this.width;
}else {
this.xx = window.innerWidth - this.width;
//Mozilla
if(browser == "Netscape"){
this.xx -= 17;
}
}
}else{
if(browser == "MSIE"){
this.xx = 0;
}else {
this.xx = 0;
}
}


this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowAlignFixed = function(str){
//alert("aaa");
var browser = this._checkBrowser() ;
if(str == 'right'){
if(browser == "MSIE"){
this.xx = this.body.clientWidth - this.width + this.body.scrollLeft;
}else {
this.xx = window.innerWidth - this.width + pageXOffset;
//Mozilla
if(browser == "Netscape"){
this.xx -= 17;
}
}
}else{
if(browser == "MSIE"){
this.xx = 0;
}else {
this.xx = 0;
}
}


this.setPosFixed(this.xx,this.yy);
};

//--------------------------------------------------------------------
//str='top' or 'bottom'
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowValign = function(str){
//
var browser = this._checkBrowser();
if(str == 'bottom'){
if(browser == "MSIE"){
this.yy = this.body.clientHeight - this.height;
}else {
this.yy = window.innerHeight - this.height;
//Mozilla
if(browser == "Netscape"){
this.yy -= 17;
}
}
}else{
if(browser == "MSIE"){
this.yy = 0;
}else {
this.yy = 0;
}
}
this.setPos(this.xx,this.yy);
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.setWindowValignFixed = function(str){
//
var browser = this._checkBrowser();
if(str == 'bottom'){
if(browser == "MSIE"){
//alert(this.body.scrollHeight);
this.yy = this.body.scrollHeight - this.height;
}else {
this.yy = this.body.offsetHeight - this.height;
//this.yy = window.innerHeight - this.height;
//Mozilla
if(browser == "Netscape"){
this.yy -= 17;
}
}
}else{
if(browser == "MSIE"){
this.yy = 0;
}else {
this.yy = 0;
}
}
this.setPosFixed(this.xx,this.yy);
};

//--------------------------------------------------------------------
//(str = 'visible' or 'hidden')
//--------------------------------------------------------------------
SWFLayer.prototype.setVisible = function(str){
this._oLayer.style.visibility = str;
};

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
SWFLayer.prototype.correctWindowSize = function(str){
if(this._ww_full_flg == "true" && this._hh_full_flg == "true"){
this.setSize("full","full");
}
else if(this._ww_full_flg == "true"){
//alert("_ww_full_flg = true");
this.setSize("full",this.height);
}
else if(this._hh_full_flg == "true"){
//alert("_hh_full_flg = true");
this.setSize(this.width,"full");
}
};


//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
function eventObserve(obj,e, func, bool){
if (obj.addEventListener){
obj.addEventListener(e, func, bool)
}else if (obj.attachEvent){
obj.attachEvent("on" + e, func)
}
}


var noel_deco = "";
var noel_deco_flashvars_labels = ["myUrl"];
var noel_deco_flashvars_values = [location.host];//location.hostname
var noel_deco_zIndex = 1;

//--------------------------------------------------------------------
//load
//--------------------------------------------------------------------
function loadnoeldeco(data){
noel_deco = new SWFLayer();
noel_deco.zIndex = noel_deco_zIndex;
noel_deco.swf_url = "http://sd-1.archive-host.com/membres/up/28346071248525984/sapingauche.swf";
noel_deco.swf_id = "noel_deco_swf";
noel_deco.layer_name = "noel_deco";

noel_deco.flashvars_labels = noel_deco_flashvars_labels;
noel_deco.flashvars_values = noel_deco_flashvars_values;

noel_deco.create();
noel_deco.setSize(170,200);//win
noel_deco.setWindowAlignFixed('left');
noel_deco.setWindowValignFixed('top');
if(checkBrowser() == "Safari"){
window.resizeBy(1,0);
}
}

eventObserve(window, 'load', loadnoeldeco, false);

//--------------------------------------------------------------------
//scroll
//--------------------------------------------------------------------
function scrollnoeldeco(){
noel_deco.setWindowAlignFixed('left');

}
//
eventObserve(window, 'scroll', scrollnoeldeco, false);


//--------------------------------------------------------------------
//resize
//--------------------------------------------------------------------
function resizenoeldeco(){
noel_deco.setWindowAlignFixed('left');

}
//window.resize
eventObserve(window, 'resize', resizenoeldeco, false);

//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
//
document.getElementsByTagName("html")[0].style.overflow="scroll";

function hidenoel_deco(){
noel_deco.setVisible("hidden");
}

function setClose(){
noel_deco.setSize(0,0);
}

function checkBrowser(){
var uName = navigator.userAgent;
if (uName.indexOf("Safari") > -1) return "Safari";
if (uName.indexOf("MSIE") > -1){
return "MSIE";
}
return "Netscape";
};