var snowsrc=new Array();
var i=0;
while(!(window.rezo_lien_image[i]===undefined)){
	snowsrc[i]=rezo_lien_image[i];
	i++
}
clearTimeout(i);
var no=(!(window.rezo_nb_total===undefined))?rezo_nb_total:20;
var hidesnowtime=(!(window.rezo_temps===undefined))?rezo_temps: 0;
var snowdistance=(!(window.rezo_hauteur===undefined))?rezo_hauteur:200;
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,doc_height;
dx=new Array();
xp=new Array();
yp=new Array();
am=new Array();
stx=new Array();
sty=new Array();
function init_snow(){
	if(ns6up){
		doc_width=self.innerWidth;doc_height=self.innerHeight
	}
	else{
		if(ie4up){
			doc_width=1200;doc_height=800
		}
	}
	for(i=0;i<no;++i){
		dx[i]=0;
		xp[i]=Math.random()*(doc_width-60);
		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){var a=Math.floor(Math.random()*snowsrc.length);
			document.write('<div id="dot'+i+'" style="POSITION: absolute; Z-INDEX: '+i+"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc[a]+'\' border="0"></div>')
		}
	}
	snowIE_NS6()
}
function snowIE_NS6(){
	doc_width=ns6up?window.innerWidth-60:iecompattest().clientWidth-60;switch(snowdistance){
		case"windowheight":doc_height=getWindowHeight();
		break;
		case"pageheight":doc_height=getDocHeight();
		break;
		default:doc_height=snowdistance;
		break
	}
	for(i=0;i<no;++i){
		yp[i]+=sty[i];if(yp[i]>doc_height-50){
			xp[i]=Math.random()*(doc_width-am[i]-60);
			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"
	}
}
function getDocHeight(){
	var a=document;
	return Math.max(Math.max(a.body.scrollHeight,a.documentElement.scrollHeight),Math.max(a.body.offsetHeight,a.documentElement.offsetHeight),Math.max(a.body.clientHeight,a.documentElement.clientHeight))
}
function getWindowHeight(){
	return(iecompattest().clientHeight||window.innerHeight)
}
if(ie4up||ns6up){
	init_snow();
	window.onresize=new Function('setTimeout("window.location.reload()",0)');
	if(hidesnowtime>0){
		setTimeout("hidesnow()",hidesnowtime*100)
	}
}
else{
	document.write('<a href="http://forum.webnetters.org">Web Netters</a>: discussions en tout genre.')
};
