hauteurImage = 372;
largeurImage = 690;
//lien="http://www.solware.fr";
lien="javascript://";

//document.write('<div id="affichageModal" style="position: absolute; top:0; left:0;z-index: 98; height:100%; width:100%; background-color:gray; filter:alpha(opacity=15); -moz-opacity:.15; opacity:.15;"></div>');
document.write('<div id="affichageModalIn" style="position: absolute; top:0; left:0; width:690; z-index: 99;" align="center">');
document.write('<a href="'+lien+'" onMouseOver="clearTimeout(t);" onMouseOut="defineTimeout();" onclick="document.getElementById(\'affichageModalIn\').style.display=\'none\';"><img src="annonce_SolwareLife.png" width="690" height="372" border="0" name="voeux2012"></a>');
document.write('</div>');
var choixvoeux=1;

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";

}

function inverseImage() {
  if (choixvoeux==1) {
		document.images['voeux2012'].src="annonce_SolwareAuto.png";
		choixvoeux=2;
	}
	else {
		document.images['voeux2012'].src="annonce_SolwareLife.png";
		choixvoeux=1;
	}
	defineTimeout();
}

function defineTimeout() {
	t=setTimeout("inverseImage()", 4000);
}

dimension_body();
defineTimeout();
