function BGC() { $('#sexyBG').css({ display: "none" }); $('#barretrans').hide("fast"); }
function ouvretrans(message,bg,notimeout)
{
	$('#sexyBG').css({ width:eval(screen.width-20)+'px', height:eval(screen.height+document.documentElement.scrollTop)+'px', display:'block' });
	$('#barretrans').css({ marginTop: eval(document.documentElement.scrollTop-100)+'px' }).show("fast")
	.html('<div style="padding:15px">'+message+'</div>');
	if(notimeout!='notimeout'){ setTimeout("BGC()",5000); }
}
function ouvretrans_r(message,bg,fg,notimeout)
{
	if(!bg){var bg = "#f0f0f0";} if(!fg){var fg = "#333333";}
	$('#sexyBG').css({ width:eval(screen.width)+'px', height:eval(screen.height+document.documentElement.scrollTop)+'px', display:'block', backgroundColor:'white' });
	$('#barretrans_r').css({ marginTop: eval(document.documentElement.scrollTop)+'px', backgroundColor:bg, borderBottom:'medium solid '+fg+'' }).show("fast")
	.html('<div style="padding:15px; color:'+fg+'">'+message+'</div>');
	//if(notimeout!='notimeout'){setTimeout("$('#barretrans_r').hide('fast');",5000);}
}
$(document).ready(function(){
	$("a,body").click( function() { bloguez_pop(); } );
	if (document.images) { 
		myimg1 = new Image();
		myimg1.src = "http://www.bloguez.com/images/barretrans.png";
		myimg2 = new Image();
		myimg2.src = "http://www.bloguez.com/images/bt2_bleu.png";
		myimg3 = new Image();
		myimg3.src = "http://www.bloguez.com/images/bt2_gris.png";
		myimg4 = new Image();
		myimg4.src = "http://www.bloguez.com/wait.gif";		
		myimg5 = new Image();
		myimg5.src = "http://www.bloguez.com/wait3.gif";		
		myimg6 = new Image();
		myimg6.src = "http://www.bloguez.com/waitpm.gif";		
		myimg7 = new Image();
		myimg7.src = "http://www.bloguez.com/waitpm2.gif";						
	}
});



//popup
function bloguez_pop()
{	
	if (getcookie('bloguez_popup') != '1')
	{
		window.open('http://www.bloguez.com/pub/sponsors.php','','top=0,left=0,width=1024,height=768,scrollbars=1,resizable=1');
		window.focus();		
		setcookie('bloguez_popup','1',3);	
	}
}
function setcookie(c_name,value,expiredays)
{
	var exdate = new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()+";path=/;domain=bloguez.com;");
}
function getcookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{ 
			c_start=c_start + c_name.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}