$('a[rel="external"]').click(function() {
	window.open($(this).attr('href'));
	return false;
});

function fill_popup(text, target, width, height)
{
	$(target).html('<iframe id="my_iframe" scrolling="no" style="z-index:500; position:fixed; width:'+width+'; height:'+height+';" src="'+text+'"</iframe>');
}

function  not_anymore()
{
	var expDate = new Date();
	expDate.setTime(expDate.getTime() + (365 * 24 * 3600 * 1000));
	
	if ($('#not_anymore:checked').is(':checked'))
	{
        document.cookie = "not_anymore" + "=" + escape("warning=0") + ";expires=" + expDate.toGMTString();
	}
	else
	{
		document.cookie = "not_anymore" + "=" + escape("warning=1") + ";expires=" + expDate.toGMTString();
	}
}

function	set_cookie(name, jour, value)
{
	var expDate = new Date();
	expDate.setTime(expDate.getTime() + (jour * 24 * 3600 * 1000));
	document.cookie = name + "=" + escape(value) + ";expires=" + expDate.toGMTString();
}

function	manage_bar(mod)
{
	if (mod == 0)
	{	
		set_cookie('bar_menu_top', 365, 'bar=0');
		$('#bar_menu').toggle();
		$('#resize_bar').toggle();
	}
	else if (mod == 1)
	{
		set_cookie('bar_menu_top', 365, 'bar=1');
		$('#bar_menu').toggle();
		$('#resize_bar').toggle();
	}
}


