
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n);
	return x;
}
function swapImage() {
	var obj
	var args=swapImage.arguments;
	document.getElementById('myImage').style.filter="xray()"
	// show first object	
	if ((obj=MM_findObj(args[0]))!=null) {
	    if (obj) {
			if (obj.src.indexOf('i_fleche_off.gif') > -1){
				obj.src='../images/i_fleche_on.gif';
			} else {
				obj.src='../images/i_fleche_off.gif';
			}
		}
	}
	// hide other objects
	for (i=1; i<(args.length); i++) {
		if ((obj=MM_findObj(args[i]))!=null) {
	    	if (obj) {
				obj.src='../images/i_fleche_off.gif';
			}
		}
	}	
}

function showHide() {
	var i,obj
	var args=showHide.arguments;
	// show first object
	if ((obj=MM_findObj(args[0]))!=null) {
	    if (obj.style) {
			obj=obj.style;
			if (obj.visibility=='visible'){
				obj.visibility='hidden';
				obj.display="none";
			} else {
				obj.visibility='visible';
				obj.display="";
			}
		}
	}
	// hide other objects
	for (i=1; i<(args.length); i++) {
  		if ((obj=MM_findObj(args[i]))!=null) {
			if (obj.style) {
				obj=obj.style;
				obj.display="none";
				obj.visibility='hidden';
			}     
		}
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}




window.onerror = new Function("return true")
document.onselectstart = new Function("return false")
screen.bufferDepth = 16
var O   = new Array()
var SH  = SW = SPA = SO = xm = ym = XQ = YQ = YB = XB = 0
var pS  = 10
var pQ  = 15
var pQ2 = pQ / 2
var pS2 = pS / 2

function CObj(N){
	this.N = N
	o = document.createElement("span")
	SPA.appendChild(o)
	with(o.style){
		top = -pS
		width = pS
		height = pS
		fontSize = "1px"
		background = "#66CC33"
		border = "gray solid 1px"
	}
	this.pO = o.style
	this.pX = 0
	this.pY = 1000
	this.zX = 0
	this.zY = 1
	this.Li = false

	this.run = function () {
		with (this) {
			zX *= .95
			pY += zY
			pX += zX
			zY += .1 + N * .001
			if(pY>SH){
				pY = -pS
				pX = Math.round(Math.random() * SW)
				zY = 0
				zX = 0
				pO.background = "#EEEDE6"
			}
			if(pX >= XQ - pS2 && pX <= XQ + pQ + pS2 && pY >= YQ - pS && pY <= YQ + pQ){
				pY -= zY
				zX += ((pX >= XQ + pQ2)?1:-1) * (.5 * zY + Math.abs(YQ - YB) * .2)
				if(pY < YQ - (YQ - YB)) pY = YQ - pS, zY = 0; else pX += XQ - XB;
				if(!Li){
					Li = true
					pO.background = "#FFFFFF"
					setTimeout("O["+N+"].Li=false;O["+N+"].pO.background='#EEEDE6'", 1200)
				}
			}
			pO.left = pX - pS2
			pO.top  = pY
			setTimeout("O["+N+"].run()", 16)
		}
	}
}
function pQM(){
	YB = YQ
	XB = XQ
	XQ = SO.left = xm - pQ2
	YQ = SO.top  = ym - pQ2
	setTimeout("pQM()", 16)
}

function resize() {
	with(SPA.style){
		L = left = Math.round(-1+(document.body.offsetWidth - SW) / 2)
		H = top  = Math.round(-1+(document.body.offsetHeight - SH) / 2)
		width    = SW
		height   = SH
	}
}
onresize = resize

onload = function (){
	document.onmousemove = function(e){
		if (window.event) e = window.event
		xm = (e.x || e.clientX) - L
		ym = (e.y || e.clientY) - H
	}
	SPA = document.getElementById("SPAN")
	SO  = document.getElementById("SPLASH").style
	SO.width  = pQ
	SO.height = pQ
	SH  = document.body.offsetHeight
	SW  = pQ - pS2
	SX  = Math.round(SW / pS) - 1
	xm  = SW / 2
	ym  = SH / 2
	resize()
	pQM()
	for(j=0;j<60;j++){
		O[j] = new CObj(j)
		setTimeout("O["+j+"].run()",j * 123)
	}
}

function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)

}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}
