function msg(txt)
{
	top.status=txt;
}
function GoMail(lien)
{
	var newlien=lien.href;
	if (newlien.indexOf("@") == -1)
	{
		var newlien=lien.href+'@'+'m3productions.fr';
		lien.href=newlien;
	}
	return true;
}
function openit(page, cible)
{
	window.open(page,cible,'');
}
function popup_scroll(page, cible, width, height)
{
	window.open(page,cible,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+width+',height='+height+',left=10,top=10');
}
function popup(page, cible, width, height)
{
	window.open(page,cible,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width='+width+',height='+height+',left=10,top=10');
}
function printit()
{
   window.print() ;
}
function closeit()
{
	window.close();
}
function TakeFocus(idform,idchamp)
{
	document.forms[idform].elements[idchamp].focus();
}
function TakeValue(idform,idchamp,valeur)
{
	document.forms[idform].elements[idchamp].value=valeur;
}
function ColorInput (idelem,coultexte,coulfond)
{
	document.getElementById(idelem).style.color=coultexte;
	document.getElementById(idelem).style.background=coulfond;
}
function ShowCalque(idcalque)
{
	document.getElementById(idcalque).style.display="inline";
}
function HideCalque(idcalque)
{
	document.getElementById(idcalque).style.display="none";
}
function ScrollToCalque(idcalque,surplus)
{
	document.body.scrollTop=document.getElementById(idcalque).offsetTop+surplus;
}

function load() {
	if (document.images) {
		this.length=load.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src=load.arguments[i];
		}
	}
}
var NbImg=31;
function Diaporama()
{
	for(i=1;i<=NbImg;i++)
	{
		var temp=new load('images/accueil/img'+i+'.jpg');
	}
	setInterval("nextImg()",2000);
}
function nextImg()
{
	document.getElementById('ImgDiaporama').src='images/accueil/img'+(Math.round(Math.random(1)*(NbImg-1))+1)+'.jpg';
}
