function ScanCookie(variable)
   {
   cook = document.cookie;
   variable += "=";
   place = cook.indexOf(variable,0);
   if (place <= -1)
   return("0");
   else
   {
   end = cook.indexOf(";",place)
   if (end <= -1)
   return(unescape(cook.substring(place+variable.length,cook.length)));
   else
   return(unescape(cook.substring(place+variable.length,end)));
   }
   }
function CreationCookie(nom,valeur,permanent)
   {
   if(permanent)
   {
   dateExp = new Date(2020,01,01);
   dateExp = dateExp.toGMTString();
   ifpermanent = '; expires=' + dateExp + ';';
   }
   else
   ifpermanent = '';
   document.cookie = nom + '=' + escape(valeur) + ifpermanent;
   }
function click()
   {
   if(ScanCookie("noukater")==0)
   {
   popunder = window.open('http://www.riads.es','pop','toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1,')
   popunder.blur()
   window.focus(); 
   CreationCookie("noukater","oui",false)
   }
   }

