function SelectAll( formulaire )
{
len = formulaire.elements.length;
var i=0;
for( i = 0; i < len; i++)
{
  if ( formulaire.elements[i].type=='checkbox'
	   && formulaire.elements[i].name != 'copie')
  {
	formulaire.elements[i].checked = true;
  }
}
}

function Inverser( formulaire )
{
len = formulaire.elements.length;
var i=0;
for( i=0; i<len; i++)
{
  if ( formulaire.elements[i].type=='checkbox'
	   && formulaire.elements[i].name != 'copie')
  {
	formulaire.elements[i].checked = !formulaire.elements[i].checked;
  }
}
}

function phpWGOpenWindow(theURL,winName,features) 
{
 
  window.open(theURL,winName,features);
}

function PopupCentrer(page,largeur,hauteur,options,name) {
  
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  ff=window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
   if(ff) {
    ff.opener.name=name
 }

}

function PopupCentrerPicture(page,largeur,hauteur,options) {
  window.close();
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

function test(page,largeur,hauteur,options) {
  window.parent.close();

}

		function quick_search(url)
		{
			cmd = document.getElementById('search_allwords').value;
			
			//alert('http://126.120.120.2:81/bpcom/co.php?'+cmd);
			window.location.replace(url+cmd);
			
		}
		
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.login.value == "")
  {
    alert("Please enter a login");
    theForm.login.focus();
    return (false);
  }

    if (theForm.mail_address.value == "")
  {
    alert("Please enter a mail address");
    theForm.mail_address.focus();
    return (false);
  }
  
 
  if (theForm.register_firstname.value == "")
  {
    alert("Please enter a firstname");
    theForm.register_firstname.focus();
    return (false);
  }
  
    if (theForm.register_lastname.value == "")
  {
    alert("Please enter a lastname");
    theForm.register_lastname.focus();
    return (false);
  }
  
  return (true);
}
