
var largeurEcran = screen.width 	
var hauteurEcran = screen.height 	

var largeurFenetre ="386"	
var hauteurFenetre ="220"	

var topFenetre = "30"	
var leftFenetre = "30"	


// CORPS

var btn_clic = "<center><a href=# onclick=PopupCentrer('http://survey.novatris.com/wix/p71201105.aspx?s=hti009bgv&l=9',900,700,'status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=yes');setCapNova()><img src='//survey.novatris.com/cit/airtrack/DL/btn_yes.gif' border='0'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='#' onClick='javascript:fermerPopupNova();'><img src='//survey.novatris.com/cit/airtrack/DL/btn_no.gif' border='0'></a></center><br/>"

// ------------------------NE PAS EDITER SOUS CETTE LIGNE----------------------//

function fermerPopupNova() {
document.getElementById("pop_upHI").style.visibility="hidden";
document.getElementById("iframeHI").style.visibility="hidden"; 
}

function popupNova(){
if (document.getElementById) {

document.write('<style type="text/css">')
document.write('table.popupHI {')
document.write('margin: 0px;')
document.write('border: 1px solid #cccccc;')
document.write('padding: 0px;}')
document.write('.imageHI {')
document.write('border: 0px;}')
document.write('#tablecorpsHI {')
document.write('background-image:url("//survey.novatris.com/cit/airtrack/DL/airline.gif");')
document.write('background-repeat:no-repeat;')
document.write('background-color:#FFFFFF;')
document.write('margin:0px;}')
document.write('#logoHI {')
document.write('margin-top:0px;}')
document.write('a {')
document.write('font-family:arial;}')
document.write('</style>')

document.write('<iframe id="iframeHI" width="'+largeurFenetre+'" height="'+hauteurFenetre+'" STYLE="position:absolute; top:'+topFenetre+'%; left:'+leftFenetre+'%; visibility:hidden; z-index:987;"></iframe>') 
document.write('<DIV id=pop_upHI STYLE="position:absolute; top:'+topFenetre+'%; left:'+leftFenetre+'%;visibility:visible; z-index:988;">')
document.write('<table width="'+largeurFenetre+'" height="'+hauteurFenetre+'" cellspacing=0" cellpadding="0" class="popupHI" align="center" id="tablecorpsHI">') 
document.write('<tr valign="top" height="20">')
document.write('<td align="right" style="padding-right:6px;padding-top:6px;"><img src="//survey.novatris.com/cit/airtrack/croix.gif" title="Close" onClick="fermerPopupNova();"></td>')
document.write('</tr>') 
document.write('<tr valign="bottom" height="185">')
document.write('<td colspan="2"></td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td valign="top" colspan="2">'+btn_clic+'</td>')
document.write('</tr>')
document.write('</table>')
document.write('</div>')
 }
}

function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
  document.getElementById("pop_upHI").style.visibility="hidden";
  document.getElementById("iframeHI").style.visibility="hidden"; 
}

function Aleatoire(repetition) {
var x = -1;
while (x < 0) { x = Math.ceil(Math.random() * repetition); }
return x;
}

function getCookie(NameOfCookie){

    if (document.cookie.length > 0) {              

    begin = document.cookie.indexOf(NameOfCookie+"=");       

    if (begin != -1) {           

      begin += NameOfCookie.length+1;       

      end = document.cookie.indexOf(";", begin);

      if (end == -1) end = document.cookie.length;

        return unescape(document.cookie.substring(begin, end));

    } 

  }

  return null;

}

function setCookie(NameOfCookie, value, expiredays) {

var ExpireDate = new Date ();

ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

 

  document.cookie = NameOfCookie + "=" + escape(value) + 

  ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

}

function delCookie (NameOfCookie) {

  if (getCookie(NameOfCookie)) {

    document.cookie = NameOfCookie + "=" +

    "; expires=Thu, 01-Jan-70 00:00:01 GMT";

  }

}




function DoTheCookieStuff(name,capping)

{

 times_visited=eval(getCookie(name))+1;

 setCookie(name,times_visited,30); 

 if (times_visited<=capping) 

 {
popupNova();
 }

}


function setCapNova() {  

var ExpireDate = new Date (); 

ExpireDate.setTime(ExpireDate.getTime() + (30 * 24 * 3600 * 1000));

document.cookie = "xfp210hwy" + "=" + escape(3) + "; expires=" + ExpireDate.toGMTString();

document.getElementById("pop_upHI").style.visibility="hidden";
document.getElementById("iframeHI").style.visibility="hidden";

}


if (Aleatoire(60) == 1){
DoTheCookieStuff("xfp210hwy",3);
}
