var positionAvailable = 1; var topWindow = window; var forDebug = ''; try { while (topWindow.parent.document !== topWindow.document) { topWindow = topWindow.parent; forDebug += 'X'; } } catch(e) { positionAvailable = 0; forDebug += 'Y'; } try { var doc = topWindow.document; document.mainDoc = doc; if (typeof doc.citVars == 'undefined') doc.citVars = {}; } catch(e){ topWindow = window; var doc = topWindow.document; document.mainDoc = doc; if (typeof doc.citVars == 'undefined') doc.citVars = {}; } // // System pour n'appeler qu'une seule fois l'apicit loader // doc.citVars.launcher = function(fct, fctAdsafe, opts){ if (typeof fctAdsafe != 'undefined') { if (doc.citVars.adsafeLoaded) { fctAdsafe(); } else { if (typeof doc.citVars.adsafefcts == 'undefined') doc.citVars.adsafefcts = []; doc.citVars.adsafefcts.push(fctAdsafe); } } if (typeof doc.citVars.apicited != 'undefined') { fct(); } else { if (typeof doc.citVars.launcherfcts == 'undefined') doc.citVars.launcherfcts = []; doc.citVars.launcherfcts.push(fct); if (typeof doc.citVars.apicitcalled == 'undefined') { doc.citVars.apicitcalled = true; document.onapicitCall = function(t, tm){ doc.citVars.t = t; doc.citVars.tm = tm; doc.citVars.apicited = true; var a = 0; while (typeof doc.citVars.launcherfcts[a] != 'undefined') { doc.citVars.launcherfcts[a++](); } } document.write(''); } } };