if (getVar("comptableagree") == true || getVar("comptable-agree") == true || getVar("commissariatauxcomptes") == true || getVar("commissairesauxcomptes") == true || getVar("association-de-gestion-agree") == true || getVar("association-de-gestion-agreee") == true || getVar("centredegestionagree") == true || getVar("centre-de-gestion-agree") == true || getVar("comptabilite-en-ligne.fr") == true || getVar("comptable-en-ligne.com") == true) {var GB_ROOT_DIR = "http://" + location.host + "/greybox/";}
else {var GB_ROOT_DIR = "http://" + location.host + "/annuaire-comptable/greybox/";}

/*
if (getVar("expertcomptableagree") == true || getVar("expert-comptable-agree") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdexpert.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url(http://imag.xpert-comptable.net/images/bt-expert.gif) no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt-expert.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable {border: 1px solid #eb003a;}</style>"); 
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #eb003a;}</style>");
document.write("<style type='text/css'>.show a:hover, .show1 a:hover, .feinte a:hover {color: #eb003a;}</style>");
document.write("<style type='text/css'>.feinte {background:#eb003a;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#eb003a;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #eb003a;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#ff3546;}</style>");
document.write("<style type='text/css'>.controls2 {background:#ff7b86;color:white;border-top:1px solid #eb003a;border-bottom:1px solid #eb003a;}</style>");}
else if (getVar("comptableagree") == true || getVar("comptable-agree") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdcomptable.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url(http://imag.xpert-comptable.net/images/bt-comptable.gif) no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt-comptable.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable {border: 1px solid #2191ca;}</style>");
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #2191ca;}</style>");
document.write("<style type='text/css'>.show a:hover, .show1 a:hover, .feinte a:hover {color: #2191ca;}</style>");
document.write("<style type='text/css'>.feinte {background:#2191ca;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#2191ca;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #2191ca;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#419af3;}</style>");
document.write("<style type='text/css'>.controls2 {background:#83bdf7;color:white;border-top:1px solid #2191ca;border-bottom:1px solid #2191ca;}</style>");}
else if (getVar("comptabilite-en-ligne.fr") == true || getVar("comptable-en-ligne.com") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdglobal.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url(http://imag.xpert-comptable.net/images/bt.gif) no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable {border: 1px solid #cb5721;}</style>"); 
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #cb5721;}</style>");
document.write("<style type='text/css'>.show a:hover, .show1 a:hover, .feinte a:hover {color: #cb5721;}</style>");
document.write("<style type='text/css'>.feinte {background:#cb5721;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#cb5721;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #cb5721;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#f38d41;}</style>");
document.write("<style type='text/css'>.controls2 {background:#f7b583;color:white;border-top:1px solid #cb5721;border-bottom:1px solid #cb5721;}</style>");}
else if (getVar("commissariatauxcomptes") == true || getVar("commissairesauxcomptes") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdcac.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url(http://imag.xpert-comptable.net/images/bt-cac.gif) no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt-cac.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable {border: 1px solid #ca2175;}</style>");
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #ca2175;}</style>");
document.write("<style type='text/css'>.show-cac a:hover, .show1-cac a:hover, .feinte a:hover {color: #ca2175;}</style>");
document.write("<style type='text/css'>.feinte {background:#ca2175;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#ca2175;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #ca2175;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#f3417d;}</style>");
document.write("<style type='text/css'>.controls2 {background:#f783aa;color:white;border-top:1px solid #ca2175;border-bottom:1px solid #ca2175;}</style>");}
else if (getVar("association-de-gestion-agree") == true || getVar("association-de-gestion-agreee") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdaga.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url(http://imag.xpert-comptable.net/images/bt-aga.gif) no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt-aga.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable{border: 1px solid #5a21cb;}</style>");
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #5a21cb;}</style>");
document.write("<style type='text/css'>.show-aga a:hover, .show1-cga a:hover, .feinte a:hover {color: #5a21cb;}</style>");
document.write("<style type='text/css'>.feinte {background:#5a21cb;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#5a21cb;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #5a21cb;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#9041f3;}</style>");
document.write("<style type='text/css'>.controls2 {background:#b783f7;color:white;border-top:1px solid #5a21cb;border-bottom:1px solid #5a21cb;}</style>");}
else if (getVar("centredegestionagree") == true || getVar("centre-de-gestion-agree") == true) {
document.write("<style type='text/css'>body {background-image:url('http://imag.xpert-comptable.net/fdcga.png');}</style>");
document.write("<style type='text/css'>.tooltip span.top{background: url('http://imag.xpert-comptable.net/images/bt-cga.gif') no-repeat top;}</style>");
document.write("<style type='text/css'>.tooltip b.bottom{color: #17344D;background: url(http://imag.xpert-comptable.net/images/bt-cga.gif) no-repeat bottom;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable {border: 1px solid #6e8616;}</style>");
document.write("<style type='text/css'>a:hover, table, div#aide, .title, a {color: #6e8616;}</style>");
document.write("<style type='text/css'>.show-cga a:hover, .show1-cga a:hover, .feinte a:hover {color: #6e8616;}</style>");
document.write("<style type='text/css'>.feinte {background:#6e8616;color:#fff;}</style>");
document.write("<style type='text/css'>div#annuaire-expert-comptable h3, div#annuaire-expert-comptable h3 a, div#annuaire-expert-comptable h3 a:hover {color:#6e8616;}</style>");
document.write("<style type='text/css'>hr {border-bottom:2px dashed #6e8616;}</style>");
document.write("<style type='text/css'>div#cat_bidule {background:#719a29;}</style>");
document.write("<style type='text/css'>.controls2 {background:#829d53;color:white;border-top:1px solid #6e8616;border-bottom:1px solid #6e8616;}</style>");}*/

if (getVar("e.xpert-comptable.fr") == true) {document.write("<style type='text/css'>#flv {background: url(../annuaire-comptable/annuaire-comptable-global-mini.gif) no-repeat top center;}</style>");
document.write("<style type='text/css'>#contenu {width:835px;background:#e96e24 url(../annuaire-comptable/images/fd-navig-global-mini.jpg) repeat bottom;}</style>");}
else if (getVar("xpert-comptable.fr") == true) {document.write("<style type='text/css'>#flv {background: url(../annuaire-comptable/annuaire-comptable-_.gif) no-repeat top center;}</style>");
document.write("<style type='text/css'>#contenu {width:574px;background:#e96e24 url(../annuaire-comptable/images/fd-navig-global.jpg) repeat bottom;}</style>");}


function enableTooltips(id,link){var links,i,h;
if(!document.getElementById || !document.getElementsByTagName) return;
AddCss();
h=document.createElement("span");
h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
for(i=0;i<links.length;i++){Prepare(links[i],link);}}

function Prepare(el,link){var tooltip,t,b,s,l;
t=el.getAttribute("title");
if(t==null || t.length==0) t="link:";
el.removeAttribute("title");
tooltip=CreateEl("span","tooltip");
s=CreateEl("span","top");
s.appendChild(document.createTextNode(t));
tooltip.appendChild(s);
b=CreateEl("b","bottom");
l=el.getAttribute("href");
if(l.length>28) l=l.substr(0,25)+"...";
if (link != 0) {b.appendChild(document.createTextNode(l));}
tooltip.appendChild(b);
setOpacity(tooltip);
el.tooltip=tooltip;
if (t !="link:") {el.onmouseover=showTooltip;
el.onmouseout=hideTooltip;}
el.onmousemove=Locate;}

function showTooltip(e){document.getElementById("btc").appendChild(this.tooltip);
Locate(e);}

function hideTooltip(e){var d=document.getElementById("btc");
if(d.childNodes.length>0) d.removeChild(d.firstChild);}

function setOpacity(el){el.style.filter="alpha(opacity:95)";
el.style.KHTMLOpacity="0.95";
el.style.MozOpacity="0.95";
el.style.opacity="0.95";}

function CreateEl(t,c){
var x=document.createElement(t);
x.className=c;
x.style.display="block";
return(x);
}

function AddCss(){
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");

l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Locate(e){
var posx=0,posy=0;
if(e==null) e=window.event;
if(e.pageX || e.pageY){
 posx=e.pageX; posy=e.pageY;
 }
else if(e.clientX || e.clientY){
 if(document.documentElement.scrollTop){
   posx=e.clientX+document.documentElement.scrollLeft;
    posy=e.clientY+document.documentElement.scrollTop;
    }
  else{
    posx=e.clientX+document.body.scrollLeft;
    posy=e.clientY+document.body.scrollTop;
    }
  }
document.getElementById("btc").style.top=(posy+10)+"px";
document.getElementById("btc").style.left=(posx-90)+"px";
}


function ejs_nodroit()
	{
	return(false);
	}
document.oncontextmenu = ejs_nodroit;

function mo(o){o.className=='f'?o.className='n': o.className=o.className; }

function mx(o){o.className=='n'?o.className='f': o.className=o.className; }

function comptable(theRow, thePointerColor, theNormalBgColor)
{
  var theCells=null;
  if(thePointerColor == '' || typeof(theRow.style) == 'undefined') {
    return false;
  }
  if(typeof(document.getElementsByTagName) != 'undefined') {
    theCells=theRow.getElementsByTagName('td');
  }
  else if(typeof(theRow.cells) != 'undefined') {
    theCells=theRow.cells;
  }
  else { 
    return false;
  }
  var rowCellsCnt =theCells.length;
  var currentColor=null;
  var newColor  =null;
  // Opera does not return valid values with "getAttribute"
  if(typeof(window.opera) == 'undefined'
    && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
    currentColor=theCells[0].getAttribute('bgcolor');
    newColor  =(currentColor.toLowerCase() == thePointerColor.toLowerCase())
           ? theNormalBgColor
           : thePointerColor;
    for (var c=0; c < rowCellsCnt; c++) {
      theCells[c].setAttribute('bgcolor', newColor, 0);
    } // end for
  }
  else {
    currentColor=theCells[0].style.backgroundColor;
    newColor  =(currentColor.toLowerCase() == thePointerColor.toLowerCase())
           ? theNormalBgColor
           : thePointerColor;
    for (var c=0; c < rowCellsCnt; c++) {
      theCells[c].style.backgroundColor=newColor;
    }
  }

  return true;
} // end of the 'setPointer()' function

function no_error() { return true; }
window.onerror = no_error;

function expert_comptable(page,hauteur,largeur) //ouvre une popup
{ window.open(page,"Popup","status=no,scrollbars=no,resizable=no,height="+hauteur+",width="+largeur+",top=0,left=0"); }

function confirm_delete(page, texte) //demande une confirmation avant de supprimer un site ou une categorie
{
	confirmation = confirm('Etes vous sur de vouloir supprimer '+texte+' ? ');
	if(confirmation)
		window.location.replace(page);
}

function message_annu_status(message) //affiche un texte dans la barre de statut du navigateur
{ window.status = message; }

function check_id_cat()
//verifie si on a bien selectionner une categorie dans la liste deroulante
{
	if (document.form2submit.id_cat.value == 0)
	{
		alert('Veuillez sélectionner une catégorie !');
		return false;
	}
	else
	{ return true; }
}


function getVar(nomVariable) {
var infos = document.location.href;
if (infos.indexOf(nomVariable)!=-1)
{return true;}
else
{return false;}}



if (getVar("map") == false && getVar("goto") == false && getVar("commentaires") == false && getVar("vote") == false) {if(window.parent.length!=0) {window.top.location.replace(document.location.href);}}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=525,height=225,left=412,top=234');");
}

function popUpcomptable(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=545,height=630,left=50,top=10');");
}


var alertTimerId = 0;

function comptabilite()
{

 if (document.getElementById("plusvite").value == "je suis presse")
 {
  alertTimerId = setTimeout('go(\''+ adresse + '\')',20000);
 }
 else
 {
	document.getElementById("plusvite").value = "redirection immediate";
	go(adresse);
 }
}

function go(adresse) {window.location.href=adresse;}



function verifemail(elm)
{
 if(elm.value.search(/^[a-z][.a-z0-9_-]+@[a-z0-9_-]+\.[a-z]{2,3}$/i) == -1)
  return false;
 else
  return true;
}

function verifurl(url) 
{
  if(url.value.search(/^https?:\/\/[-a-z0-9\/_.]*([-a-z0-9_.]{2,}\.[-a-z0-9&\?=_.]{2,})$/i) == -1)
    return false;
  else
    return true;
}

function verifcp(cp) 
{
 if(cp.value.search(/^[0-9]{5}$/) == -1)
  return false;
 else
  return true;
}

function veriftel(tel) 
{
 if(tel.value.search(/^0[1-98][0-9]{8}$/) == -1)
  return false;
 else
  return true;
}


function verif(f)
{ formErrors = false;  
 if(f.elements['id_cat'].value == 0 && f.elements['id_cat2'].value == 0 && f.elements['id_cat3'].value == 0 && f.elements['id_cat4'].value == 0 && f.elements['id_cat5'].value == 0){
  alert("choisir 1 catégorie minimum !");
  // f.elements['nom_proprio'].focus();
  return false; 
        }
 
  else if(f.elements['nom_proprio'].value == ""){
  formErrors ="Vous n'avez pas rempli le champ Nom !"; 
  alert(formErrors);
  //document.all.msg0.style.display ="block";
 // document.all.msg0.innerHTML  = formErrors;
  f.elements['nom_proprio'].focus();
  return false; 
		}
	/*	
  else if(f.elements['nom_proprio'].value != "")
	{
  document.all.msg0.style.display ="none";
	}*/

 else if(verifemail(f.elements['email_proprio']) == false) {
  alert("L'adresse email "+f.elements['email_proprio'].value+" n'est pas valide !"); f.elements['email_proprio'].focus(); return false; 
		}
 else if(f.elements['titre'].value == "") {
  alert("Vous n'avez pas rempli le champ Titre !"); f.elements['titre'].focus(); return false; 
		}
 else if(verifurl(f.elements['url']) == false && f.elements['urlcheck'].checked == false ) {
  alert("L'Url "+f.elements['url'].value+" n'est pas valide"); f.elements['url'].focus(); return false; 
		}
 else if(f.elements['description'].value == "") {
  alert("Vous n'avez pas rempli le champ Description !"); f.elements['description'].focus(); return false; 
		}
 else if(f.elements['adresse'].value == "") {
  alert("Vous n'avez pas rempli le champ Adresse !"); f.elements['adresse'].focus(); return false; 
		}
 else if(f.elements['ville'].value == "") {
  alert("Vous n'avez pas rempli le champ Ville !"); f.elements['ville'].focus(); return false; 
		}
 else if(verifcp(f.elements['code_postal']) == false && f.elements['quebec'].value != 2) {
  alert("Le code postal "+f.elements['code_postal'].value+" n'est pas valide"); f.elements['code_postal'].focus(); return false; 
		}
 else if(veriftel(f.elements['tel']) == false) {
  alert("Le numéro de téléphone "+f.elements['tel'].value+" n'est pas valide"); f.elements['tel'].focus(); return false; 
		}
 else if(f.elements['fax'].value == "") {
  //alert("Vous n'avez pas rempli le champ Fax !"); f.elements['fax'].focus(); return false; 
		}
 else {
  return true; }
  
}

function comptablecomptabilite(url,titre) {
  var contenu = "<a href=\"#\" onClick=\"addcomptable(url,titre);\"><img src=\"http://www.xpert-comptable.net/annuaire/comptabilite.gif\" height=\"15\" width=\"17\"></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 com(whichLayer) {

if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
if (style2.display != "")
{$('#'+ whichLayer).fadeIn('slow');
style2.display = style2.display? "":"block";
}
else
{$('#'+ whichLayer).fadeOut('slow');
style2.display = style2.display? "":"none";
}

}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
if (style2.display != "")
{$('#'+ whichLayer).fadeIn('slow');
style2.display = style2.display? "":"block";
}
else
{$('#'+ whichLayer).fadeOut('slow');
style2.display = style2.display? "":"none";
}
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
if (style2.display != "")
{$('#'+ whichLayer).fadeIn('slow');
style2.display = style2.display? "":"block";
}
else
{$('#'+ whichLayer).fadeOut('slow');
style2.display = style2.display? "":"none";
}}}


var z = "1";
function superr(whichLayer) {

$('#'+ whichLayer).fadeIn('slow');

if (document.getElementById)
{var style2 = document.getElementById(whichLayer).style;}
else if (document.all)
{var style2 = document.all[whichLayer].style;}
else if (document.layers)
{var style2 = document.layers[whichLayer].style;}
style2.display = "block";
style2.zIndex = z++;}

function experto(id,number) {

$('#'+ id + number).fadeIn('slow');

if (document.getElementById(id + "" + number)) 
{if (document.getElementById(id + "" + number).style.display == 'none' || document.getElementById(id + "" + number).style.visibility=='hidden') {document.getElementById(id + "" + number).style.display='block';
 document.getElementById(id + "" + number).style.visibility='visible';}
else
{document.getElementById(id + "" + number).style.display='block';
 document.getElementById(id + "" + number).style.visibility='visible';}}

for (i=1; i<=15; i++) {
if (i != number) {expertos(id,i); }
}}


function experto_boubou(id,number) {

$('#'+ id + number).fadeIn('slow');

if (document.getElementById(id + "" + number)) 
{if (document.getElementById(id + "" + number).style.display == 'none' || document.getElementById(id + "" + number).style.visibility=='hidden') {document.getElementById(id + "" + number).style.display='block';
 document.getElementById(id + "" + number).style.visibility='visible';}
else
{document.getElementById(id + "" + number).style.display='block';
 document.getElementById(id + "" + number).style.visibility='visible';}}

for (i=1; i<=26; i++) {

if (document.getElementById(id + "" + i)) 
if (i != number) {expertos(id,i); }
}}

function expertos(id,number) {

$('#'+ id + number).fadeOut('slow');

if (document.getElementById(id + "" + number)) 
{if (document.getElementById(id + "" + number).style.display == 'block' || document.getElementById(id + "" + number).style.visibility=='visible') { document.getElementById(id + "" + number).style.display='none';
 document.getElementById(id + "" + number).style.visibility='hidden';}
else
{document.getElementById(id + "" + number).style.display='none';
 document.getElementById(id + "" + number).style.visibility='hidden';}}}

function lg(bob,bob1) {document.write('<a h' + 'r ' + 'e' + 'f="' + bob + '"><i' + 'mg sr' + 'c="' + bob1 + '"></a> ');}


if ( document.all )
{
	function blink_show()
	{
		blink_tags = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'visible';
		}
		window.setTimeout( 'blink_hide()', 700 );
	}
	
	function blink_hide()
	{
		blink_tags = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'hidden';
		}
		window.setTimeout( 'blink_show()', 250 );
	}
	window.onload = blink_show;
}




function roolov(bouton,number,tot) {if (document.getElementById(tot)) {document.getElementById(tot).style.backgroundImage = 'url(http://imag.xpert-comptable.net/' + bouton + '.png)';
document.getElementById(tot).src = "http://imag.xpert-comptable.net/" + bouton + "_" + number + ".png";}}


// image rool over du bas
comptabilite_en_ligne_fr= new Image( );
centre_de_gestion_agree_net= new Image( );
association_de_gestion_agree_net= new Image( );
comptable_en_ligne_net= new Image( );
expert_comptable_en_ligne_net= new Image( );
commissariat_aux_comptes_net= new Image( );
comptable_agree_net= new Image( );
centre_de_gestion_agree_fr= new Image( );
expert_comptable_agree_net= new Image( );
commissariatauxcomptes_eu= new Image( );
association_de_gestion_agree_fr= new Image( );
moteur_comptable_fr = new Image( );
moteur_recherche_xpert_comptable_fr = new Image( );
moteur_comptable_com = new Image( );
moteur_comptable_net = new Image( );

comptabilite_en_ligne_fr.src='http://i.xpert-comptable.net/comptabilite-en-ligne.frr.gif';
centre_de_gestion_agree_net.src='http://i.xpert-comptable.net/centre-de-gestion-agree.netr.gif';
association_de_gestion_agree_net.src='http://i.xpert-comptable.net/association-de-gestion-agree.netr.gif';
comptable_en_ligne_net.src='http://i.xpert-comptable.net/comptable-en-ligne.netr.gif';
expert_comptable_en_ligne_net.src='http://i.xpert-comptable.net/expert-comptable-en-ligne.netr.gif';
commissariat_aux_comptes_net.src='http://i.xpert-comptable.net/commissariat-aux-comptes.netr.gif';
comptable_agree_net.src='http://i.xpert-comptable.net/comptable-agree.net.gif';
centre_de_gestion_agree_fr.src='http://i.xpert-comptable.net/centre-de-gestion-agree.fr.gif';
expert_comptable_agree_net.src='http://i.xpert-comptable.net/expert-comptable-agree.net.gif';
commissariatauxcomptes_eu.src='http://i.xpert-comptable.net/commissariatauxcomptes.eu.gif';
association_de_gestion_agree_fr.src='http://i.xpert-comptable.net/association-de-gestion-agree.fr.gif';
moteur_comptable_fr.src='http://i.xpert-comptable.net/moteur-comptable.frr.gif';
moteur_recherche_xpert_comptable_fr.src='http://i.xpert-comptable.net/moteur-recherche-xpert-comptable.frr.gif';
moteur_comptable_com.src='http://i.xpert-comptable.net/moteur-comptable.comr.gif';
moteur_comptable_net.src='http://i.xpert-comptable.net/moteur-comptable.netr.gif';

function o(id) {var bob = "";
var reg=new RegExp("(_)", "g");
var reg1=new RegExp("(_fr)", "g");
var reg2=new RegExp("(_eu)", "g");
var reg3=new RegExp("(_net)", "g");
var reg4=new RegExp("(e_com)", "g");

bob11 = id.replace(reg4, "e.com");
bob = bob11.replace(reg1, ".fr");
bob1 = bob.replace(reg2, ".eu");
bob2 = bob1.replace(reg3, ".net");
bob3 = bob2.replace(reg, "-");

document[id].src= 'http://i.xpert-comptable.net/' + bob3 + 'r.gif';}

function oo(id) {var bob = "";
var reg=new RegExp("(_)", "g");
var reg1=new RegExp("(_fr)", "g");
var reg2=new RegExp("(_eu)", "g");
var reg3=new RegExp("(_net)", "g");
var reg4=new RegExp("(e_com)", "g");

bob11 = id.replace(reg4, "e.com");
bob = bob11.replace(reg1, ".fr");
bob1 = bob.replace(reg2, ".eu");
bob2 = bob1.replace(reg3, ".net");
bob3 = bob2.replace(reg, "-");
document[id].src= 'http://i.xpert-comptable.net/' + bob3 + '.gif';}

function ini_prem() {}

function prem_p(obaseimag,lacouleur) {document.write('<div style="float:left;width:250px;height:168px;"><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="250" height="168" id="experts-comptables" align="middle"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="' + obaseimag + '/experts-comptables.swf?xml=' + obaseimag + '/' + lacouleur + '.xml"><param name="quality" value="high"><embed src="' + obaseimag + '/experts-comptables.swf?xml=' + obaseimag + '/' + lacouleur + '.xml" quality="high" width="250" height="168" name="experts-comptables" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div>');}

function prem_d(obaseimag,lacouleur) {document.write('<div style="float:left;"><a rel="nofollow" href="#meilleur" onmouseover="roolov(\'bouton1' + lacouleur + '\',\'1\',\'bouton1\');" onmouseout="bouton1.src = \'' + obaseimag + '/bouton1' + lacouleur + '.png\';"><img src="' + obaseimag + '/bouton1' + lacouleur + '.png" border="0" style="margin:0px;padding:0px;" width="201" name="bouton1" id="bouton1" height="42"></a><br><a rel="nofollow" href="#plus" onmouseover="roolov(\'bouton2' + lacouleur + '\',\'2\',\'bouton2\');" onmouseout="bouton2.src = \'' + obaseimag + '/bouton2' + lacouleur + '.png\';"><img src="' + obaseimag + '/bouton2' + lacouleur + '.png" border="0" name="bouton2" id="bouton2" style="margin:0px;padding:0px;" width="201" height="42"></a><br><a rel="nofollow" href="#dernier" onmouseover="roolov(\'bouton3' + lacouleur + '\',\'3\',\'bouton3\');" onmouseout="bouton3.src = \'' + obaseimag + '/bouton3' + lacouleur + '.png\';"><img src="' + obaseimag + '/bouton3' + lacouleur + '.png" border="0" name="bouton3" id="bouton3" style="margin:0px;padding:0px;" width="201" height="42"></a><br><a rel="nofollow" href="#pire" onmouseover="roolov(\'bouton4' + lacouleur + '\',\'4\',\'bouton4\');" onmouseout="bouton4.src = \'' + obaseimag + '/bouton4' + lacouleur + '.png\';"><img src="' + obaseimag + '/bouton4' + lacouleur + '.png" border="0" name="bouton4" id="bouton4" style="margin:0px;padding:0px;" width="201" height="42"></a></div>');}

function verif_ordre(site) {document.write(' <a rel="nofollow" href="http://www.experts-comptables.fr/csoec/annuaire/%28region%29?SearchText=' + site + '&SearchButton=Rechercher" onclick="return GB_showPage(\'' + site +'\', this.href)">Vérifiez l\'inscription à l\'ordre >></a>');}

function vid(ville,obaseimg,lacouleur,video,baseimg) {document.write('<a href="' + ville + 'video_du_jour.php?titre=la+vid%E9o+du+jour&video=' + obaseimg + '/' + video + '" onclick="return GB_showCenter(\'La Vidéo du jour\', this.href, 540, 710)" onmouseover="roolov(\'video_du_jour\',\'h\',\'video_du_jour\');" onmouseout="video_du_jour.src = \'' + obaseimg + '/video_du_jour.png\';"><img src="'+ obaseimg +'/video_du_jour.png" class="'+ lacouleur +'1" id="video_du_jour" name="video_du_jour"></a></div>');}

function ti(path) {document.write('<img src="http://open.thumbshots.org/image.aspx?url=' + path + '" width="150" class="f" onMouseOver="mo(this);" onMouseOut="mx(this);" style="border:1px solid #333;">');}



//Détermine le navigateur, nous avons seulement de ceci pour Internet Explorer
if (navigator.appName == "Microsoft Internet Explorer") {

//Array (Tableau) d'éléments devant être remplacé
var arrElements = new Array(3);
arrElements[0] = "object";
arrElements[1] = "embed";
arrElements[2] = "applet";


//Faire une boucle sur le types d'élément
for (n = 0; n < arrElements.length; n++) {

//mettre l'objet pour la concision
replaceObj = document.getElementsByTagName(arrElements[n]);

//faire une boucle sur les objets de l'élément retourné
for (i = 0; i < replaceObj.length; i++ ) {

//mettre l'objet parent pour la concision
parentObj = replaceObj[i].parentNode;

//saisir l'html dans l'élément avant de le supprimer du DOM
newHTML = parentObj.innerHTML;

//supprimez l'élément du DOM
parentObj.removeChild(replaceObj[i]);

//coller l'élément dans la page, mais comme un nouvel objet
parentObj.innerHTML = newHTML;

}}}

function cob() {for (i = 1; i <= 20; i++) {if ($('#pub_contextuelle'+i).val() != undefined) {interstitiel($('#pub_contextuelle'+i).val());i = 20;}}}

function interstitiel(url) {
$("#avant").insertBefore("#annuaire-expert-comptable");
$("#apres").insertAfter("#annuaire-expert-comptable");
var largeur_divs = $("#annuaire-expert-comptable").width();

if( typeof( window.innerWidth ) == 'number' ) {myWidth = window.innerWidth;myHeight = window.innerHeight; // FIREFOX
var larg_dispo = (myWidth - largeur_divs);
larg_dispo = parseInt((larg_dispo - 2 - 18) / 2);
}
else if( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;myHeight = document.documentElement.clientHeight;
var larg_dispo = (myWidth - largeur_divs);
larg_dispo = parseInt((larg_dispo - 2) / 2);
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {//IE 4 compatible
myWidth = document.body.clientWidth;myHeight = document.body.clientHeight;
var larg_dispo = (myWidth - largeur_divs);
larg_dispo = parseInt((larg_dispo - 2 - 2) / 2);
}

var haut_dispo = parseInt(myHeight * 2);




if (larg_dispo > 50) {

if ($("body").css("background-repeat") =="repeat") {
if (url.indexOf("expert-comptable-en-ligne.fr")!=-1) {
txt_de_la_pub = "VOTRE expert comptable en ligne, cabinet d expertise comptable, comptabilité sur internet et CONSEILS... Devis Gratuit...";
document.write('<style type="text/css">body {background-image:url(http://www.expert-comptable-en-ligne.fr/comptabilite-en-ligne/i/fd-votre.png);background-repeat:no-repeat;background-color:white;background-position:top center;background-attachment: fixed;}</style>');}
else if (url.indexOf("expert-comptable-en-ligne.com")!=-1) {
txt_de_la_pub = "VOTRE expert comptable en ligne, cabinet d expertise comptable pour les BNC / Agent commerciaux... Devis Gratuit";
document.write('<style type="text/css">body {background-image:url(http://www.expert-comptable-en-ligne.com/comptabilite-en-ligne/i/fd-votre-bnc.png);background-repeat:no-repeat;background-color:white;background-position:top center;background-attachment: fixed;}</style>');}
else if (url.indexOf("comptable-en-ligne.fr")!=-1) {
txt_de_la_pub = "MON Comptable en ligne, cabinet d expertise comptable, comptabilité sur internet et CONSEILS... Devis gratuit...";
if (Math.random() <= 0.5) {document.write('<style type="text/css">body {background-image:url(http://www.comptable-en-ligne.fr/comptabilite-en-ligne/i/fd-monbis.png);background-repeat:no-repeat;background-color:white;background-position:top center;background-attachment: fixed;}</style>');}
else {document.write('<style type="text/css">body {background-image:url(http://www.comptable-en-ligne.fr/comptabilite-en-ligne/i/fd-mon.png);background-repeat:no-repeat;background-color:white;background-position:top center;background-attachment: fixed;}</style>');}}
else if (url.indexOf("compta247.fr")!=-1) {
txt_de_la_pub = "Compta 247, logiciel de comptabilité en ligne 100% gratuit, 100% technologique...";
document.write('<style type="text/css">body {background-image:url(http://www.compta247.fr/g/fd-c247.png);background-repeat:no-repeat;background-color:white;background-position:top center;background-attachment: fixed;}</style>');}}


document.getElementById('avant').innerHTML = "<a href='"+url+"' title='"+txt_de_la_pub+"'><img src='http://"+ location.host +"/annuaire-comptable/images/blank.gif' width='"+ larg_dispo +"' height='"+ haut_dispo +"' alt='"+txt_de_la_pub+"'></a>";
document.getElementById('apres').innerHTML = "<a href='"+url+"' title='"+txt_de_la_pub+"'><img src='http://"+ location.host +"/annuaire-comptable/images/blank.gif' width='"+ larg_dispo +"' height='"+ haut_dispo +"' alt='"+txt_de_la_pub+"'></a>";}}