hauteurImage = 450;
largeurImage = 690;
lien="http://www.solware.fr/life";
//lien="javascript://";

document.write('<div id="affichageModal" style="position: absolute; top:0; left:0;z-index: 98; height:128px; width:100%; background-color:gray; filter:alpha(opacity=15); -moz-opacity:.15; opacity:.15; display:none;"></div>');
document.write('<div id="affichageModalIn" style="position: absolute; top:0; left:0; width:690; z-index: 99; display:none;" align="center"><a href="'+lien+'" onclick="document.getElementById(\'affichageModalIn\').style.display=\'none\';"><img src="voeux-SWS.png" width="690" height="450" border="0"></a></div>');

function hauteur_body(){
	var viewportheight;
	
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerHeight != 'undefined')	{	viewportheight = window.innerHeight	}
	
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined'
		&& typeof document.documentElement.clientWidth !=
		'undefined' && document.documentElement.clientWidth != 0)	{ viewportheight = document.documentElement.clientHeight }
	
	// older versions of IE
	else { viewportheight = document.getElementsByTagName('body')[0].clientHeight	}

	return viewportheight;
}

function largeur_body(){
	var viewportwidth;
	
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerWidth != 'undefined')	{	viewportwidth = window.innerWidth	}
	
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined'
		&& typeof document.documentElement.clientWidth !=
		'undefined' && document.documentElement.clientWidth != 0)	{ viewportwidth = document.documentElement.clientWidth	}
	
	// older versions of IE
	else { viewportwidth = document.getElementsByTagName('body')[0].clientWidth	}

	return viewportwidth;
}

function dimension_body () {

	hauteurBody = hauteur_body();
	largeur_body = largeur_body();
	affichageModalInTop = (hauteurBody - hauteurImage)/2;
	affichageModalInLeft = (largeur_body - largeurImage)/2;
	document.getElementById("affichageModalIn").style.top = affichageModalInTop+"px";
	document.getElementById("affichageModalIn").style.left = affichageModalInLeft+"px";

}
dimension_body();
