Снежинки на сайта само през зимните месеци.

VoodooNet

Registered
Значи трябва ми код които да прави снежинки по сайта, но
да се визуализират само в месеците от 01.Декември до 01.Март.

Сиреч като дойдат зимните месеци да има снежинки, а в другите месеци да няма...


Моля за съдействие за изготвяне на подобен код.
 
Код:
<script type="text/javascript">
var month = new Date().getMonth();
if (month==0||month==1||month==11) {
var snowsrc="http://www.dynamicdrive.com/dynamicindex3/snow.gif"
var no = 10;
var hidesnowtime = 0;
var snowdistance = "pageheight";
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 = iecompattest().clientWidth;
doc_height = iecompattest().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>
заповядай
 
А не може ли да слагаш един скрипт за тази работа? Слагаш го на 1-ви декември и почва да вали сняг махаш го когато поискаш? Все същото е. Само къдет ти го слагаш, а не е автоматично.

Код:
<script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
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(range) {
rand=Math.floor(range*Math.random())
return rand
}

function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight
marginright = window.innerWidth
}
var snowsizerange=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(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size
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
snow[i].style.top=snow[i].posy
}
movesnow()
}

function movesnow() {
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]);
snow[i].style.top=snow[i].posy

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=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>
 
Ясно е ,че мога да го слагам и махам кода, но по добре ще е да
се появява сам и сам са спира когато му е времето :)
 
Код:
<?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){
	//ima javascrpit;
}

?>

Като 12, 1 и 2 са месеците Декември, Януари, Февруари. Ако искаш да добавиш някой - брой на пръсти кой месец кой номер е и добавяй в масива :D
 
Тествах да внедря Джава скрипта в PHP кода но ми дава грешка...може ли да ги тествате и евентуално да покажете къде греша ?


Код:
<?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){
    //ima javascrpit;

	<script>
	// Set the number of snowflakes (more than 30 - 40 not recommended)
	var snowmax=35

	// Set the colors for the snow. Add as many colors as you like
	var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

	// Set the fonts, that create the snowflakes. Add as many fonts as you like
	var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

	// Set the letter that creates your snowflake (recommended:*)
	var snowletter="*"

	// Set the speed of sinking (recommended values range from 0.3 to 2)
	var sinkspeed=0.6

	// Set the maximal-size of your snowflaxes
	var snowmaxsize=22

	// Set the minimal-size of your snowflaxes
	var snowminsize=8

	// Set the snowing-zone
	// Set 1 for all-over-snowing, set 2 for left-side-snowing
	// Set 3 for center-snowing, set 4 for right-side-snowing
	var snowingzone=1

	///////////////////////////////////////////////////////////////////////////
	// CONFIGURATION ENDS HERE
	///////////////////////////////////////////////////////////////////////////


	// Do not edit below this line
	var snow=new Array()
	var marginbottom
	var marginright
	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(range) {
	rand=Math.floor(range*Math.random())
	return rand
	}

	function initsnow() {
	if (ie5 || opera) {
	marginbottom = document.body.clientHeight
	marginright = document.body.clientWidth
	}
	else if (ns6) {
	marginbottom = window.innerHeight
	marginright = window.innerWidth
	}
	var snowsizerange=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(snowsizerange)+snowminsize
	snow[i].style.fontSize=snow[i].size
	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
	snow[i].style.top=snow[i].posy
	}
	movesnow()
	}

	function movesnow() {
	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]);
	snow[i].style.top=snow[i].posy

	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=0
	}
	}
	var timer=setTimeout("movesnow()",50)
	}

	for (i=0;i<=snowmax;i++) {
	document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
	}
	if (browserok) {
	window.onload=initsnow
	}
	</script> 
}

?>
 
Тъй ?

Код:
 <?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){
  echo '

   <script>
   // Set the number of snowflakes (more than 30 - 40 not recommended)
   var snowmax=35

   // Set the colors for the snow. Add as many colors as you like
   var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

   // Set the fonts, that create the snowflakes. Add as many fonts as you like
   var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

   // Set the letter that creates your snowflake (recommended:*)
   var snowletter="*"

   // Set the speed of sinking (recommended values range from 0.3 to 2)
   var sinkspeed=0.6

   // Set the maximal-size of your snowflaxes
   var snowmaxsize=22

   // Set the minimal-size of your snowflaxes
   var snowminsize=8

   // Set the snowing-zone
   // Set 1 for all-over-snowing, set 2 for left-side-snowing
   // Set 3 for center-snowing, set 4 for right-side-snowing
   var snowingzone=1

   ///////////////////////////////////////////////////////////////////////////
   // CONFIGURATION ENDS HERE
   ///////////////////////////////////////////////////////////////////////////


   // Do not edit below this line
   var snow=new Array()
   var marginbottom
   var marginright
   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(range) {
   rand=Math.floor(range*Math.random())
   return rand
   }

   function initsnow() {
   if (ie5 || opera) {
   marginbottom = document.body.clientHeight
   marginright = document.body.clientWidth
   }
   else if (ns6) {
   marginbottom = window.innerHeight
   marginright = window.innerWidth
   }
   var snowsizerange=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(snowsizerange)+snowminsize
   snow[i].style.fontSize=snow[i].size
   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
   snow[i].style.top=snow[i].posy
   }
   movesnow()
   }

   function movesnow() {
   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]);
   snow[i].style.top=snow[i].posy

   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=0
   }
   }
   var timer=setTimeout("movesnow()",50)
   }

   for (i=0;i<=snowmax;i++) {
   document.write("<span id=\'s"+i+"\' style=\'position:absolute;top:-"+snowmaxsize+"\'>"+snowletter+"</span>")
   }
   if (browserok) {
   window.onload=initsnow
   }
   </script>
}
';
?>
 
<?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){
echo '

<script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
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(range) {
rand=Math.floor(range*Math.random())
return rand
}

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

function movesnow() {
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]);
snow[i].style.top=snow[i].posy

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=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id=\'s"+i+"\' style=\'position:absolute;top:-"+snowmaxsize+"\'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>
';
}
?>
 
Добре като самостоятелно РНР работи но къде да го сложа в сайта.
Ето го кода с неуспешния опит -->

Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.:: VoodooNet ::.</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta name="description" content="VoodooNet.biz - форум, новини, астрономия, за любовта и секса, автомания, електроника, компютърна помощ, зоомания, ботаника, кулинария, забавления, IRC, линкове" />
<meta name="keywords" content="VoodooNet.biz - форум, новини, астрономия, за любовта и секса, автомания, електроника, компютърна помощ, зоомания, ботаника, кулинария, забавления, IRC, линкове" />
<meta name="robots" content="index, follow" /> 
<meta name="googlebot" content="index, follow" /> 
<meta name="author" content="Борислав Борисов - Voodoo & Дафинка Чирилкова" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style>
table, td {font-family:Verdana, Tahoma; font-size:10px; color:#ddddff;}
td.nav, td.content {padding-left:4px; padding-right:4px;}
.nav a {display:block; padding:4px; text-align:center; border:1px solid #222; background:url(master/
_03.gif);}
.nav a:hover {display:block; color:#5A7092; font-weight:bold; padding:4px; text-align:center; border:1px solid #222; background:url(master/index_03hover.gif);}
.navhead {display:block; font-weight:bold; padding-left:4px; padding-right:4px; text-align:center; border:1px solid #222; background:url(master/index_03.gif);}
a {color:#6C89A4; text-decoration:none;}
a:hover {color:#7C92B4;}
</style>

<script language="JavaScript" type="text/javascript">
function setopacity(obj, opacity) {
// IE/Win
obj.style.filter = "alpha(opacity:"+opacity+")";
// Safari<1.2, Konqueror
obj.style.KHTMLopacity = opacity/100;
// Older Mozilla and firefox
obj.style.Mozopacity = opacity/100;
// Safari 1.2, newer firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
}
</script>
</head>
<body bgcolor="#1D1D1D" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){
echo '

<script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
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(range) {
rand=Math.floor(range*Math.random())
return rand
}

function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight
marginright = window.innerWidth
}
var snowsizerange=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(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size
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
snow[i].style.top=snow[i].posy
}
movesnow()
}

function movesnow() {
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]);
snow[i].style.top=snow[i].posy

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=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id=\'s"+i+"\' style=\'position:absolute;top:-"+snowmaxsize+"\'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>
';
}
?>
<center><br />
<table id="Table_01" width="638" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="14">
			<img src="master/index_01.gif" width="638" height="27" alt=""></td>
	</tr>
	<tr>
		<td colspan="14">
			<img src="master/banner.gif" width="638" height="141" alt=""></td>
	</tr>
	<tr>
		<td colspan="14">
			<img src="master/index_03.gif" width="638" height="27" alt=""></td>
	</tr>
	<tr>
		<td colspan="3">
			<img src="master/index_04.gif" width="11" height="8" alt=""></td>
		<td colspan="5">
			<img src="master/index_05.gif" width="265" height="8" alt=""></td>
		<td>
			<img src="master/index_06.gif" width="92" height="8" alt=""></td>
		<td colspan="3">
			<img src="master/index_07.gif" width="257" height="8" alt=""></td>
		<td colspan="2">
			<img src="master/index_08.gif" width="13" height="8" alt=""></td>
	</tr>
	<tr>
		<td colspan="3">
			<img src="master/index_09.gif" width="11" height="68" alt=""></td>
		<td background="master/ticker1.gif" width="265" height="68" colspan="5">
			<marquee direction="up" scrolldelay="500" width="260" height="60">
				<script language="JavaScript">
					var Quotation=new Array()
					Quotation[0] = "Аз виждам страх в очите на своите врагове.";
					Quotation[1] = "If you want to be ПИЯН drink РАКИЯ not АЙРЯН!";
					Quotation[2] = "Живей за днес, защото вчера няма да се върне, а утре може и да не дойде.";
					Quotation[3] = "Скромността е за тези, които нямат други качества.";
					Quotation[4] = "Човек сам се ражда и сам умира, а през останалото време някакви хора непрекъснато се опитват да му досаждат.";
					Quotation[5] = "Който не е готов да умре, значи вече е мъртъв.";
					Quotation[6] = "Да имаш кураж не значи да не се страхуваш - това значи да те е страх и въпреки това да имаш воля да продължиш.";
					Quotation[7] = "Човек, който си позволява да загуби дори един час от времето си, не е открил колко ценен е живота.";
					Quotation[8] = "Проблемът на света е, че глупавите са самоуверени, а умните винаги се колебаят.";
					Quotation[9] = "Има само два начина да се справиш с жените..., но никой не ги знае.";
					Quotation[10] = "Лепенка на монитора на програмист: 'Ако този надпис се смалява значи някой ви отнася монитора'.";
					Quotation[11] = "Умирайте само в краен случай.";
					Quotation[12] = "Понякога седя и си мисля, а понякога просто си седя...( Мечо Пух ).";
					Quotation[13] = "Когато се колебаеш, кажи истината.";
					Quotation[14] = "Не взимай живота твърде на сериозно. Никога няма да се измъкнеш от него жив.";
					Quotation[15] = "Мъдър е този, който знае не много, а необходимото.";
					Quotation[16] = "Никога не мисли за бъдещето. То идва достатъчно бързо.";
					Quotation[17] = "Преди да поискаш, помисли какво си дал.";
					Quotation[18] = "Оръжията не убиват хора. Хората убиват хора...";
					Quotation[19] = "Животът е болест, предавана по полов път.";
					Quotation[20] = "Бъдеще няма. Бъдещето е ново минало.";
					Quotation[21] = "Kакво ли си пожелават звездите, като видят падащи хора?";
					Quotation[22] = "Не се смеи на този които прави крачка назад, защото може да се засилва.";
					Quotation[23] = "Да се ядосваш това значи да наказваш себе си, за грешките на другите.";
					Quotation[24] = "Господи пази ме от Ламерите, от Хакерите и сам мога...";
					Quotation[25] = "Ето вземи ми сърцето и всичко което от син би приела и до днес не сам ти дал !.";
					Quotation[26] = "Ако съдбата ти обърне гръб, просто я почакай да се наведе.";
					Quotation[27] = "Насилието е последното убежище на некомпетентността.";
					Quotation[28] = "Животът те иска...ИЗЛЕЗ.";
					Quotation[29] = "Понякога е по-добре да си държиш устата затворена, за да те мислят за глупак, отколкото да я отвориш и да го докажеш.";
					Quotation[30] = "Ние МОЖЕЩИТЕ,предизвикани от НЕЗНАЕЩИТЕ,вършим НЕВЪЗМОЖНОТО за кефа на НЕБЛАГОДАРНИТЕ и сме направили толкова МНОГО,с толкова МАЛКО,за толкова ДЪЛГО време,че вече сме квалифицирани да правим ВСИЧКО за НИЩО.";
					Quotation[31] = "Отстранете причината, тогава ще премине и болестта.";
					Quotation[32] = "Легни болен за да познаеш приятелите си.";
					Quotation[33] = "Много по-лесно е да умреш за една жена, която обичаш, отколкото да живееш с нея.";
					Quotation[34] = "У човек с къс ум езикът обикновено е твърде дълъг.";
					Quotation[35] = "Неизбежните войни са винаги справедливи войни. (НАПОЛЕОН)";
					Quotation[36] = "На хората не достига не сила, а воля.";
					Quotation[37] = "Скритата вражда е по-опасна от явната. (ЦИЦЕРОН)";
					Quotation[38] = "Умния враг не е толкова опасен, колкото глупавия приятел.";
					Quotation[39] = "Глупак е онзи, който се отнася с пренебрежение към своя противник. (Г. РОЛЕНХАГЕН)";
					Quotation[40] = "Най-големия враг е този, които се преструва на приятел. (ЛАТИНСКА)";
					Quotation[41] = "Няма нищо по-опасно от глупака, който се опитва да играе ролята на умен. (ГЬОТЕ)";
					Quotation[42] = "По-добре да си слуга на мъдрец, отколкото господар на глупак.";
					Quotation[43] = "Едно е да говориш много, друго е да кажеш нещо. (СОФОКЪЛ)";
					Quotation[44] = "Мъдрият говори, защото има нещо за казване, глупакът - само за да каже нещо. (ПЛАТОН)";
					Quotation[45] = "Никога не дружи с човек, когото не можеш да уважаваш. (ДАРВИН)";
					Quotation[46] = "Ако живееш само за себе си, ти си излишен товар на земята.";
					Quotation[47] = "Не се надявай на трайна любов от жена, която обича себе си. (ПИТАГОР)";
					Quotation[48] = "Аз знам само това, че нищо не знам. (СОКРАТ)";
					Quotation[49] = "Измяната винаги с вярност се прикрива.";
					Quotation[50] = "Книгите са като хората: когато остареят стават мъдри. (ЕЛИН ПЕЛИН)";
					Quotation[51] = "Дом, в който няма книги, прилича на тяло, лишено от душа. (ЦИЦЕРОН)";
					Quotation[52] = "Мъдростта - това е умение да разбереш кога трябва да спреш. (ГЬОТЕ)";
					Quotation[53] = "Който сам не се убеди, никой не може да го убеди. (ПЛАТОН)";
					Quotation[54] = "Уф, ама бъгава работа, пак зависна - мърмореше Господ и затвори приложението, после отново кликна на иконката ZIMA.EXE";
					Quotation[55] = "Ако идиотите можеха да летят, IRC щеше да бъде летище...";
					Quotation[56] = "Ако аз неизгоря,ако ти неизгориш,ако ний не изгорим...как ще има светлина.....";
					Quotation[57] = "Героизъм по заповед, безмислена жестокост, тягостен шовинизъм - как страстно ненавиждам всичко това, колко ниска и презряна считам войната. (Албърт Айнщайн)";
					Quotation[58] = "Мисля и размишлявам със месеци.В деведесет и девет от случаите изводите ми са погрешни. На стотния път съм прав. (Албърт Айнщайн)";
					Quotation[59] = "...при днешното обществено и политическо устройство на човечеството сиромахът е навсякъде роб, а робът навсякъде - сиромах.(Христо Ботев)";
					Quotation[60] = "Колкото по-горчиво е миналото,толкова по-сладко е бъдещето. (Уилям Шекспир)";
					Quotation[61] = "Съмнение - това е най-злият враг на чоешкото знание. (Стефан Цвайг)";
					Quotation[62] = "Ако искаш да те обичат, обичай! (Сенека)";
					Quotation[63] = "В изблик на гняв не бива да се говори, нито да се действа. (Питагор)";
					Quotation[64] = "Чашата на живота щеше да сладни непоносимо, ако в нея не капеха и малко горчиви сълзи. (Питагор)";
					Quotation[65] = "Ако искаш да обичаш не трябва да се страхуваш,ако искаш да те обичат, не трябва да се съмняваш. (Петър Дънов)";
					Quotation[66] = "Човек не може и не трябва да бъде нито абсолютно добър, нито абсолютно зъл. (Петър Дънов)";
					Quotation[67] = "По-безопасно е да се страхуват от теб, отколкото да те обичат. (Николо Макиавели)";
					Quotation[68] = "Да обичаш дава сила да бъдеш обичан, дава смелост. (Лао Дзъ)";
					Quotation[69] = "Мъжете играят играта, жените знаят резултата. (Роджър Удис)";
					Quotation[70] = "И видях, и ето сив кон, и върху него ездач, чието име беше Смърт, и адът следваше подире му. ( Откровение 6:8 )";
					Quotation[71] = "Един ден любовта попитала приятелството: - Ти защо съществуваш когато мен ме има ? Приятелството отговорило: -За да донеса усмивка там където ти оставяш сълзи !";
					Quotation[72] = "Отлагането е за предпочитане пред грешката.";
					Quotation[73] = "Който не знае какво му е, нека види къде му е и ако не го намери - това му е!";
					Quotation[74] = "Научих, че съжаленията за вчерашния ден и страхът от утрешни са двама крадци които ни ограбват настоящето.";
					Quotation[75] = "Никога не знаеш колко скоро ще стане твърде късно.";
					Quotation[76] = "Не плачи за някой който не може да плаче за теб!";
					Quotation[77] = "Който търси приятел без недостатък, ще остане сам.";
					Quotation[78] = "Ако животът беше лесен,нямаше да започва с плач.";
					Quotation[79] = "Във всяко зло има по малко добро и във всяко добро има по малко зло. (символа Инг-Янг)";
					Quotation[80] = "Капката пробива камъка не със сила, а с постоянство.";
					Quotation[81] = "Ако обичаш нещо истински - пусни го да си отиде! Ако се върне - значи си е твое, ако ли не - значи никога не е било!";
					Quotation[82] = "Ако говориш с Бог-това е молитва,а ако Бог ти говори-това е шизофрения.";
					Quotation[83] = "Марк Твен: Пазете се от хора, които се опитват да омаловажат успехите и амбициите ви. Малките хора винаги ще го правят. Докато наистина великите ще ви накарат да се почувствате така, сякаш вие самите можете да станете велики.";
					Quotation[84] = "Сякаш стъпвам по натрошени стъкълца, виждайки омразата в техните лица.";
					var Q = Quotation.length;
					var whichQuotation=Math.round(Math.random()*(Q-1));
					function showQuotation(){document.write(Quotation[whichQuotation]);}
					showQuotation();
				</script>
			</marquee>
		</td>
		<td><img src="master/index_11.gif" width="92" height="68" alt=""></td>
		<td valign="middle" align="center" background="master/ticker2.gif" width="257" height="68" colspan="3">
			<a href="http://voodoonet.biz:8080/mail/"><img src="master/mail.gif" border="0" onmouseover="setopacity(this,100);" onmouseout="setopacity(this,20);"></a>
			<a href="http://voodoonet.biz:8888/webcam.html"><img src="master/cam.gif" border="0" onmouseover="setopacity(this,100);" onmouseout="setopacity(this,20);"></a>
			<a href="http://voodoonet.biz/phpsysinfo/"><img src="master/sis.gif" border="0" onmouseover="setopacity(this,100);" onmouseout="setopacity(this,20);"></a>
			<a href="http://voodoonet.biz/web/ts/ts.php"><img src="master/ts.gif" border="0" onmouseover="setopacity(this,100);" onmouseout="setopacity(this,20);"></a>
		</td>
		<td colspan="2">
			<img src="master/index_13.gif" width="13" height="68" alt=""></td>
	</tr>
	<tr>
		<td colspan="3">
			<img src="master/index_14.gif" width="11" height="11" alt=""></td>
		<td colspan="5">
			<img src="master/index_15.gif" width="265" height="11" alt=""></td>
		<td>
			<img src="master/index_16.gif" width="92" height="11" alt=""></td>
		<td colspan="3">
			<img src="master/index_17.gif" width="257" height="11" alt=""></td>
		<td colspan="2">
			<img src="master/index_18.gif" width="13" height="11" alt=""></td>
	</tr>
	<tr>
		<td colspan="14">
			<img src="master/index_19.gif" width="638" height="11" alt=""></td>
	</tr>
	<tr>
		<td background="master/index_20.gif" width="1" height="11" valign="top"></td>
		<td class="nav" valign="top" background="master/nav.gif" width="154" height="11" colspan="4">
			<br />
			<div class="navhead">Меню</div>
			<a href="http://voodoonet.biz/web/Album/index.html">Албум</a>
			<a href="http://voodoo.phpbb-host.com/phpbb/index.php">Форум</a>
			<a href="http://voodoonet.biz/web/news.php">Новини</a>
			<a href="http://voodoonet.biz/web/kocmoc/space.htm">Астрономия</a>
			<a href="http://voodoonet.biz/web/love/love.htm">За любовта и секса</a>
			<a href="http://voodoonet.biz/web/car/index_car.htm">Авто мания</a>
			<a href="http://voodoonet.biz/web/sat/sat_index.htm">Електроника</a>
			<a href="http://voodoonet.biz/web/net/net-index.htm">Компютърна помощ</a>
			<a href="http://voodoonet.biz/web/animals/index_animals.htm">Зоо-мания</a>
			<a href="http://voodoonet.biz/web/nature/nature_index.html">Ботаника</a>
			<a href="http://voodoonet.biz/web/kulinaria/index_kulinaria.html">Кулинария</a>
			<a href="http://voodoonet.biz/web/fun/index_fun.htm">Забавления</a>
			<a href="http://voodoonet.biz/web/irc/index_irc.htm">IRC</a>
			<a href="http://voodoonet.biz/web/links.htm">Линкове</a>
			<a href="http://voodoonet.biz/web/about/about.html">За мен</a>
			<br />
		</td>
		<td background="master/index_22.gif" width="1" height="11" valign="top"></td>
		<td class="content" valign="top" background="master/content.gif" width="481" height="11"colspan="7">
		
            
			<div class="navhead">Услуги</div><br />
			<center>
				<b>IRC Server:</b> Irc.VoodooNet.biz<br /><br />
				<b>TeamSpeak2:</b> Ts.VoodooNet.biz<br /><br />
				<b>FTP:</b> Ftp.VoodooNet.biz <br /><br />
			</center>
			 <div class="navhead">Други</div><br />
			 
			 <div align="right">
				<div class="play">
					<a href="http://voodooserv.hit.bg/stream.html"><img src="master/play.png" align="left" border="0" alt="" /></a>
				</div>
				
				<a href="web/speedtest/index-php.html"><img src="web/speedtest/speed.jpg" border="0" alt="" /></a>
			</div>
			
			<div align="left">Онлайн радио</div>
				<center>Времето<br /><a href="web/vremeto.php"><img src="master/meteo.png" alt="" border="0" width="80" height="80" /></a></center>
				
			<center> 
				<br /><a href="http://www.danasoft.com/sig/VoodooServ.jpg" target="_top"><img border="0" alt="Виждам те" src="http://www.danasoft.com/sig/VoodooServ.jpg" ALIGN="midle" HSPACE="4" VSPACE="2"></a> 
				<br /><br /><a href="http://easyhitcounters.com/stats.php?site=bmbsoft" target="_top"><img border="0" alt="Counter" src="http://beta.easyhitcounters.com/counter/index.php?u=bmbsoft&s=scoreboard" ALIGN="middle" HSPACE="4" VSPACE="2"></a><script src=http://beta.easyhitcounters.com/counter/script.php?u=bmbsoft></script> 
				<br /><a href="http://easyhitcounters.com/" target="_top"><font color="#666666">Брояч на посещенията</font></a><html> 
			</center>
			
		</td>
		<td background="master/index_24.gif" width="1" height="11" valign="top"></td>
	</tr>
	<tr>
		<td colspan="14">
			<img src="master/index_27.gif" width="638" height="4" alt=""></td>
	</tr>
	<tr>
		<td colspan="2">
			<img src="master/index_28.gif" width="10" height="26" alt=""></td>
		<td colspan="2">
			<img src="master/index_29.gif" width="88" height="26" alt=""></td>
		<td colspan="3">
			<img src="master/index_30.gif" width="93" height="26" alt=""></td>
		<td colspan="3">
			<img src="master/index_31.png" width="258" height="26" alt=""></td>
		<td>
			<img src="master/index_32.gif" width="90" height="26" alt=""></td>
		<td colspan="3">
			<img src="master/index_33.gif" width="99" height="26" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="master/spacer.gif" width="1" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="9" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="1" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="87" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="57" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="1" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="35" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="85" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="92" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="81" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="90" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="86" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="12" height="1" alt=""></td>
		<td>
			<img src="master/spacer.gif" width="1" height="1" alt=""></td>
	</tr>
</table>
</center><br />
</body>
</html>
 
Сложи го преди </head>
И също замести
<script> със <script type="text/javascript">

И как искаш да работи, като сме го направили само декемрви, януари и февруари да да работи :D
 
Аз часовника съм го върнал назад на копа, но проблема пак остава.

Принтира кода в страницата най отгоре ,а ако страницата я направя php тогава пък показва само една снежинка горе в ляво :(
 
Така ?

Код:
<?php
$month = date(n);
$months = array("12","1","2");

if(in_array($month, $months)){

echo '

<script>
var snowmax=10

var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

var snowletter="*"

var sinkspeed=1.5

var snowmaxsize=26

var snowminsize=8

var snowingzone=1

var snow=new Array()
var marginbottom
var marginright
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(range) {
rand=Math.floor(range*Math.random())
return rand
}

function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight+0
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight+0
marginright = window.innerWidth
}
var snowsizerange=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(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size
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-50)}
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(6*marginbottom-marginbottom-6*snow[i].size)
snow[i].style.left=snow[i].posx
snow[i].style.top=snow[i].posy
}
movesnow()
}

function movesnow() {
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]);
snow[i].style.top=snow[i].posy

if (snow[i].posy>=marginbottom-6*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size-50)}
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=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id=\'s"+i+"\' style=\'position:absolute;top:-"+snowmaxsize+"\'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>
';

}
?>
 
$month = date("n");
if($month == "12" || $month == "1" || $month == "2")
{
echo '
<script>
var snowmax=10

var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

var snowletter="*"

var sinkspeed=1.5

var snowmaxsize=26

var snowminsize=8

var snowingzone=1

var snow=new Array()
var marginbottom
var marginright
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(range) {
rand=Math.floor(range*Math.random())
return rand
}

function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight+0
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight+0
marginright = window.innerWidth
}
var snowsizerange=snowmaxsize-snowminsize
for (i=0;i<=snowmax;i++) {
crds = 0;
lftrght = Math.random()*15;
x_mv = 0.03 + Math.random()/10;
snow=document.getElementById("s"+i)
snow.style.fontFamily=snowtype[randommaker(snowtype.length)]
snow.size=randommaker(snowsizerange)+snowminsize
snow.style.fontSize=snow.size
snow.style.color=snowcolor[randommaker(snowcolor.length)]
snow.sink=sinkspeed*snow.size/5
if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size-50)}
if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
snow.posy=randommaker(6*marginbottom-marginbottom-6*snow[i].size)
snow[i].style.left=snow[i].posx
snow[i].style.top=snow[i].posy
}
movesnow()
}

function movesnow() {
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]);
snow[i].style.top=snow[i].posy

if (snow[i].posy>=marginbottom-6*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size-50)}
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=0
}
}
var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
document.write("<span id=\'s"+i+"\' style=\'position:absolute;top:-"+snowmaxsize+"\'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>';
}
 
Добре работи ... :) ама как да го интегрирам в тази страница --> http://voodoonet.biz/master.htm
 

Back
Горе