// JavaScript Document

	function countdown(elId,date) {
		now = new Date();
		y2k = new Date(date);
		days = (y2k - now) / 1000 / 60 / 60 / 24;
		daysRound = Math.floor(days);
		hours = (y2k - now) / 1000 / 60 / 60 - (24 * daysRound);
		hoursRound = Math.floor(hours);
		minutes = (y2k - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
		minutesRound = Math.floor(minutes);
		seconds = (y2k - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
		secondsRound = Math.round(seconds);
		sec = " sec.";
		min1 = " min. :";
		hr = " heurs  : ";
		dy = " jours  : ";
		var el = document.getElementById(elId);
		el.value = daysRound  + dy + hoursRound + hr + minutesRound + min1 + secondsRound + sec;
		if(el.value == 'NaNJ:NaNH:NaNM:NaNS' || el.value == 'NaND:NaNH:NaNM:NaNS'){
			el.value = "00J:00H:00M:00S";
		}else{
		setTimeout("countdown('"+elId+"','"+date+"');", 100);
		}
	}
	
	var popUpWin=0;
	function popUpWindow(URLStr, left, top, width, height)
	{
	  if(popUpWin)
	  {
		if(!popUpWin.closed) popUpWin.close();
	  }
	  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	}
	
	function imageView(myImage,popupWinName,w,h,x,y){
		preview = window.open("", popupWinName,
		"resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width="+w+",height="+h+",left="+x+",top="+y+"");
		preview.document.write('<html><head><title><\/title><\/head>'
		+'<body onBlur="self.focus();" marginWidth="0" marginHeight="0" topmargin="0" leftmargin="0">'
		+'<center><a href="javascript:self.close()"><img border="0" alt="Close/Fermer" src="'+myImage+'" width="'+w+'" height="'+h+'">'
		+'<\/center><\/a><\/body><\/html>');
		preview.document.close();
	}// Example:

// simplePreload( '01.gif', '02.gif' ); 

function simplePreload()

{ 

  var args = simplePreload.arguments;

  document.imageArray = new Array(args.length);

  for(var i=0; i<args.length; i++)

  {

    document.imageArray[i] = new Image;

    document.imageArray[i].src = args[i];

  }

}

