function PopupCentrer(page,name,largeur,hauteur,options) 
{
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    window.open(page,name,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
    
function openShadowbox( _page ) {
    Shadowbox.open({player:'iframe',content:_page,height:800,width:950, options:{fadeDuration:0.1, resizeDuration:0.1, animSequence:"sync"}});
}

function openShadowboxAcordeon( _page ) {
    Shadowbox.open({player:'iframe',content:_page,height:800,width:470, options:{fadeDuration:0.1, resizeDuration:0.1, animSequence:"sync"}});
}

function closeShadowbox( _goto ) {
    Shadowbox.close();
    
    if(typeof(_goto) != 'undefined')
        document.location.replace(_goto);
}

function is_mail(mail){
	var filter_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	return filter_email.test(mail);
}

var t_res_preload;
function preload( t_img ) 
{
	t_res = new Array()
	for(var i=0;i<t_img.length;i++)
	{
		var el = new Image();
		el.src = t_img[i];
		t_res.push( el );
	}
}
