/*************************************************************************************************************/
/*                                                                                        			  POPUP  */
/*************************************************************************************************************/

function popupcenter(fichier,largeur,hauteur,param){
	var id=Math.round(Math.random()*100);
	var gauche=(screen.width-largeur)/2;
	var haut=(screen.height-hauteur)/2;
	if(param){
		param='width='+largeur+',height='+hauteur+',top='+haut+',left='+gauche+','+param;
	}else{
		param='width='+largeur+',height='+hauteur+',top='+haut+',left='+gauche;
	}
	window.open(fichier,id,param);
}

function viewDescription(giftId){
	popupcenter('description.php?giftId='+giftId,549,272,'scrollbars=no');
	return(false);
}
/*************************************************************************************************************/
/*                                                                                      PATCH FLASH POUR IE  */
/*************************************************************************************************************/

function isnull(myvar)
{
	if(myvar==null)
		return true;
	else
		return false;
}

var extraParam='?time=' + ((new Date()).getTime());

function bsmflash(classid,codebase,width,height,id,align,movie,quality,bgcolor,wmode,base,flashvars,scale,title,param){
	var argv=bsmflash.arguments;
	if(typeof(argv[15])=='undefined'){
		movie=movie+extraParam+param;
	}
	document.write('<object classid="'+classid+'" codebase="'+codebase+'" width="'+width+'" height="'+height+'" align="'+align+'"');
	if(!isnull(title))
		document.write(' title="'+title+'"');
	if(!isnull(id))
		document.write(' id="'+id+'"');
	if(!isnull(align))
		document.write(' align="'+align+'">');
		document.write(' <param name="allowScriptAccess" value="always" />');
		document.write(' <param name="movie" value="'+movie+'" /><param name="quality" value="'+quality+'" />');
	if(!isnull(bgcolor))
		document.write(' <param name="bgcolor" value="'+bgcolor+'" />');
	if(!isnull(scale))
		document.write(' <param name="scale" value="'+scale+'" />');
	if(!isnull(wmode))
		document.write(' <param name="wmode" value="'+wmode+'" />');
		document.write(' <param name="menu" value="false" />');
		document.write(' <embed src="'+movie+'" menu="false" quality="'+quality+'"');
	if(!isnull(bgcolor))
		document.write(' bgcolor="'+bgcolor+'"');
	if(!isnull(wmode))
		document.write(' wmode="'+wmode+'"');
	if(!isnull(scale))
		document.write(' scale="'+scale+'"');
		document.write(' width="'+width+'" height="'+height+'"');
	if(!isnull(id))
		document.write(' name="'+id+'"');
	if(!isnull(align))
		document.write(' align="'+align+'"');
		document.write(' allowScriptAccess="always"');
		document.write(' type="application/x-shockwave-flash" ');
		document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write(' </object>');
}
