
function access_form_login_reset() { 
if (document.access.login.value=='Pseudo') { document.access.login.value=''; }
}

function access_form_psswd_reset() { 
if (document.access.psswd.value=='Mot de passe') { document.access.psswd.value=''; }
}

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];}
}

function color(target) {
window.open('./select_color.php?target='+target,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0, copyhistory=0, menuBar=0, width=330, height=370'); 
}

function hidestatus() {
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

window.defaultStatus = '';

function set_msg(value) {
  window.status = value; 
  return true;
}

function StartPage(obj) {
  obj.style.behavior='url(#default#homepage)';
  obj.setHomePage('http://www.aumax.com');
}

function check_newsletter_mail() {
 var a,i,j,k,arobase;
 i = 0; k = 0;
 a = document.ml_form.ml_mail.value; 
 for(j = 0; j < a.length - 1; j++)       { if(a.charAt(j) == "@") { i++; arobase = i; } }
 for(j = arobase; j < a.length - 1; j++) { if(a.charAt(j) == ".") { k++; } }
 if(i != 1 || k < 1)                     { alert("Merci de nous communiquer une adresse e-mail valide.");
                                           return false; }
}

function check_r_mail() {
 var a,i,j,k,arobase;
 i = 0; k = 0;
 a = document.r_form.target.value; 
 for(j = 0; j < a.length - 1; j++)       { if(a.charAt(j) == "@") { i++; arobase = i; } }
 for(j = arobase; j < a.length - 1; j++) { if(a.charAt(j) == ".") { k++; } }
 if(i != 1 || k < 1)                     { alert("Merci de nous communiquer une adresse e-mail valide.");
                                           return false; }
}

function check_sub_mail() {
 var a,i,j,k,arobase;
 i = 0; k = 0;
 a = document.sign_form.mail.value; 
 for(j = 0; j < a.length - 1; j++)       { if(a.charAt(j) == "@") { i++; arobase = i; } }
 for(j = arobase; j < a.length - 1; j++) { if(a.charAt(j) == ".") { k++; } }
 if(i != 1 || k < 1)                     { alert("Merci de nous communiquer une adresse e-mail valide.");
                                           return false; }
}

function select(targ,selObj,restore) {
  eval(targ+".location = '"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex = 0;
}

idFadeObjects = new Object();
idFadeTimers  = new Object();

function idFade(object, destOp, rate, delta) {
  if (!document.all)
  return
  if (object != "[object]") { setTimeout("idFade("+object+","+destOp+","+rate+","+delta+")",0);
                              return;
                            }

clearTimeout(idFadeTimers[object.sourceIndex]);
diff = destOp - object.filters.alpha.opacity;
direction = 1;

if (object.filters.alpha.opacity > destOp) { direction = -1; }
delta = Math.min(direction*diff,delta);
object.filters.alpha.opacity += direction*delta;

if (object.filters.alpha.opacity != destOp) { idFadeObjects[object.sourceIndex] = object;
                                              idFadeTimers[object.sourceIndex]  = setTimeout("idFade(idFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
                                            }
}

function show(layer) {
  var layer;

  if (navigator.appName == 'Netscape') { layer=document.layers[layer]; var img = 'clicked'; }
  else                                 { layer=document.all[layer];    var img = 'clicked'; }

  if (layer.style.display!='')         { layer.style.display=''; }
  else                                 { layer.style.display='none'; }

}

function deroul_div(id_div) {
if(document.getElementById(id_div).className=='aff_div')
{document.getElementById(id_div).className='cache_div'}
else if(document.getElementById(id_div).className=='cache_div')
{document.getElementById(id_div).className='aff_div'}
}

// Correctif de l'affichage des images PNG dans IE5.5 et IE6 (transparent pour les autres navigateurs).
// V1.1 par Brice de Villeneuve, http://www.boursica.com/
// Licence : freeware, librement utilisable du moment que vous laissez ces commentaires dans votre source.
// Mettre ce script dans le head et dans les balises IMG ajouter simplement : onload='setpng(this)'
// Si l'image n'est pas visible (display:none par exemple), appeler la fonction juste après l'affichage de l'image
// dans un javascript avec, par exemple, un setpng(document.getElementById('idDeMonImage');
function setpng(img) { if(document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img) {
	imgName=img.src.toUpperCase();
	if(imgName.substring(imgName.length-3,imgName.length)=="PNG") img.outerHTML=
		"<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
		+"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
		+(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
		+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
}}