// cf www.acces-pour-tous.net
var newWin = null;
function closeWin(){
  if (newWin != null){
    if(!newWin.closed)
      newWin.close();
  }
}

function gotoUrlBySelect(sname)
{
	var s = document.getElementById(sname);
	var val = s[s.selectedIndex].value;
	if(val !='')
	{
		window.location = val;
	}
}
function popUp(strURL,strType,strWidth,strHeight) {
  closeWin();
  var strOptions="";
  if (strType=="console")
    strOptions="resizable,height="+strHeight+",width="+strWidth;
  if (strType=="fixed")
    strOptions="status,height="+strHeight+",width="+strWidth;
  if (strType=="elastic")
    strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
  if (strType=="elastic2")
    strOptions="location,scrollbars,resizable,height="+strHeight+",width="+strWidth;   
  newWin = window.open(strURL, 'newWin', strOptions);
  newWin.focus();
}

function popupcentree(page,largeur,hauteur,options)

{

var top=(screen.height-hauteur)/2;

var left=(screen.width-largeur)/2;

window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);

}

function redirect(formulaire)
{
//alert(URL);
popUp(formulaire.url.options[formulaire.url.selectedIndex].value,'elastic',670,600)
} 
