//ouvre une fenetre fille retaillable    	
function new_browser(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}


//ouvre une fenetre fille de taille fixe   
function new_browser3(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}	


//ouvre une photo dans une fenetre fille a la taille de la photo
function fenetrephoto2 (repimages, lo, ha, nomimage,id)
{	
	browser=window.open("visualisation.asp?image="+repimages+"&id="+id, nomimage,"resizable=no,scrollbars=auto,toolbar=no,status=no,menubar=no,location=0,directories=no,width="+lo+",height="+ha)
}


//affiche une fenetre d'attente du chargement de la page
function refreshForm(f, t)
{
	var e = document.createElement('h2'); e.innerHTML = t;
	var i = imgWaitSearch; //document.createElement('img'); i.setAttribute('src', '/design/attente.gif');

	var p = f.parentNode; while (p && (p.tagName!='TD') && (p!=null)) p = p.parentNode;
	p.appendChild(e);
	p.appendChild(i);

	f.style.display = 'none';
	f.submit();
}

function addEvent(obj, evType, fn)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(evType, fn, false);
		return true;
	}
	else if (obj.attachEvent)
	{
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	}
	else
	{
		return false;
	}
}

function mailto(m)
{
	new_browser3('mailto.asp?to=' + m, 'mailto', 680, 600);
}