//Modification
//17/02/2003, Cyrille, chgt du nom du fichier de détail de l'actu
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_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_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 MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  f1 = window.open(theURL,winName,features);
  f1.focus();
}

function DateExpiration (DateExp) {

var aujourdhui = new Date(0);
var aujourdhuidate = aujourdhui.getTime();
if (aujourdhuidate > 0)

DateExp.setTime (DateExp.getTime() - aujourdhuidate);

}

// Function FixeCookie
// pour créer ou modifier un cookie
function FixeCookie (nom,valeur,expire,path,domaine,securise) {
document.cookie = nom + "=" + escape (valeur) + ((expire) ? "; expires=" + expire.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domaine) ? "; domain=" + domaine : "") + ((securise) ? "; secure" : "");
}

// Function SupprCookie
// Supprime un Cookie
function SupprCookie (nom,path,domaine) {
if (GetValeurCookie(nom))
{
document.cookie = nom + "=" + ((path) ? "; path=" + path : "") + ((domaine) ? "; domain=" + domaine : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}

// Function ValeurCookie
// Utiliser par GetValeurCookie
function ValeurCookie (Pos) {
var endstr = document.cookie.indexOf (";", Pos);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring (Pos, endstr));
}

// Function GetValeurCookie
// pour récupérer la valeur d'un cookie
function GetValeurCookie (nom) {
var cookielength = document.cookie.length;
var arg = nom + "=";
var arglength = arg.length;
var i = 0;
while (i < cookielength) {
var j = i + arglength;
if (document.cookie.substring(i, j) == arg)

return ValeurCookie (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function popupIndex() {
var expdate = new Date ();

DateExpiration (expdate);
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000)); // expire dans 24H
var MonCookie = GetValeurCookie("MonCookie");

	if (MonCookie==null)
	{
		window.open('assa_abloy.html','assa','width=410,height=350,toolbar=no,menubar=no,statusbar=no,location=no,scrollbars=no');
		FixeCookie("MonCookie", "Vachette", expdate);
	}
}

function checkMail(cible) {
		if (cible.value == "" || cible.value.indexOf("@") == -1)
		{
			window.alert("Entrez un e-mail valide");
			return false;
		}
		else
		{
			return true;
		}
}

function ouvre_detail(indice,position) {
	win1 = window.open(position+'detail_actu.aspx?indice=' + indice,'detail','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=480,height=500');
	win1.focus();
}

//Affiche le calque nommé nomBloc
function montreBloc(nomBloc) {
	if(document.getElementById)
	{
		bloc = document.getElementById(nomBloc);
		bloc.style.visibility = "visible";
	}
	else if (document.all)
	{
   		 bloc = document.all[nomBloc];
  		 bloc.style.visibility = "visible";
  	}
	else if (document.layers)
	{
   		bloc = document.layers[nomBloc];
		bloc.visibility = "show";
  	}
	else
	{
		bloc = null;
  	}
}

//Cache le calque nommé nomBloc
function cacheBloc(nomBloc) {
	if(document.getElementById)
	{
		bloc = document.getElementById(nomBloc);
		bloc.style.visibility = "hidden";
	}
	else if (document.all)
	{
   		 bloc = document.all[nomBloc];
  		 bloc.style.visibility = "hidden";
  	}
	else if (document.layers)
	{
   		bloc = document.layers[nomBloc];
		bloc.visibility = "hide";
  	}
	else
	{
		bloc = null;
  	}
}

function FocusText(BoxName){
	if (BoxName.value == BoxName.defaultValue) BoxName.value = '';
}

function BlurText(BoxName){
	if (BoxName.value == '') BoxName.value = BoxName.defaultValue;
}
function ouvre() {
	f1 = window.open('../../fr-reseau/reseauFranc.aspx','popupFranc','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700,height=450')
	f1.focus();
}

function ouvre_en() {
	f1 = window.open('../../fr-reseau/reseauFranc.aspx?lg=en','popupFranc','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700,height=450')
	f1.focus();
}

function ouvre_infos(id) {
  var Option = 'width=740,height=500';
  var X = (screen.width - 740) / 2 ;
  X -= 10;
  var Y = (screen.height - 500) / 2;
  Y -= 30;
  Option += ',left=' + X + ',screenX=' + X
  Option += ',top=' + Y + ',screenY=' + Y

	f1 = window.open("infos.html?sev="+id, "animflash", Option);
	f1.focus();
}

function ouvre_infos_sev(id) {
  var Option = 'width=740,height=550';
  var X = (screen.width - 740) / 2 ;
  X -= 10;
  var Y = (screen.height - 550) / 2;
  Y -= 30;
  Option += ',left=' + X + ',screenX=' + X
  Option += ',top=' + Y + ',screenY=' + Y

	f1 = window.open("infos_sev.html?sev="+id, "animflash", Option);
	f1.focus();
}
function validEmail(laZone) {
	var Pat = /^[a-z0-9\-][a-z0-9_\-\.]+@[a-z0-9_\.\-]+\.[a-z]{2,3}$/i;
	if (laZone.match(Pat))
		return true;
	else
		return false
}






