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

if (getVar("goto") == false && getVar("vote") == false && getVar("commentaires") == false) {

if(window.parent.length!=0) {window.top.location.replace(document.location.href);}}

var GB_ROOT_DIR = "http://" + location.host + "/greybox/";

if(!document.getElementById){
  if(document.all){
    document.getElementById=function(){
if(typeof document.all[arguments[0]]!="undefined"){return document.all[arguments[0]]}else{return null}
    }
  }else if(document.layers){
    document.getElementById=function(){
if(typeof document[arguments[0]]!="undefined"){return document[arguments[0]]}else{return null}
    }
  }
}

if (getVar("centre-de-gestion-agree") != false) {

window.onload=function(){
enableTooltips("annuaire-centre-de-gestion-agree_--","1");
enableTooltips("annuaire-centre-de-gestion-agree-","1");
enableTooltips("my-glider","0");
if (document.getElementById("map1")) {initialize();}};
}
else if (getVar("association-de-gestion-agree") != false) {
window.onload=function(){
enableTooltips("annuaire-association-de-gestion-agree_--","1");
enableTooltips("annuaire-association-de-gestion-agree-","1");
enableTooltips("my-glider","0");
if (document.getElementById("map1")) {initialize();}};
}
else if (getVar("expert-comptable-en-ligne") != false) {
window.onload=function() {
enableTooltips("guide-expert-comptable_--","1");
enableTooltips("guide-expert-comptable-","1");
enableTooltips("my-glider","0");
if (document.getElementById("map1")) {initialize();}};
}
else if (getVar("comptable-en-ligne") != false) {
window.onload=function(){
enableTooltips("guide-comptable_--","1");
enableTooltips("guide-comptable-","1");
enableTooltips("my-glider","0");
if (document.getElementById("map1")) {initialize();}};
}
else if (getVar("commissariat-aux-comptes") != false) {
window.onload=function(){
enableTooltips("annuaire-commissaires-aux-comptes_--","1");
enableTooltips("annuaire-commissaires-aux-comptes-","1");
enableTooltips("my-glider","0");
if (document.getElementById("map1")) {initialize();}};
}


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++;}


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 experts(id) {

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

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

function expert(id) {

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

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


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<=5; 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 montre_chat_ec_droit () {document.write('<tr><td style="border:1px solid black;background:white;"><b>CONTACT DIRECT AVEC UN INTERVENANT DE CE CABINET EXPERT COMPTABLE</b></td></tr><tr><td><center><object type="application/x-shockwave-flash" id="plugoo" data= "http://www.plugoo.com/plug.swf?go=D36QQGOTBRCBSCL&nickname=Entrez votre nom ICI&msg=Posez votre question ICI&topic=titre du message" width="225" height="260"> <param name="movie" value= "http://www.plugoo.com/plug.swf?go=D36QQGOTBRCBSCL&nickname=Entrez votre nom ICI&msg=Posez votre question ICI&topic=titre du message" /> <param name="allowScriptAccess" value="always" /> <param name="wmode" value="transparent" /> </object></center></td></tr>');}


/*function expertises_comptables() {document.write('<br><div align="center"><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="740" height="70" id="experts-comptables" align="middle"><param name="allowScriptAccess" value="samedomain" /><param name="movie" value="experts-comptables.swf?xml=http://www.centre-de-gestion-agree.net/experts-comptables.xml" /><param name="quality" value="high" /><embed src="http://www.centre-de-gestion-agree.net/experts-comptables.swf?xml=http://www.centre-de-gestion-agree.net/experts-comptables.xml" quality="high" width="740" height="70" name="experts-comptables" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div>'); }*/




// 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='../comptabilite-en-ligne.frr.gif';
centre_de_gestion_agree_net.src='../centre-de-gestion-agree.netr.gif';
association_de_gestion_agree_net.src='../association-de-gestion-agree.netr.gif';
comptable_en_ligne_net.src='../comptable-en-ligne.netr.gif';
expert_comptable_en_ligne_net.src='../expert-comptable-en-ligne.netr.gif';
commissariat_aux_comptes_net.src='../commissariat-aux-comptes.netr.gif';
comptable_agree_net.src='../comptable-agree.net.gif';
centre_de_gestion_agree_fr.src='../centre-de-gestion-agree.fr.gif';
expert_comptable_agree_net.src='../expert-comptable-agree.net.gif';
commissariatauxcomptes_eu.src='../commissariatauxcomptes.eu.gif';
association_de_gestion_agree_fr.src='../association-de-gestion-agree.fr.gif';
moteur_comptable_fr.src='../moteur-comptable.frr.gif';
moteur_recherche_xpert_comptable_fr.src='../moteur-recherche-xpert-comptable.frr.gif';
moteur_comptable_com.src='../moteur-comptable.comr.gif';
moteur_comptable_net.src='../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= '../' + 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= '../' + bob3 + '.gif';}


function thu(path) {
/*path1=path.split("/"); 
if (path1[0] !="") {*/document.write('<img src="http://open.thumbshots.org/image.aspx?url=' + path + '" width="150" style="border:1px solid black;">');/*}  path1[0] */

}


//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) {

if (getVar("centre-de-gestion-agree") != false) {
$("#avanti").insertBefore("#annuairecentredegestionagree");
$("#apresi").insertAfter("#annuairecentredegestionagree");
var largeur_divs = $("#annuairecentredegestionagree").width();
}
else if (getVar("association-de-gestion-agree") != false) {
$("#avanti").insertBefore("#annuaireassociationdegestionagree");
$("#apresi").insertAfter("#annuaireassociationdegestionagree");
var largeur_divs = $("#annuaireassociationdegestionagree").width();
}
else if (getVar("expert-comptable-en-ligne") != false||getVar("expertcomptableenligne") != false) {
$("#avanti").insertBefore("#guideexpertcomptable");
$("#apresi").insertAfter("#guideexpertcomptable");
var largeur_divs = $("#guideexpertcomptable").width();
}
else if (getVar("comptable-en-ligne") != false||getVar("comptableenligne") != false) {
$("#avanti").insertBefore("#guidecomptable");
$("#apresi").insertAfter("#guidecomptable");
var largeur_divs = $("#guidecomptable").width();
}
else if (getVar("commissariat-aux-comptes") != false||getVar("commissariatauxcomptes") != false) {
$("#avanti").insertBefore("#annuairecommissairesauxcomptes");
$("#apresi").insertAfter("#annuairecommissairesauxcomptes");
var largeur_divs = $("#annuairecommissairesauxcomptes").width();
}



if( typeof( window.innerWidth ) == 'number' ) {myWidth = window.innerWidth;
myHeight = window.innerHeight;

var larg_dispo = (myWidth - largeur_divs);
larg_dispo = parseInt((larg_dispo - 2 - 18) / 2);}//14
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('avanti').innerHTML = "<a href='"+url+"' title='"+txt_de_la_pub+"'><img src='http://"+ location.host +"/images/blank.gif' width='"+ larg_dispo +"' height='"+ haut_dispo +"' alt='"+txt_de_la_pub+"'></a>";
document.getElementById('apresi').innerHTML = "<a href='"+url+"' title='"+txt_de_la_pub+"'><img src='http://"+ location.host +"/images/blank.gif' width='"+ larg_dispo +"' height='"+ haut_dispo +"' alt='"+txt_de_la_pub+"'></a>";}}