function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function validerVote() { var site = document.voter.site.value; var tnow = parseInt(document.voter.timenow.value); var sites = new Array(); var found = false; if(site.length != 0 && document.cookie.length != 0 && !isNaN(tnow)) { var debut = document.cookie.indexOf('votes='); if(debut!=-1) { debut += 6; var fin = document.cookie.indexOf(';', debut); if(fin==-1) fin = document.cookie.length; var str = document.cookie.substring(debut,fin); if(str.length != 0) { str = unescape(str); sites = str.split('¤'); for(key in sites) { var temp = sites[key].split('|'); if(temp.length != 2) sites[key] = '';//corrompu else if(temp[1] < tnow) sites[key] = '';//expiré else if(temp[0] == site) { sites[key] = site+'|'+(tnow+24*60*60); found = true; } } } } } if(!found) { sites[sites.length] = site+'|'+(tnow+24*60*60); } var newvote = ''; for(i in sites) { if(sites[i] != '') { if(newvote != '') newvote += '¤'; newvote += sites[i]; } } setCookieJs('votes',newvote); document.getElementById('tvote').style.display = 'none'; document.getElementById('tmerci').style.display = ''; setTimeout('Fermer()', 5000); } function setCookieJs(name,value) { pathval = '/'; mydate = new Date(); oyfn=mydate.getTime()+(24*60*60*1000); mydate.setTime(oyfn); mydate.setHours(0,0,1); pathval="/"; ck = name + "=" + escape(value); ck += "; path=" + pathval; ck += "; expires=" + mydate; ck += "; domain="+window.location.hostname; document.cookie = ck; } function Fermer() { window.close(); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i