function add_out(id)
{
document.action.location.href = 'add_out.php?id='+id;
}


function SwitchMenu(obj){
	if(document.getElementById){
	
	var el = document.getElementById(obj);
	
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
	
		if(el.style.display != "block"){
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}


function vote(id)
{
window.open('/vote.php?id='+id+'','Vote','width=200, height=100, scrollbars=no, location=no, status=no, menubar=no, toolbar=no, resizable=no');
}

function fiche_id(id)
{
window.open('/liste_membres.php?id='+id+'','Fiche','width=450, height=350, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no, resizable=no');
}

function dead(id, url)
{
window.open('/dead.php?id='+id+'&url='+url,'Dead','width=200, height=100, scrollbars=no, location=no, status=no, menubar=no, toolbar=no, resizable=no');
}

function comment(id)
{
window.open('/commentaire.php?id='+id+'','Commentaire','width=460, height=350, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no');
}

function connexion_form(objet)
{
 window.open('/membres_connexion_form.php?objet='+objet+'', 'Connexion_membres','width=300, height=320, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no');
}

function alert_mail(nb)
{
 window.open('/message_alert.php?nb='+nb+'', 'Newmail','width=300, height=320, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no');
}

function liste_points_all()
{
 window.open('/liste_points_all.php', 'Classement','width=250, height=450, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no');
}

function move_favoris(id, action)
{
 frames['action'].location.href = '/move_favoris.php?id_jeux='+id+'&action='+action;
}



var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all


function Change_objet(nObjet,nContenu) {
  // nObjet = le nom de l'objet
  // nContenu = Le contenu affiche dans l'objet

  if (ns4) {
    document.eval(nObjet).document.write(nContenu);
    document.eval(nObjet).document.close();
  }
  else if (ns6) {
    document.getElementById(nObjet).innerHTML = nContenu;
  }
  else if (ie4) {
    eval(nObjet).innerHTML = nContenu;
  }
}


function EcrireCookie(nom, valeur)
{

var argv=EcrireCookie.arguments;
var argc=EcrireCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");

}


function getCookieVal(offset)
{

var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function LireCookie(nom)
{

var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen)
{

var j=i+alen;
if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;


}
return null;
}



function EffaceCookie(nom)
{

date=new Date;
date.setFullYear(date.getFullYear()-1);
EcrireCookie(nom,null,date);
alert('Protection des mineurs active!');
}


function liste_membres(type)
{
window.open('/liste_membres.php?type='+type+'','Liste','width=450, height=400, scrollbars=yes, location=no, status=no, menubar=no, toolbar=no, resizable=no');
}

function insert(pseudo)
{
 if(form.dest_msg.value)
 { form.dest_msg.value = form.dest_msg.value+";"+pseudo; }
  else
 { form.dest_msg.value = pseudo; }
}

function jl(link)
{
  document.location.href=link;
}

function jl_b(link)
{
  window.open(link);
}

function count_clic(id)
{
 addclic.location.href = 'out.php?id='+id;
}