function $(i){
	return document.getElementById(i);
}
function formSelectValue(id){
	for(var i=0; i<id.options.length; i++)
		if(id.options[i].selected==true)
			return id.options[i].value;
}
function hide(id) {
	if(!id){return;}
	id.style.visibility = "hidden";
	id.style.display = "none";
}
function show(id) {
	if(!id){return;}
	id.style.visibility = "visible";
	id.style.display = "block";
}
function showTable(id){
	id.style.visibility = "visible";
	id.style.display = "table-row";
}
function inverse(id) {
	if(!id) return;
	if(id.style.visibility == "visible")    hide(id);
	else                                    show(id);
}
function getIntPx(s) {
	if(s.indexOf('px')>0)
	return Math.floor(s.substring(0, s.indexOf('px')));
}

function profil(e,pseudo){
	if(!e) e=window.event;
	var winProfil = $('profil');
	$('profilView').innerHTML='<img src="/images/loading.gif" alt="chargement" style="margin:20px;" />';
	winProfil.style.top = (document.documentElement.scrollTop+e.clientY+9)+'px';
	winProfil.style.left = (e.clientX-197)+'px';
	show(winProfil);
	var xhr = new XHRConnection();
	xhr.setRefreshArea('profilView');
	xhr.sendAndLoad('/v2/ajax-profil.php?pseudo='+pseudo,'GET');
}
function closeAll(e){
	if(!e) e=window.event;
	var obj = (e.target) ? e.target : e.srcElement;
	if(obj.tagName!='A')
		hide($('profil'));
}
function addFav()
{ if(navigator.appName != "Microsoft Internet Explorer" ){
window.sidebar.addPanel(document.title,location.href,"");}else window.external.AddFavorite(location.href, document.title);
}