var browserType;
if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
var vrai=true;
var faux=false;

function center()
{
if (browserType == "gecko" )
  document.poppedLayer = eval('document.getElementById(\'wait\')');
else if (browserType == "ie")
  document.poppedLayer = eval('document.all[\'wait\']');
else
  document.poppedLayer = eval('document.layers[\'`wait\']');
document.poppedLayer.style.visibility = "visible";
var top_pos = (screen.height - 450)/2;
var left_pos = (screen.width - 300)/2;
document.poppedLayer.style.left = left_pos+'px';
document.poppedLayer.style.top = top_pos+'px';
}

function newfen(name,url,wid,hei)
{
var top_pos = (screen.height - hei)/2;
var left_pos = (screen.width - wid)/2;
var nouv=window.open(url,name,"status=0,resizable=0,scrollbars=1,width="+wid+",height="+hei+",top="+top_pos+",left="+left_pos);
}
function newfenprint(name,url,wid,hei)
{
	var top_pos = (screen.height - hei)/2;
	var left_pos = (screen.width - wid)/2;
	var nouv=window.open(url,name,"status=0,resizable=0,scrollbars=1,width="+wid+",height="+hei+",top="+top_pos+",left="+left_pos);
	nouv.print();
}

function modalWin(name,url,wid,hei)
{
  if (window.showModalDialog)
  {
    window.showModalDialog(url,name,'dialogWidth:'+wid+'px;dialogHeight:'+hei+'px');
  } 
  else
  {
    window.open(url,name,'height='+hei+',width='+wid+',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes');
  }
} 

function hlrow(obj)
{
obj.bgColor='#00bfe0';
}

function dlrow(obj)
{
obj.bgColor='';
}
function dlrow2(obj,col)
{
obj.bgColor=col;
}

function addbookmark(url,title)
{
if (document.all)
  window.external.AddFavorite(url,title)
}    
function AskConfirmation(msg,url)
{
  var agree=confirm(msg);
  if (agree)
	  return window.location=url;
}
function DisplayPhoto(id)
{
  var hei=620;
  var top_pos=(screen.height-hei)/2-50;
  var left_pos=(screen.width-800)/2;
  window.open('http://www.cmas.org/PhotosWeb/DisplayPhoto.asp?id='+id+'&hostname=www.cmas.org','p'+id,"status=0,resizable=0,scrollbars=0,width="+800+",height="+hei+",top="+top_pos+",left="+left_pos);
}