function startGallery() {
				
				var myGallery = new gallery($('myGallery'), {
					timed: true,
					showArrows: false,
					showInfopane: false,
					showCarousel: false,
					embedLinks: false,
					delay: 5000
				});
				document.gallery = myGallery;
			}
			
			window.addEvent('domready', function(){
				startGallery();
			});
function testfunction (id, id2, opacStart, opacEnd, millisec) {
	opacity(id, opacStart, opacEnd, millisec);
	opacity(id2, opacEnd, opacStart, millisec);
}
function opacity(id, opacStart, opacEnd, millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 0;
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) type="OP";
	if (document.all) type="IE";
	if (document.layers) type="NN";
	if (!document.all && document.getElementById) type="MO";
    if(opacStart > opacEnd) {
		
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
			
        }

    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
	if (opacity == 0) { object.visibility = 'hidden'; document.getElementById(id).className = "invisible";}
	if (opacity == 100) { object.visibility = 'visible'; document.getElementById(id).className = "opaque";}
} 

function SendMailForm()
{
FirstName=document.contactform.firstname.value;
LastName=document.contactform.lastname.value;
Company=document.contactform.company.value;
Email=document.contactform.emailad.value;
Phone=document.contactform.phone.value;
Country=document.contactform.country.value;
Subject=document.contactform.subject.value;
Message=document.contactform.message.value;


  if ((FirstName=="") || (FirstName==" ")){
	alert("Missing first name.");
	document.contactform.firstname.focus();
	return false;
	} // Firstname end
  if ((LastName=="") || (LastName==" ")){
	alert("Missing last name.");
	document.contactform.lastname.focus();
	return false;
	} // Lastname end
  if ((Company=="") || (Company==" ")){
	alert("Missing Company name.");
	document.contactform.company.focus();
	return false;
	} // Lastname end
  // Verification de l'adresse Email (champ Email du formulaire "contactform")
	var i,j,k,arobase;
	i=0;
	k=0;
	for(j=0; j<Email.length-1;j++)
	{
		if(Email.charAt(j)=="@")
		{ i++; arobase=i; }
	}
	for(j=arobase; j<Email.length-1;j++)
	{
		if(Email.charAt(j)==".")
			k++;
	}
	if(i!=1 || k<1)
	{
		alert("The E-mail address is invalide.");
		document.contactform.emailad.focus();
		return false;
	} // Email end
  if ((Phone=="") || (Phone==" ")){
	alert("Missing phone number.");
	document.contactform.phone.focus();
	return false;
	} // Phone end
  if ((Country=="") || (Country==" ")){
	alert("Missing country.");
	document.contactform.country.focus();
	return false;
	} // Country end
  if ((Subject=="") || (Subject==" ")){
	alert("Missing subject.");
	document.contactform.subject.focus();
	return false;
	} // Subject end
  if ((Message=="") || (Message==" ")){
	alert("Missing message.");
	document.contactform.message.focus();
	return false;
	} //Message end
document.contactform.submit();
}
function ouvre_popup(page, width, height) {
       window.open(page,"Activities","menubar=no, status=no, scrollbars=no, menubar=no, width=" + width + ", height=" + height);
}
