function glowit(which)
	{
	if(document.all.glowtext[which].filters[0].strength == 3)
		{
		Ndocument.all.glowtext[which].filters[0].strength = 2;
		}
		else
		{
		document.all.glowtext[which].filters[0].strength = 3;
		}
	}
	
function glowit2(which)
	{
	if(document.all.glowtext.filters[0].strength == 3)
		{
		document.all.glowtext.filters[0].strength = 2;
		}
		else
		{
		document.all.glowtext.filters[0].strength = 3;
		}
	}
	
function startglowing()
	{
	if(document.all.glowtext && glowtext.length)
		{
		for(i = 0; i < glowtext.length; i ++)
			{
			eval('setInterval("glowit('+i+')",150)');
			}
		}
		else if(glowtext)
		{
		setInterval("glowit2(0)", 150);	
		}
	}
	
if(document.all)
	{
	window.onload = startglowing;
	}


function intFlash(paze, w, h, flashvars, wmode)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=9,0,45,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+paze+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="'+wmode+'">');
	document.write('<param name="FlashVars" value="'+flashvars+'">');
	document.write('<embed src="'+paze+'" quality="high" wmode="'+wmode+'" FlashVars="'+flashvars+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
	}


function popup_redim_image(img)
	{
	titre = "Ommegang";
	w=open("",'image','width=10,height=10,toolbar=no,scrollbars=no,resizable=no');
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE><script>function closeme() {self.close();}</"+"script></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+9,document.images[0].height+60); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY bgcolor=#000000 onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><a href=javascript:closeme()><IMG src='"+img+"' border=0></a>");
	w.document.write("</BODY></HTML>");
	w.document.close();
	}

function wopen(paze,w,h)
	{
	window.open(paze,"windowname","toolbar=no,location=no,directories=no,status=yes,scrollbars=no,menubar=no,resizable=no,dependent,width="+w+",height="+h)
	}
	
function checksize()
	{
	my_height = document.getElementById('img_detail').height + 130;
	my_width = document.getElementById('img_detail').width + 10; 
	
	window.resizeTo(my_width, my_height);
	window.focus();
	}


var content_req;

function content_loadXMLDoc(url) 
{
if (window.XMLHttpRequest) 
	{
	content_req = new XMLHttpRequest();
	content_req.onreadystatechange = ContentReqChange;
	content_req.open("GET", url, true);
	content_req.send(null);
	} 
else if (window.ActiveXObject) 
	{
	content_req = new ActiveXObject("Microsoft.XMLHTTP");
	if (content_req) 
		{
		content_req.onreadystatechange = ContentReqChange;
		content_req.open("GET", url, true);
		content_req.send(); 
		}
	}
}


function content_loadXMLDoc_post(url, datatosend) 
	{
	if (window.XMLHttpRequest) 
		{
		content_req = new XMLHttpRequest();
		content_req.onreadystatechange = ContentReqChange;
		content_req.open("POST", url, true);
		content_req.send(null);
		} 
		else if (window.ActiveXObject) 
		{
		content_req = new ActiveXObject("Microsoft.XMLHTTP");
		if (content_req) 
			{
			content_req.onreadystatechange = ContentReqChange;
			content_req.open("POST", url, false);
			content_req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			content_req.send(datatosend);
			}
		}
	}


function ContentReqChange() 
	{
	if (content_req.readyState == 1) 
		{
		//alert('1');	
		}
	if (content_req.readyState == 2) 
		{
		//alert('2');	
		}
	if (content_req.readyState == 3) 
		{
		//alert('3');	
		}
	if (content_req.readyState == 4) 
		{
		if (content_req.status == 200) 
			{
			content_text = content_req.responseText;
			} 
			else 
			{
			content_text = "Une erreur s'est produite";
			}
		if (current_request_type == "modify_display")
			{
			document.getElementById(current_lekel_to_modify).innerHTML = content_text;
			}
		}
	}

function loading_ajax()
	{
	my_loading = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=9,0,16,0" width="25" height="25">';
	my_loading += '<param name="movie" value="admin/flash/loading.swf">';
	my_loading += '<param name="quality" value="high">';
	my_loading += '<embed src="admin/flash/loading.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="25" height="25"></embed></object>';
	
	return my_loading;
	}

function modify_display(lekel, kel_form)
	{
	current_lekel_to_modify = lekel;
	//document.getElementById(current_lekel_to_modify).innerHTML = 'Chargement en cours...';
	document.getElementById(current_lekel_to_modify).innerHTML = loading_ajax();
	current_request_type = "modify_display";
	url = kel_form;
	content_loadXMLDoc(url);
	}
