if(document.body)
{var largeur = (document.body.clientWidth - (126 + 25 + 340));
var largeur1 = parseInt((document.body.clientWidth - 55) / 3);}
else if (screen)
{var largeur = (screen.width - (126 + 25 + 340));
var largeur1 = parseInt((screen.width - 55) / 3);}
else if (window)
{var largeur = (window.innerWidth - (126 + 25 + 340));
var largeur1 = parseInt((window.innerWidth - 55) / 3);}

if (largeur1 >305) {largeur1 = 305;
var largeur2 = 335;
var largeur3 = 330;}
else {var largeur2 = largeur1;
var largeur3 = largeur1 - 5;}

document.write('<style type="text/css">.co {width:' + largeur1 + 'px;}</style>');
document.write('<style type="text/css">.co img {width:' + largeur1 + 'px;}</style>');

var agent1 = (navigator.userAgent.toLowerCase().indexOf("msie"));

if (agent1 =="-1") {document.write('<style type="text/css">#expert_comptable-comptabilite {width:' + largeur + 'px;}</style>');}
else {document.write('<style type="text/css">#expert_comptable-comptabilite {width:66%;}</style>');}
document.write('<style type="text/css">#devis_comptabilite {width:' + largeur2 + 'px;}</style>');
document.write('<style type="text/css">#lettre_de_mission_comptabilite_en_ligne, #lettre_de_mission_comptabilite_en_ligne1, #lettre_de_mission_comptabilite_en_ligne2, #lettre_de_mission_comptabilite_en_ligne3, #lettre_de_mission_comptabilite_en_ligne4, #lettre_de_mission_comptabilite_en_ligne5, #devis_comptabilite_comptabilite, #devis_comptabilite_comptabilite1, #devis_comptabilite_comptabilite2, #devis_comptabilite_comptabilite2, #devis_comptabilite_comptabilite1, #devis_honoraires_long, #lettre_de_mission_comptabilite_en_ligne1, #devis_honoraires, #devis_honoraires1, #devis_honoraires2, #devis_honoraires- {width:' + largeur3 + 'px;}</style>');

/*if(window.parent.length!=0) {window.top.location.replace(document.location.href);}*/
var date_exp = new Date (); //aujourd'hui
date_exp.setTime (date_exp.getTime() + (100 * 24 * 60 * 60 * 1000));

var erase = false;

function LitCookie2(nom) 
{var mon_cookie = document.cookie;
var debut = mon_cookie.indexOf(nom+"=");
var taille = debut + nom.length + 1;
if ((!debut) && (nom != mon_cookie.substring(0,nom.length))) return null;
if (debut == -1) return null;
var fin = mon_cookie.indexOf(";",taille);
if (fin == -1) fin = mon_cookie.length;
return unescape(mon_cookie.substring(taille, fin));}
function LitCookie(nom) 
{    var i = 0;
      var j = 0;
      var tot = 11;
      var debutActivite = 0;
      var ecart = 0;
      var test = "";
      var donnees = document.cookie;
      var cookieLenMax = donnees.lengh;            
      while ((i < cookieLenMax) || (j==12))
      {
      if (donnees.charAt(i)==":") {
          j=j+1;
          var ecart = i;
        }
      i=i+1;
      }
      debutActivite = i - ecart;
      return unescape(donnees.substring(debutActivite,debutActivite + ecart));
      alert(debutActivite);
      alert(ecart);
      test=unescape(donnees.substring(debutActivite,debutActivite + ecart));
      alert(test);}

function EcritCookie(nom, valeur, expire, chemin, domaine, secure)
{document.cookie = nom + "=" + escape(valeur) + ( (expire) ? ";expires=" +
expire.toGMTString() : "") + ( (chemin) ? ";path=" + chemin : "") + ( (domaine) ? ";domain=" + 
domaine : "") + ( (secure) ? ";secure" : "");}

function effacer_profil() //appelée par le clic sur le bouton
{date=new Date;
date.setFullYear(date.getFullYear()-1);
EcritCookie("chooky",null,date,"/"); 
history.go(0);} 

function sauvegarder_profil() //appelée par le clic sur le bouton
{EcritCookie("chooky",document.form1.activite.value,date_exp,"/");
history.go(0);}

function sauvegarder_profil_devis() //appelée par le clic sur le bouton
{EcritCookie("chooky",document.devis.activite.value,date_exp,"/");}

function operation(form) {
if (form.nom.value=='')
{form.nom.focus();
alert('Veuillez vérifier votre nom'); 
return false;}
if (form.telephone.value.indexOf(" ") != -1 || form.telephone.value.indexOf(".") != -1 || form.telephone.value=='' || form.telephone.value.length!=10 || form.telephone.value.charAt("0") == " " || form.telephone.value.charAt("0") != "0" || form.telephone.value.charAt("1") == "0")
{ form.telephone.focus();
alert('Veuillez vérifier votre numéro de téléphone'); return false;}
if(form.contacte.checked)
{}
else
{alert("Si vous souhaitez être contacté par un conseiller, \n veuillez cocher la case \"Contact par un conseiller\"");
form.contacte.focus();return false;}
form.form_valid.value="oui" ;}

function check(form) {
if (form.login.value=='')
{form.login.focus();
alert('Vous n\'avez pas saisi votre Identifiant'); 
return false;}
if (form.pass.value=='')
{form.pass.focus();
alert('Vous n\'avez pas saisi votre Mot de Passe'); 
return false;}}

function ejs_nodroit()
	{return(false);}
document.oncontextmenu = ejs_nodroit;
var z=13;
function comptable_en_ligne_(d)
{var li;
  if (10<z+d&&z+d<16)
  { for(var i=0; li=document.getElementsByTagName("link")[i]; i++) 
    {if(li.getAttribute("rel").indexOf("style") != -1 && li.getAttribute("title")) 
      {if(li.getAttribute("title").indexOf("comptable_en_ligne") !=-1) li.disabled = true;
	if (li.getAttribute("title").indexOf(z+d)>-1)li.disabled = false;}}
    z=z+d;}}

function comptable_(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=3; i++) {
		if (document.getElementById('compta_comptabilite_'+i)) {document.getElementById('compta_comptabilite_'+i).style.display='none';
		
		if (i==1) {
		document.getElementById('compta_comptabilite_'+i).style.background='#cc0000';
		}
		else if (i==2){
		document.getElementById('compta_comptabilite_'+i).style.background='#808080';
		}
		else if (i==3){
		document.getElementById('compta_comptabilite_'+i).style.background='#6cA200';
		}}
		}
if (d) {d.style.display='block';}}

function Is() {
   var agent = navigator.userAgent.toLowerCase();
   this.major = parseInt(navigator.appVersion);
   this.minor = parseFloat(navigator.appVersion);
   this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
   this.ns4 = (this.ns && (this.major >= 4));
   this.ns6 = (this.ns && (this.major >= 5));
   this.ie = (agent.indexOf("msie") != -1);
   this.ie4 = (this.ie && (this.major >= 4));
   this.ie5  = (this.ie && (agent.indexOf("msie 5")!=-1));
   this.op3 = (agent.indexOf("opera") != -1);
   this.win = (agent.indexOf("win")!=-1);
   this.mac = (agent.indexOf("mac")!=-1);
   this.unix = (agent.indexOf("x11")!=-1);
}
var is = new Is();

function comptable_comptabilite(url,titre) {
   var contenu = "";
   contenu += "<a href=\"#\" onClick=\"addcomptable(url,titre);\"><img src='http://www.expert-comptable-jei.fr/jeune-entreprise-innovante/i/comptabilite.gif' height='15' width='17' alt='titre'></a>";
   document.write(contenu);
}

function addcomptable(url,titre) {
   if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
      window.sidebar.addPanel(titre, url, "");
   } else if (is.ie) {
      window.external.AddFavorite(url, titre);
   } else {
      alert("Pour ajouter 'titre' Ã  vos signets, utilisez <CTRL>+D.");
   }
   return true;
}

function xbPositionableElement(id, sideX, sideY, offsetY)
{
  this.id              = id;
  this.name            = 'xbPositionableElement_' + (++xbPositionableElement._name);
  this.runId           = null;  
  this.refreshInterval = 1500;
  this.div             = null;
  
  if (typeof(sideX) != 'string')
  {
    sideX = 'left'
  }
  else
  {
    sideX = sideX.toLowerCase();
  }

  if (typeof(sideY) != 'string')
  {
    sideY = 'top'
  }
  else
  {
    sideY = sideY.toLowerCase();
  }

  if (typeof(offsetY) != 'number')
  {
    offsetY = 0;
  }

  this.sideX   = sideX;
  this.sideY   = sideY;
  this.offsetX = 2;
  this.offsetY = offsetY;

  window[this.name] = this;
}  

xbPositionableElement._name = -1;

xbPositionableElement.prototype.start = function ()
{
  this.stop();
  
  // since start() should be called after the document has loaded, we can finally assign element
  if (!this.div)
  {
    if (document.getElementById)
    {
      this.div = document.getElementById(this.id);
      this.styleObj = this.div.style;	
    }
    else if (document.layers)
    {
      this.div = document.layers[this.id];
      this.styleObj = this.div;
    }
    else if (document.all)
    {
      this.div = document.all[this.id];
      this.styleObj = this.div.style;	
    }

    this.width = this._getInnerSize("width");
  }	
  
  this._updatePosition();
  this.runId = setTimeout(this.name + '.start()', this.refreshInterval);    
};

xbPositionableElement.prototype.stop = function ()
{
  if (this.runId)
    clearTimeout(this.runId);
    
  this.runId = null;
};

xbPositionableElement.prototype._getInnerSize = function (propName)
{
  var val = 0;

  if (document.layers)
  {
    // navigator 4
    val = this.div.document[propName];
  }
  else if (typeof(this.div.style[propName]) == 'number')
  {
    // opera
    // bug in Opera 6 width/offsetWidth. Use clientWidth
    if (propName == 'width' && typeof(this.div.clientWidth) == 'number')
      val = this.div.clientWidth;
    else
      val =  this.styleObj[propName];
  }
  else
  {
    //mozilla and IE
    switch (propName)
    {
    case 'height':
       if (typeof(this.div.offsetHeight) == 'number')
         val =  this.div.offsetHeight;
       if (val == 0)
         val =  this.height;
       break;
 
    case 'width':
       if (typeof(this.div.offsetWidth) == 'number')
         val = this.div.offsetWidth;
       if (val == 0)
         val =  this.width;
       break;
    }
  }
  return val;
};

xbPositionableElement.prototype._getScrollOffset = function (propName)
{
  var rv = 0;

  if (document.body && typeof(document.body.scrollTop) == 'number')
  {
    rv = document.body[propName=='top'?'scrollTop':'scrollLeft'];
  }
  else if (typeof(window.pageYOffset) == 'number')
  {
    rv = window[propName=='top'?'pageYOffset':'pageXOffset'];  
  }

  return rv;
};

xbPositionableElement.prototype._updatePosition = function ()
{
  var windowHeight;
  var windowWidth;
  var x = 0;
  var y = 0;

  if (document.body && typeof(document.body.clientHeight) == 'number')
  {
    windowHeight = document.body.clientHeight;
    windowWidth  = document.body.clientWidth;
  }
  else if (typeof(window.innerHeight) == 'number')
  {
    windowHeight = window.innerHeight - 16;
    windowWidth  = window.innerWidth  - 16;  
  }

  // calculate the positions of the view port position
  switch (this.sideX)
  {
    case 'left':
      x = this._getScrollOffset('left');
      break;

    case 'center':
      x = (windowWidth / 2) - (this._getInnerSize('width')/2) + this._getScrollOffset('left');
      break;
	  
    case 'right':
      x = windowWidth - this._getInnerSize('width') + this._getScrollOffset('left');
      break;
  }

  switch (this.sideY)
  {
    case 'top':
      y = this._getScrollOffset('top');
      break;

    case 'center':

/*if (windowHeight > 800) {
      y = (windowHeight / 2) - (this._getInnerSize('height') / 2) + this._getScrollOffset('top');}
else {
      y = (windowHeight-50) - this._getInnerSize('height') + this._getScrollOffset('top');
}
      break; 
	  
    case 'bottom': */
      y = (windowHeight-35) - this._getInnerSize('height') + this._getScrollOffset('top');
      break;
  }
  
  if (typeof(this.styleObj.left) == 'number')
  {
    this.styleObj.left = (x + this.offsetX);
    this.styleObj.top  = (y + this.offsetY);
  }
  else
  {
    this.styleObj.left = (x + this.offsetX) + 'px';
    this.styleObj.top  = (y + this.offsetY) + 'px';
  }
};



function com(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
if (style2.display != "")
{
style2.display = style2.display? "":"block";
}
else
{
style2.display = style2.display? "":"none";
}

}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
if (style2.display != "")
{
style2.display = style2.display? "":"block";
}
else
{
style2.display = style2.display? "":"none";
}

}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
if (style2.display != "")
{
style2.display = style2.display? "":"block";
}
else
{
style2.display = style2.display? "":"none";
}}}

function showsup()
	{
	if( document.getElementById )
		{
		document.getElementById("pub").style.width = larg;
		document.getElementById("pub").style.height = haut;
		document.getElementById("pub").innerHTML = html_haut+html_mil+html_bas;
		setTimeout("closeSup()",500);
		}
		else if (document.all)
		{		
/*		document.getElementById("pub").style.width = larg;
		document.getElementById("pub").style.height = haut;
		document.getElementById("pub").innerHTML = html_haut+html_mil+html_bas;*/

		document.all["pub"].style.width = larg;
		document.all["pub"].style.height = haut;
		document.all["pub"].innerHTML = html_haut+html_mil+html_bas;
		setTimeout("closeSup()",500);
		}
		else if (document.layers)
		{
		document.layers["pub"].style.width = larg;
		document.layers["pub"].style.height = haut;
		document.layers["pub"].innerHTML = html_haut+html_mil+html_bas;
		setTimeout("closeSup()",500);
		}
	}
	
function closeSup()
	{
	if(document.getElementById)
		{
		document.getElementById("pub").style.width = 1;
		document.getElementById("pub").style.height = 1;
		document.getElementById("pub").innerHTML = '';
		}
	else if (document.all)
		{		
		document.all["pub"].style.width = 1;
		document.all["pub"].style.height = 1;
		document.all["pub"].innerHTML = '';
		}
	else if (document.layers)
		{
		document.layers["pub"].style.width = 1;
		document.layers["pub"].style.height = 1;
		document.layers["pub"].innerHTML = '';
		}
	}
		
function overLinkToggling(bloc){
	var toOpen = bloc.getElementsByTagName('DIV')[0];
	if (toOpen.className.match(/\bopened\b/)){
		toOpen.className = toOpen.className.replace(/\bopened\b/, '');
	}
	else {
		toOpen.className+=' opened';
	}	
	bloc.blur();
}

function expertises_comptables() {
if(document.all)
{var larg = (document.body.clientWidth - (330 + 145));}
else
{var larg = (screen.width - (330 + 145));}
if (larg >= 1000) {larg = 1000;}
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + larg + '" height="125" id="experts-comptables" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://' + location.host + '/experts-comptables.swf?xml=http://' + location.host + '/experts-comptables.xml" /><param name="quality" value="high" /><embed src="http://' + location.host + '/experts-comptables.swf?xml=http://' + location.host + '/experts-comptables.xml" quality="high" width="' + larg + '" height="125" name="experts-comptables" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>'); }

if(document.body)
	{var larg = document.body.clientWidth;
	var haut = document.body.clientHeight;}
else if (screen)
	{var larg = screen.width;
	var haut = screen.height;}
else if (window)
	{var larg = window.innerWidth;
	var haut = window.innerHeight;}

var haut2 = haut * 2;
html_haut = "<TABLE WIDTH="+larg+" HEIGHT="+haut2+"><TR><TD ALIGN=center BACKGROUND=http://" + location.host + "/comptabilite-en-ligne/i/grille.gif>";
html_bas = "</TD></TR></TABLE>";
posX = (larg/2) ;
posY = (haut/2) + 10 ;
html_mil = "<div style=\"margin:0px;padding:0px;position:absolute;top:"+posY+"px;left:"+posX+"px;width:380px;height:220px;border:1px solid #000;background-image:url('http://" + location.host + "/comptabilite-en-ligne/i/C1.jpg');background-position:right top;background-repeat:no-repeat;background-color:#96959D;color:#fff;\"><form method=\"post\"><a href=\"#\" onclick=\"closeSup();\" style=\"display:block;text-align:right;color:white;\">Fermer X</a><p><br><p><br><p style=\"font-size:12pt;padding-top:70px;font-weight:bold;\">TRAITEMENT EN COURS<br><img src=\"http://" + location.host + "/comptabilite-en-ligne/i/attente-flash.gif\"></p></div>";