function PopupImage(img) 
{ 
	titre="Backbone Paramoteurs - Esprit d'évasion"; 
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no'); 
	w.document.write('<html><head><title>'+titre+'</title></head>'); 
	w.document.write('<script language="javascript" type="text/javascript">function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+80); window.focus();} else { setTimeout("checksize()",250) } }</script>'); 
	w.document.write("<body onload='checksize()' onBlur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Icarius Aerotechnics'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</body></html>");
	w.document.close(); 
} 
function Img_preload ()
{

	Img_preload_src = new Array();

	for (var i=0; i < Img_preload.arguments.length; i++)
   {
	   Img_preload_src[Img_preload.arguments[i]] = new Image();
	   Img_preload_src[Img_preload.arguments[i]].src = Img_preload.arguments[i];
   }
}
sfHover = function() 
{
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
function bbcode(bbdebut, bbfin)
{
	var input = window.document.formulaire.message;
	input.focus();
	if(typeof document.selection != 'undefined')
	{
		var range = document.selection.createRange();
		var insText = range.text;
		range.text = bbdebut + insText + bbfin;
		range = document.selection.createRange();
		if (insText.length == 0)
		{
			range.move('character', -bbfin.length);
		}
		else
		{
			range.moveStart('character', bbdebut.length + insText.length + bbfin.length);
		}
		range.select();
	}
	else if(typeof input.selectionStart != 'undefined')
	{
		var start = input.selectionStart;
		var end = input.selectionEnd;
		var insText = input.value.substring(start, end);
		input.value = input.value.substr(0, start) + bbdebut + insText + bbfin + input.value.substr(end);
		var pos;
		if (insText.length == 0)
		{
			pos = start + bbdebut.length;
		}
		else
		{
			pos = start + bbdebut.length + insText.length + bbfin.length;
		}
		input.selectionStart = pos;
		input.selectionEnd = pos;
	}


	else
	{
		var pos;
		var re = new RegExp('^[0-9]{0,3}$');
		while(!re.test(pos))
		{
			pos = prompt("insertion (0.." + input.value.length + "):", "0");
		}
		if(pos > input.value.length)
		{
			pos = input.value.length;
		}
		var insText = prompt("Veuillez taper le texte");
		input.value = input.value.substr(0, pos) + bbdebut + insText + bbfin + input.value.substr(pos);
	}
}

function smilies(img)
{
	window.document.formulaire.message.value += '' + img + '';
}
function affiche(id)
{
	var d = document.getElementById(id);
	d.style.display = "block";
}
function cache(id)
{
	var d = document.getElementById(id);
	d.style.display = "none";
}
