function preloadImages()
{
 
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

 //  Pour vérifier si le champ contient bien une adresse email
function verif(email) {
    var arobase = email.indexOf("@"); var point = email.lastIndexOf(".")
    if((arobase < 3)||(point + 2 > email.length)||(point < arobase+3))
        return false
        return true
}

function testform(nom,prenom,societe,email,site_web) {
    if(nom.value=="") {
        nom.focus();
        return false
    }
	
	if(prenom.value=="") {
        prenom.focus();
        return false
    }
	
	if(societe.value=="") {
        societe.focus();
        return false
    }
	
    if(!verif(email.value)) {
        email.value="";
        email.focus();
        return false
    }
	
	if(site_web.value=="") {
        site_web.focus();
        return false
    }
	
    return true
}

function menu (page, num) {
	window.location="index.php?page=" + page + "&num=" + num;
/*	document.menu.elements['page'].value=page;
	document.menu.elements['num'].value=num;
	document.menu.submit();
*/
}

/*correctif de la transparence des PNG sur IE*/
function IE_CorrectAlpha_PNG() {
for(i=0; i<document.images.length; i++){
img    = document.images[i];
imgExt  = img.src.substring(img.src.length-3, img.src.length);
imgExt  = imgExt.toUpperCase();
if (imgExt == "PNG"){
imgID    = (img.id) ? "id='" + img.id + "' " : "";
imgClass= (img.className) ? "class='" + img.className + "' " : "";
imgTitle= (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
imgStyle= "display:inline-block;" + img.style.cssText;
if (img.align == "left") { imgStyle = "float:left;"  + imgStyle; } else if (img.align == "right"){ imgStyle = "float:right;" + imgStyle; }
if (img.parentElement.href)   { imgStyle = "cursor:hand;" + imgStyle; }       
strNewHTML    = '<span '+imgID+imgClass+imgTitle+' style="width:'+img.width+'px; height:'+img.height+'px;'+imgStyle+';'+'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+img.src+'\', sizingMethod=\'scale\');"></span>';
img.outerHTML = strNewHTML;
i = i-1;
}}}
window.attachEvent("onload", IE_CorrectAlpha_PNG);