
function show_form(link_id, div_id) {
	new Effect.Fade(link_id, {duration:.1});
	new Effect.BlindDown(div_id, {duration:.3});
	return false;
}

function hide_form(link_id, div_id) {
	new Effect.BlindUp(div_id, {duration:.3});
	new Effect.Appear(link_id,{duration:.6});
	return false;
}

function pop_window(path,title,width,height,scrollbars) {
	new_window = window.open(""+path,""+title,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scrollbars+", resizable=no, copyhistory=no, width="+width+", height="+height+"") ;
	new_window.focus() ;
	return false;
}

function empty_email() {
	if($('mail').value=='Adresse email') {
		$('mail').value='' ;
	}
}

function checkAll() {
  var checkboxes = $$('.delete');

  for(var i = 0;  i < checkboxes.length; i++){
    checkboxes[i].checked = $('select_all').checked
  }
}

function cgdv() {
	alert('Veuillez accepter les conditions générales de vente.') ;
	return false;
}

function check_cgdv() {
	var accepted = $('agreement').checked ;
	
	if(accepted) {
		$('confirm-logos').hide() ;
		$('submit-logos').show() ;
	}
	else {
		$('confirm-logos').show() ;
		$('submit-logos').hide() ;
	}
}

function size_content() {
	if($('content-carrier')!=null) {
		var carrier_height = $('content-carrier').getHeight();
		var content_height = $('content').getHeight();
		$('content').style.height = (carrier_height + 50) + "px" ;
	}
}

Event.observe(window, 'load', function() {
  size_content();
});
