function getCookie(nomCookie) { maChaine = new String(document.cookie); monTab = maChaine.split('; '); cont = true; for (i=0;i=0) { valeur = monTab[i].substr(index+nomCookie.length+1); return valeur; } } return ''; } function setCookie(nomCookie, valeurCookie) { //alert("Nom cookie = " + nomCookie + " / valeur = " + valeurCookie); document.cookie = nomCookie +'='+ valeurCookie +";path=/"; } function setCookiePersist(nom,valeur,jours) { var expDate = new Date(); expDate.setTime(expDate.getTime() + (jours *24*3600*1000)); document.cookie = nom + "=" + escape(valeur) +";expires=" + expDate.toGMTString() + ";path=/"; } function getSafeTouch() { var ckStr = '0'+ getCookie('cwst'); var ckV=Math.pow(ckStr,0)*303616725; setCookie('cwst','CW'+ckV+"ST15"); } getSafeTouch();