function NomCookie_pDejaInviteSondage(idInvitationSondage)
{ return 'RRQ_pInvitationSondage_' + idInvitationSondage;}
function NomCookie_tNbPageVue(idInvitationSondage)
{ return 'RRQ_tNbPageVueSondage_' + idInvitationSondage;}
function nomCookie_tInvitationRefusee()
{ return 'RRQ_tInvitationRefusee';}
function GererInvitationSondage(idInvitationSondage, idDivInvitationSondage, strategiePresnInvitation, nbPageVueAvantAffichage, listeSvcsTrans, tauxAffichage)
{ if (SupporteCookie() != true)
{ return;}
if (Get_Cookie(nomCookie_tInvitationRefusee()) == 'oui')
{ return;}
if (Get_Cookie(NomCookie_pDejaInviteSondage(idInvitationSondage)) != null)
{ return;}
if (strategiePresnInvitation == 'ApresPageVue')
{ var nbPageVue = Number(Get_Cookie(NomCookie_tNbPageVue(idInvitationSondage))); if ((nbPageVue != null) && (nbPageVueAvantAffichage <= nbPageVue))
{ AfficherInvitationSondage(idDivInvitationSondage);}
else
{ Set_Cookie(NomCookie_tNbPageVue(idInvitationSondage),nbPageVue + 1, 0, '/','','');}
}
if (strategiePresnInvitation == 'ParTaux')
{ var nombreAleatoire = get_random(100); if (nombreAleatoire <= tauxAffichage)
{ AfficherInvitationSondage(idDivInvitationSondage);}
}
if(strategiePresnInvitation=='SurActionUtilisateur')
_affchInvitSurOuvrSvc=listeSvcsTrans;}
function AccepteInvitationSondage(idInvitationSondage, idDivInvitationSondage, strategiePresnInvitation, sURL, sNomSondage, sModePopup)
{ if (strategiePresnInvitation == 'ApresPageVue')
{ Set_Cookie(NomCookie_tNbPageVue(idInvitationSondage), 0, 0, '/','','');}
Set_Cookie(NomCookie_pDejaInviteSondage(idInvitationSondage), 'oui', 60, '/','',''); CacherInvitationSondage(idDivInvitationSondage); OuvrirFenetreSondage(sURL, sNomSondage, sModePopup);}
function RefuseInvitationSondage(idInvitationSondage, idDivInvitationSondage, strategiePresnInvitation)
{ if (strategiePresnInvitation == 'ApresPageVue')
{ Set_Cookie(NomCookie_tNbPageVue(idInvitationSondage), 0, 0, '/','','');}
Set_Cookie(NomCookie_pDejaInviteSondage(idInvitationSondage), 'non', 7, '/','',''); Set_Cookie(nomCookie_tInvitationRefusee(), 'oui', 0, '/','',''); CacherInvitationSondage(idDivInvitationSondage);}
function CancelInvitationSondage(idInvitationSondage, idDivInvitationSondage, strategiePresnInvitation)
{ RefuseInvitationSondage(idInvitationSondage, idDivInvitationSondage, strategiePresnInvitation)
}
function AfficherInvitationSondage(idDivInvitationSondage)
{ if ((typeof(fenSondage_MobileSeulement) != "undefined") && (fenSondage_MobileSeulement == true))
{ if (EstClientMobile() != true)
{ return;}
}
var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; myHeight = window.innerHeight;} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;}
var posX,posY; posX = myWidth / 2; posY = myHeight / 2; var objDiv = document.getElementById(idDivInvitationSondage); DivPopup(objDiv,'-500px','-500px'); var divHeight, divWidth; var uniteMesure; divHeight = objDiv.clientHeight; divWidth = objDiv.clientWidth; posX = posX - (divWidth / 2); posY = posY - (divHeight / 2); posX = String(posX) + "px"; posY = String(posY) + "px"; DivPopup(objDiv,posX,posY);}
function ObtenirWidthFenetre() { window.alert( 'Width = ' + myWidth ); window.alert( 'Height = ' + myHeight );}
function CacherInvitationSondage(idDivInvitationSondage)
{ var objDiv = document.getElementById(idDivInvitationSondage); DivUnpop(objDiv);}
function OuvrirFenetreSondage(sURL, sNomSondage, sModePopup)
{ OuvrirPopup(sURL, sNomSondage, 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=700,height=580,left=500,top=20', sModePopup);}

