
  function getObj(name){
    if (document.getElementById){
      this.obj = document.getElementById(name);
      this.style = document.getElementById(name).style;
    }
    else if (document.all){
      this.obj = document.all[name];
      this.style = document.all[name].style;
    }
    else if (document.layers){
       this.obj = document.layers[name];
       this.style = document.layers[name];
    }
  }
  
  function HideFrame(name){
    DisplayFrame(name,'100%','*');
  }
  
  function DisplayFrame(name,width1,width2){
    if(window.parent.length > 0){
      tFrame = window.parent.document.getElementById(name); 
      tFrame.cols= width1 + ',' + width2;
    }
  }

  function Reduire(){
    var oformulaire = new getObj('odivRight');
    oformulaire.style.display ='none'
    var width1 = CT_FRAME_MINI;                
    var width2 = '';
    if(!IsIE()) width2 = (window.parent.innerWidth - width1)  + 'px';
    DisplayFrame('TopFrame',width2,width1) + 'px';
  }
  
  function Agrandir(){
    var oformulaire = new getObj('odivRight');
    oformulaire.style.display ='block';
    var width1 = CT_FRAME_OPEN;                
    width2 = '';
    if(!IsIE()) width2 = (window.parent.innerWidth - width1) + 'px';                
    DisplayFrame('TopFrame',width2,width1 + 'px');
  }
  
  function CloseFrame(){
    var oformulaire = new getObj('odivRight');
    oformulaire.style.display ='block';
    var width1 = 0;                
    width2 = '';
    if(!IsIE()) width2 = (window.parent.innerWidth - width1) + 'px';                
    DisplayFrame('TopFrame',width2,width1 + 'px');
  }
  
  
  
  function OnResizeFrame(){
    var oformulaire = new getObj('odivRight');
    if(oformulaire.style.display == 'block'){
      Agrandir();
    }
    else{
      Reduire();
    }
  }

  function doValidate(f){
    f.elements['btnSend'].value='En cours..';
    f.elements['btnSend'].disabled=true;
  }
  
  CSAg = window.navigator.userAgent; 
  CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
  function IsIE() { return CSAg.indexOf("MSIE") > 0;}
  CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false;

