document.write( '<scr'+'ipt type="text/javascript" language="JavaScript" src="/commun/js/prototype.js"></scr'+'ipt>' );

function afficher_reponse( ma_requete )
{
	alert( ma_requete.responseText );
}

function mettre_a_jour( continent )
{
	var ma_date = new Date().getTime();

	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest(); 
	else if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	else 
		alert( "erreur" );
	xhr_object.open("GET", "/commun/tests/export_noel/decompte.php?continent=" + continent.replace( "&eacute;", "e" ) + "&date=" + ma_date, false); 
	xhr_object.send(null); 
	if(xhr_object.readyState == 4)
		$( 'carte_voeux_nombre' ).innerHTML = xhr_object.responseText;
	else
		$( 'carte_voeux_nombre' ).innerHTML = 1;

	$( 'carte_voeux_continent' ).innerHTML = continent;
    Element.show( 'carte_voeux_resultat' );
}
function ouvrir()
{
	if( $( 'carte_voeux' ) == null )
		{
		var contenu =
			'	<div id="carte_voeux" style="position:absolute; left: ' + ((document.body.offsetWidth-452) /2) + 'px; top: 100px; z-index:2; height:350px; width:452px;display:none;">' +
			'		<table width="100%" cellpadding="0" cellspacing="0" border="0">' +
			'			<tr>' +
			'				<td style="background-image: url(/commun/tests/export_noel/images/header2.gif);" align="right">' +
			'					<a href="#" onclick="Element.hide( \'carte_voeux\' );return false;" style="color: #FFFFFF; font-size: 9pt; text-decoration: none; font-family: arial;">Fermer X</a>&nbsp;&nbsp;&nbsp;' +
			'				</td>' +
			'			</tr>' +
			'			<tr>' +
			'				<td style="text-align:center; border-left:1px solid #0155AB; border-right:1px solid #0155AB; height:300px;">' +
			'					<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="themovie" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="450" height="300">' +
			'						<param name="movie" value="/commun/tests/export_noel/images/carte_voeux.swf">' +
			'						<param name="quality" value="high">' +
			'						<param name="swliveconnect" value="true">' +
			'						<embed src="/commun/tests/export_noel/images/carte_voeux.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" type="application/x-shockwave-flash" name="themovie" width="450" height="300" swliveconnect="true"></embed>' +
			'					</object>' +
			'				</td>' +
			'			</tr>' +
			'			<tr>' +
			'				<td valign="middle" align="center" style="background-image:url(/commun/tests/export_noel/images/footer_off.gif); background-repeat:no-repeat; height:24px; width:452px; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#662327;">' +
			'					<span id="carte_voeux_resultat" style="display: none;">Vous êtes <span style="font-weight:bold;" id="carte_voeux_nombre">22</span> % à avoir choisi <span id="carte_voeux_continent">l\'Asie</span></span>' +
			'				</td>' +
			'			</tr>' +
			'		</table>' +
			'	</div>';
	
		new Insertion.Bottom( document.body, contenu );
		}

	Element.show( 'carte_voeux' );
}

ma_date = new Date();
if( (( ma_date.getYear() == 2006 ) || ( ma_date.getYear() == 106 )) && ( ma_date.getDate() < 15 ) ) 
	setTimeout( 'ouvrir();', 5000 );
