function getCookie(search_name) {
	// note: document.cookie only returns name=value, not the other components
	var tab_cookies = document.cookie.split( ';' );
	for ( i = 0; i < tab_cookies.length; i++ ) {
		// now we'll split apart each name=value pair
		var cookie_tmp = tab_cookies[i].split('=');
		// and trim left/right whitespace while we're at it
		var cookie_name = cookie_tmp[0].replace(/^\s+|\s+$/g, '');
		// if the extracted name matches passed search_name
		if (cookie_name==search_name) {
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if (cookie_tmp.length>1) {
				return unescape( cookie_tmp[1].replace(/^\s+|\s+$/g, '') );
			}
			// cookie is initialized but no value => result = null
			return null;
		}
	}
	return null;
} 

function chargement(){
	if(!getCookie("affichage")){
		document.getElementById('popup').style.display='block';
		document.getElementById('fond').style.display='block';
		document.cookie = "affichage=1"; 
	}
	return null;
}

function pp_close(){
	document.getElementById('popup').style.display='none';
	document.getElementById('fond').style.display='none';
}

