
function popup(txt,w,h){
	if(typeof(w)=='undefined') w=800;
	if(typeof(h)=='undefined') h=600;
	var leftPos=Math.round((screen.availWidth - w)/2);
	var topPos=Math.round((screen.availHeight - h)/2);
	var option='width='+w+',height='+h+',left='+leftPos+',top='+topPos+',resizable,scrollbars';
	var win=window.open('','winhelp',option);
	win.document.open('text/html');
	win.document.write('<html><title>Help</title><style>*{font-family:Verdana;font-size:9px;}</style><body>'+txt+'</table></body></html>');
	win.document.close();
	win.focus();
}

function help(o){
	var txt='<table cellspacing="2" cellpadding="1" border="1">';
	var i=0;
	var value='';
	for(k in o){
		value='';
		try{ value=String(o[k]); }catch(e){ value='undefined';}
//		txt+='<tr><th>'+k+'</th><td>'+value.toString().encodeEntities()+'&nbsp;</td></tr>'+"\n";
		txt+='<tr><th>'+k+'</th><td>'+value+'&nbsp;</td></tr>'+"\n";
	}
	return popup(txt+='</table>');
}


//-> Modifiables :
var vits=4;		//nb de pixels de decalage pour chaque dixieme de seconde.
//-> Ne pas modifier.
var pinit;	//largeur de la zone apparente dans la page (largeur de la zone mere)
var pwidth;	//largeur de la zone à faire defiler (zone cachée comprise)
var idint;	//id de l'interval exécuté.
var p;		//decalage (en pixels)
var o;

function mboucle(){
	if(p>=pwidth) p=-pinit; else p=p+vits;
	o.style.marginLeft=(-p)+'px';
}
function mstart(){ idint=setInterval("mboucle()",100); }
function minit(id){
	if(document.getElementById&&document.getElementById(id)&&document.getElementById(id).parentNode){
		o=document.getElementById(id);
		o.style.position='absolute';
		o.style.left='-20000px';
		if(o.offsetWidth&&o.offsetWidth>0&&o.parentNode){
			pwidth=o.offsetWidth;
			pinit=o.parentNode.offsetWidth;
			p=-pinit;
			o.style.left='';
			o.style.position='static';
			o.onmouseover=function(){ clearInterval(idint); }
			o.onmouseout=function(){ mstart(); }
			mstart();
		}
	}
}