/*******************************************************************************
* This function emulate the css "position: fixed" for IE and Firefox 
* by adding a top margin related to the scroll position.
* Need the Prototype library 
*******************************************************************************/
function emulFixedPos(eltId)
{
  elt = $(eltId);
    if(document.all){
      // version Internet explorer
      window.onscroll = function() {
        //test the object exist
        if(elt){
          scrollOffset = Position.realOffset(document.body);
          Element.setStyle( elt , { marginTop : scrollOffset[1]+'px'} );
        }
      } 
    }
    else{
      // version Firefox
      Event.observe(document, 'scroll', function(event){ 
        //test the object exist
        if(elt){     
          scrollOffset = Position.realOffset(document.body);
          Element.setStyle( elt , { marginTop : scrollOffset[1]+'px'} );
        }
        Event.stop(event);
      });
  }
}
