function AddBook()
{
	window.external.addfavorite("http://<?php echo $urlconf;?>","<?php echo $nomconf; ?>, votre site de <?php echo $themeconf; ?>.");
}

function scbg(objRef, state)
{
	objRef.style.backgroundColor = (1 == state) ? '#EEEEEE' : '#FFFFFF';
	return;
}

function rose(objRef, state)
{
	objRef.style.backgroundColor = (1 == state) ? '#FF00CC' : '#F1F1F1';
	return;
}

function visited(objRef, state)
{
	objRef.style.backgroundColor = (1 == state) ? '#E9E9E9' : '#FFFFFF';
	return;
}

function gris(objRef, state)
{
	objRef.style.backgroundColor = (1 == state) ? '#909090' : '#F1F1F1';
	return;
}

function ShowHide(DivToShow, DivToHide)
{
   document.getElementById(DivToHide).style.display = "none";
   document.getElementById(DivToShow).style.display = "block";
}

function ShowHideLayer2(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] : document.getElementById ?  document.getElementById(szDivID).style : document.all[szDivID].style;
   obj.display = document.layers ? ( iState ? "none" : "block") : (iState ? "none" : "block");
}

function doPopUp(strFileName, intWidth, intHeight, strScroll)
{
	var parametres = 'TTOOLBAR=NO,LOCATION=NO,DIRECTORIES=NO,STATUS=NO,MENUBAR=NO,SCROLLBARS=YES,RESIZABLE=YES,TOP=80,LEFT=150,COPYHISTORY=YES,WIDTH='+ intWidth +',HEIGHT='+ intHeight;
	window.open(strFileName, "windowname", parametres);
}

function ShowHideLayer(szDivID, iState)
{
   var obj = document.layers ? document.layers[szDivID] : document.getElementById ? document.getElementById(szDivID).style : document.all[szDivID].style;
   obj.visibility = document.layers ? ( iState ? "show" : "hide") : (iState ? "visible" : "hidden");
}

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

function MM_reloadPage(init)
{
  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);

function MM_swapImgRestore()
{
  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()
{
  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)
{
  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()
{
  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 note()
{
  if (document.contact.subject.value == 'Confirmation') { ShowHideLayer2('note',0); }
  else { ShowHideLayer2('note',1); }
}

function sample() {
  if (document.contact.subject.value == 'sample') {
    alert('Echantillons\n\nNous vous remercions de l\'intérêt que vous portez à notre site.\n\nCependant, les cadeaux que nous offrons à nos membres sont offerts par nos partenaires. Seuls ces derniers pourraient décider d\'un tel geste. Nous espèrons que vous comprendrez que nous ne pouvons dès lors donner suite à votre requète.\n\nNous vous souhaitons néanmoins bonne chance dans la poursuite de vos démarches.');
    document.contact.mail.focus();
    return false;
  }
  return true;
}

