/*function MM_findObj(n, d) { //v3.0
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length ){
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; 
  if(d.images) {
    if(!d.MM_p) 
      d.MM_p= new Array();
    var j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0; i<a.length; i++) {
      if (a[i].indexOf("#") != 0 ) {
	d.MM_p[j]=new Image; 
	d.MM_p[j++].src=a[i];
      }
    }
  }
}

function MM_debug() {
  var max = document.MM_p.length;
  for(i=0; i<max; i++) {
    alert( document.MM_p[i].src );
  }
}


function openFlash( id )
{
  if ( arguments.length>1 ) {
    w = arguments[1];
    h = arguments[2];
  } else {
    w = 600;
    h = 480;
  }
      
  window.open('http://www.afp.com/francais/products/online/dynamic_graphics/flash.phtml?fichier_swf=' +
	      id+'&w='+w+'&h='+h,'actualites','width='+w+',height='+h+',scrollbars=yes,location=No,left=200,top=100,menubar=No,resizable=yes,toolbar=No');	
}

var newWin = null;
function closeWin(){
  if (newWin != null){
    if(!newWin.closed)
      newWin.close();
  }
}

function openPopup(url, type, titre, width, height, top, left) {
  closeWin();
  var options = '';
  if (type=='console') { 
    options='resizable=yes,top='+top+',left='+left+',height='+height+',width='+width;
  } 
  if (type=='fixed') {
    options='status=yes,top='+top+',left='+left+',height='+height+',width='+width;
  } 
  if (type=='elastic') {
    options='toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,top='+top+',left='+left+',height='+height+',width='+width;
  } 
  newWin = window.open(url, titre, options);
  newWin.focus();
} 

function HomePreload() {
  MM_preloadImages( 'imgs/home/savoir_plus_on.gif','imgs/home/b_gros_plan_on.gif','imgs/home/gros_plan_on.gif','imgs/home/b_event_on.gif','imgs/home/event_on.gif','imgs/home/b_sydney_on.gif','imgs/home/sydney_on.gif','imgs/home/b_euro_on.gif','imgs/home/euro_on.gif','imgs/home/b_journal_on.gif','imgs/home/journal_on.gif','imgs/home/b_autres_on.gif','imgs/home/autres_on.gif');
  MM_preloadImages( 'imgs/home/world_af.gif','imgs/home/world_an.gif','imgs/home/world_ap.gif','imgs/home/world_as.gif','imgs/home/world_eu.gif','imgs/home/world_mo.gif' );
  MM_preloadImages( 'imgs/home/t_world_af.gif','imgs/home/t_world_an.gif','imgs/home/t_world_ap.gif','imgs/home/t_world_as.gif','imgs/home/t_world_eu.gif','imgs/home/t_world_mo.gif');
}*/

window.loadListeners = new Array();
window.addLoadListener = function(f) {
  window.loadListeners[window.loadListeners.length]=f;
}

function initPage() {
  for(var n=0;n<window.loadListeners.length;n++){
    if (typeof(window.loadListeners[n]) == 'function') {
      window.loadListeners[n]();
    } 
  }
}

if ( typeof(document.getElementById)!='undefined' ) {
  window.onload = initPage;
}
