function agrem(agr, lan)
{
 loc = 'menu.php?id=17&formation=e&agrement='+agr+'&lang='+lan;
 window.location = loc;
}
function agre(agr, lan)
{
 loc = 'menu.php?id=17&formation=e&agrement='+agr+'&lang='+lan;
 window.location = loc;
}
function agremf(agr, lan)
{
 loc = 'menu.php?id=44&formation=e&agrement='+agr+'&lang='+lan;
 window.location = loc;
}
function agref(agr, lan)
{
 loc = 'menu.php?id=44&formation=e&agrement='+agr+'&lang='+lan;
 window.location = loc;
}
function openmail(){
  fenmail = window.open ("frecom.htm","fenmail","width=570,height=420,scrollbars=yes,toolbar=no, menubar=no,location=no,resizable=no,directories=no,status=no");
}

function verifForm(formulaire)
{
if ((formulaire.email.value.length < 6) || (formulaire.email.value == "") || (formulaire.email.value.indexOf('@') == -1) || (formulaire.email.value.indexOf('.') == -1))
alert('Adresse e-mail invalide !!');
else
formulaire.submit();
}

function ShowOrHide(d1, d2) {
	  if (d1 != '') DoDiv(d1);
	  if (d2 != '') DoDiv(d2);
}
function DoDiv(id) {
	  var item = null;
	  if (document.getElementById) {
		item = document.getElementById(id);
	  } else if (document.all){
		item = document.all[id];
	  } else if (document.layers){
		item = document.layers[id];
	  }
	  if (!item) {
	  }
	  else if (item.style) {
		if (item.style.display == "none"){ item.style.display = ""; }
		else {item.style.display = "none"; }
	  }else{ item.visibility = "show"; }
}
function ouvrirDetails(agr) {
		Details = window.open ("./details_fr.php?agr="+agr,"Details","width=400,height=300,scrollbars=yes");
		Details.moveTo(300,240);
}
function ouvrirDetailsn(agr) {
		Details = window.open ("./details_nl.php?agr="+agr,"Details","width=400,height=300,scrollbars=yes");
		Details.moveTo(300,240);
}
function oDetails(agr,ecol) {
		Details = window.open ("./details_nl.php?agr="+agr+"&ecole="+ecol,"Details","width=400,height=300,scrollbars=yes");
		Details.moveTo(300,240);
}
function oDetailsf(agr,ecol) {
		Details = window.open ("./details_fr.php?agr="+agr+"&ecole="+ecol,"Details","width=400,height=300,scrollbars=yes");
		Details.moveTo(300,240);
}
function oimage(im,we,he,al) {
		Details = window.open ("./image.php?im="+im+"&al="+al+"&we="+we+"&he="+he,"Pic","width="+we+",height="+he+",Resizable=yes,scrollbars=no");
		Details.moveTo(300,240);
		//Details = window.open ("./image.php?im="+im+"&al="+al+"&we="+we+"&he="+he,"Pic","width="+we+",height="+he+",scrollbars=no");
}
function SetCookie (name,value,expires,path,domain,secure) {
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}

function getCookie(cookieName)
{
var cookieValue = null;
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName != -1)
{
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos != -1)
{
cookieValue = unescape(document.cookie.substring(posValue, endPos));
}
else
{
cookieValue = unescape(document.cookie.substring(posValue));
}
}
return cookieValue;
}
function popup(lang) 
{ 
popup = window.open("./intranet/popup_"+lang+".php","_blank","width=500,height=350,status=1,toolbar=no,resizable=yes,scrollbars=yes");
popup.moveTo(300,240);
}
function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"search","width=800,height=600,status=1,toolbar=no,resizable=yes,scrollbars=yes");
}
function centerpopup(page,name,widther,heighter,options) {
  var top=(screen.height-heighter)/2;
  var left=(screen.width-widther)/2;
popup = window.open(page,name,"width="+widther+",height="+heighter+","+options);
popup.moveTo(left,top);

}


