
function none() { return; }

function getRef(id)
{   

var obj;
  if (document.getElementById&&!document.all) {
    obj = document.getElementById(id);
	} else if (document.all) { //IE 4 et +
		obj = eval('document.all.'+id);
	} else {
	}
  return obj;
}


// Encodage de l'URL
function urlencode (str) {
    var newstr;
    newstr = str.replace (/&/g, "%26");
    return newstr;
}

	
// Imprimer
function vprint () {
  from = ""+self.location+"";
	motif = /\?/;
	if (from.search(motif)==-1)
		var url = from+"?print=1";
	else
		var url = from+"&print=1";
//  openMini2 (url,380,465);
	var options = "toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=650,height=500";
	var name = "POPUP";
	var popWin = window.open(url, name, options);
	popWin.focus();
}
  
function confirmAction (action, id) {
  from = ""+self.location+"";
  from = urlencode(from);
  if(confirm("Etes-vous sûr ?"))
    self.location = home+page+"?page=action&action="+action+"&id="+id+"&from=" + from;
}  
function confirmAlert (action, id) {
  from = ""+self.location+"";
  from = urlencode(from);
  if(confirm("Avertir les modérateurs ?"))
    self.location = home+page+"?page=action&action="+action+"&id="+id+"&from=" + from;
}  
function confirmUnalert (action, id) {
  from = ""+self.location+"";
  from = urlencode(from);
  if(confirm("Supprimer l'alerte ?"))
    self.location = home+page+"?page=action&action="+action+"&id="+id+"&from=" + from;
}  
  
  
  
function submitonce(theform) {
 if (document.all || document.getElementById) {
  // hunt down "submit" and "reset"
  for (i=0;i<theform.length;i++) {
   var tempobj=theform.elements[i];
   if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") {
    tempobj.disabled=true;
   }
  }
 }
}



function askConfirm (libelle, url) {
  from = ""+top.location+"";
  from = urlencode(from);
  if(confirm(libelle))
//    top.location = url;
    top.location = url+"&from=" + from;
}  

function viewPhoto (photo,width,height) {
	var url = "/photo.php?photo="+photo;
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=no,copyhistory=no,width="+(width+25)+",height="+(height+15);
	var name = "POPUP";
	var popWin = window.open(url, name, options);
	popWin.focus();



}



