var mtCookieName="mt_blog_user",mtCookieDomain=".pigaz.org",mtCookiePath="/",mtCookieTimeout=14400;function mtHide(a){if(a=typeof a=="string"?document.getElementById(a):a)a.style.display="none"}function mtShow(a){if(a=typeof a=="string"?document.getElementById(a):a)a.style.display="block"}function mtAttachEvent(a,b){var c="on"+a,d=window[c];window[c]=typeof d!="function"?b:function(j){d(j);return b(j)}}function mtFireEvent(a,b){var c=window["on"+a];if(typeof c=="function")return c(b)}
this.JSON||(JSON={});
(function(){function a(k){return k<10?"0"+k:k}function b(k){j.lastIndex=0;return j.test(k)?'"'+k.replace(j,function(m){var i=z[m];return typeof i==="string"?i:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+k+'"'}function c(k,m){var i,l,n,r,q=h,f,e=m[k];if(e&&typeof e==="object"&&typeof e.toJSON==="function")e=e.toJSON(k);if(typeof s==="function")e=s.call(m,k,e);switch(typeof e){case "string":return b(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e);case "object":if(!e)return"null";
h+=u;f=[];if(Object.prototype.toString.apply(e)==="[object Array]"){r=e.length;for(i=0;i<r;i+=1)f[i]=c(i,e)||"null";n=f.length===0?"[]":h?"[\n"+h+f.join(",\n"+h)+"\n"+q+"]":"["+f.join(",")+"]";h=q;return n}if(s&&typeof s==="object"){r=s.length;for(i=0;i<r;i+=1){l=s[i];if(typeof l==="string")if(n=c(l,e))f.push(b(l)+(h?": ":":")+n)}}else for(l in e)if(Object.hasOwnProperty.call(e,l))if(n=c(l,e))f.push(b(l)+(h?": ":":")+n);n=f.length===0?"{}":h?"{\n"+h+f.join(",\n"+h)+"\n"+q+"}":"{"+f.join(",")+"}";
h=q;return n}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
h,u,z={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;if(typeof JSON.stringify!=="function")JSON.stringify=function(k,m,i){var l;u=h="";if(typeof i==="number")for(l=0;l<i;l+=1)u+=" ";else if(typeof i==="string")u=i;if((s=m)&&typeof m!=="function"&&(typeof m!=="object"||typeof m.length!=="number"))throw new Error("JSON.stringify");return c("",{"":k})};if(typeof JSON.parse!=="function")JSON.parse=function(k,m){function i(n,r){var q,f,e=n[r];if(e&&typeof e===
"object")for(q in e)if(Object.hasOwnProperty.call(e,q)){f=i(e,q);if(f!==undefined)e[q]=f;else delete e[q]}return m.call(n,r,e)}var l;d.lastIndex=0;if(d.test(k))k=k.replace(d,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(k.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){l=eval("("+k+")");return typeof m==="function"?i({"":l},""):
l}throw new SyntaxError("JSON.parse");}})();var MT=window.MT||{};MT.cons=function(){return{LOG:"log",WARN:"warn",DEBUG:"debug",INFO:"info",ERR:"error",JSON:"json"}}();
MT.core=function(){return{connect:function(a,b,c){var d=mtGetXmlHttp();if(!d)return false;d.onreadystatechange=function(){if(d.readyState==4)if(!(d.status&&d.status!=200))switch(b){case "json":c(JSON.parse(d.responseText));break;case "xml":break;case "text":break}};d.open("GET",a);d.send(null)},getEl:function(a){return MT.util.checkNodeType(a)==="element"?id:document.getElementById(a)||false},addEvent:function(a,b,c,d){if(!d&&document.addEventListener)a.addEventListener(b,c,false);else if(d&&document.addEventListener)a.addEventListener(b,
function(){c.call(d,event)},false);else d?a.attachEvent("on"+b,function(){c.call(d,event)}):a.attachEvent("on"+b,function(){c.call(a,event)})},log:function(){return false}}}();
MT.util=function(){return{toggleVisibility:{show:function(){for(var a=arguments.length;a--;)if(MT.util.checkNodeType(arguments[a])==="element")arguments[a].style.visibility="visible";else MT.core.getEl(arguments[a]).style.visibility="visible"},hide:function(){for(var a=arguments.length;a--;)if(MT.util.checkNodeType(arguments[a])==="element")arguments[a].style.visibility="hidden";else MT.core.getEl(arguments[a]).style.visibility="hidden"}},toggleDisplay:{show:function(){for(var a=arguments.length;a--;)if(MT.util.checkNodeType(arguments[a])===
"element")arguments[a].style.display="";else MT.core.getEl(arguments[a]).style.display=""},hide:function(){for(var a=arguments.length;a--;)if(MT.util.checkNodeType(arguments[a])==="element")arguments[a].style.display="none";else MT.core.getEl(arguments[a]).style.display="none"}},findDefiningParent:function(a){if(MT.util.checkNodeType(a)==="element")for(a=a.parentNode;a.parentNode;a=a.parentNode)if(a.hasAttribute&&a.hasAttribute("id")||a.getAttribute("id"))return a;return false},checkNodeType:function(a){if(a&&
a.nodeName)switch(a.nodeType){case 1:return"element";case 3:return/\S/.test(a.nodeValue)?"textnode":"whitespace"}}}}();
(function(){function a(){if(MT.entryCommentCount){b();j(false);d();i();z();c()}}function b(){A={};w=false;B=y="";v=MT.commentsPerPage||50;N="";F="ascend";G=MT.entryID;C=MT.entryCommentCount;x=Math.ceil(C/v);o=1;H="<img title='Loading...' src='http://www.pigaz.org/mt-static/images/indicator.white.gif' alt='Loading' />";I=f.getEl("comments-content");J=f.getEl("top-comment-nav");D=f.getEl("comment-nav");K=f.getEl("current-comments");L=f.getEl("top-current-comments")}function c(){if(v<C){f.addEvent(D,
"click",u);f.addEvent(J,"click",u)}}function d(){var g=String(window.location.hash).match(/comment-(\d{1,6})/);if(g){f.log(e.DEBUG,g);if(!Object.prototype.hasOwnProperty.call(f.getEl(g[0]),"className"))if(m(g[1])){o=Math.floor(B/v)+1;f.log(e.DEBUG,"Comment Array Id: "+B);f.log(e.DEBUG,"Comments Per Page: "+v);f.log(e.DEBUG,"Page Number: "+o);f.log(e.DEBUG,"Comment Offset: "+h());r()}}}function j(){E=v*(o-1)}function h(){return E}function u(g){var p=g.target||g.srcElement,M;if(p=p.id&&f.getEl(p.id)||
false)M=t.checkNodeType(p.parentNode)==="element"&&p.parentNode.getAttribute("id")&&p.parentNode.id;else return false;switch(p.nodeName){case "A":switch(M){case "prev-comments":case "top-prev-comments":if(g.preventDefault)g.preventDefault();else g.returnValue=false;w||k();break;case "next-comments":case "top-next-comments":if(g.preventDefault)g.preventDefault();else g.returnValue=false;w||s();break}break}}function z(){f.log(e.DEBUG,f.getEl("top-prev-comments"));if(o<=x&&o!==1){t.toggleVisibility.show("prev-comments");
t.toggleVisibility.show("top-prev-comments")}if(o>=1&&o!==x){t.toggleVisibility.show("next-comments");t.toggleVisibility.show("top-next-comments")}if(o===1||D.style.visibility==="hidden"){t.toggleVisibility.hide("prev-comments");t.toggleVisibility.hide("top-prev-comments")}if(o===x||D.style.visibility==="hidden"){t.toggleVisibility.hide("next-comments");t.toggleVisibility.hide("top-next-comments")}}function s(){if(o<x){o++;r()}}function k(){if(o>1){o--;r()}}function m(g){for(var p=MT.commentIds.length;p--;)if(MT.commentIds[p]==
g){y="comment-"+g;B=p;return true}return false}function i(){l([E+1," - ",o!=x?E+v:C].join(""))}function l(g){K.innerHTML=g;L.innerHTML=g}function n(g){I.innerHTML=g}function r(){var g;w=true;l(H);j();g=["http://www.pigaz.org/cgi-bin/mt/mt-comments.cgi?__mode=comment_listing&direction=",F,"&entry_id=",G,"&limit=",v,"&offset=",h()].join("");y||(y="comments-content");if(A.hasOwnProperty(g)){q(A[g]);w=false}else f.connect(g,e.JSON,function(p){A[g]=p.comments;q(p.comments);w=false})}function q(g){n(g);
i();window.location.hash="reset";window.location.hash=y;z()}var f=MT.core,e=MT.cons,t=MT.util,A,w,F,N,y,B,v,x,H,o,E,C,G,I,J,D,K,L;f.addEvent(window,"load",a)})();
function mtRelativeDate(a,b){var c=Math.floor(((new Date).getTime()-a.getTime())/1E3),d;if(c<60)d="poco fa";else if(c<=86400){d=Math.floor(c/3600);c=Math.floor(c%3600/60);d=d==1?"1 ora fa":d>1?"2 ore fa".replace(/2/,d):c==1?"1 minuto fa":"2 minuti fa".replace(/2/,c)}else if(c<=604800){var j=Math.floor(c/86400);d=Math.floor(c%86400/3600);d=j==1?"1 giorno fa":j>1?"2 giorni fa".replace(/2/,j):d==1?"1 ora fa":"2 ore fa".replace(/2/,d)}return d?d:b}
function mtEditLink(a,b){var c=mtGetUser();c&&a&&b&&c.id==b&&document.write('<a href="mt.cgi?__mode=view&amp;_type=entry&amp;id='+a+'">Modifica</a>')}function mtCommentFormOnFocus(){mtShowCaptcha()}var mtCaptchaVisible=false;
function mtShowCaptcha(){var a=mtGetUser();if(!(a&&a.is_authenticated))if(!mtCaptchaVisible)if(a=document.getElementById("comments-open-captcha")){a.innerHTML='<div class="label"><label for="captcha_code">Captcha:</label></div><div class="field"><input type="hidden" name="token" value="MCJFi0wn2NKmZNDt4BTkutliAULvfhyKZFYL4thT" /><img src="/cgi-bin/mt/mt-comments.cgi/captcha/2/MCJFi0wn2NKmZNDt4BTkutliAULvfhyKZFYL4thT" width="150" height="35" /><br /><input name="captcha_code" id="captcha_code" value="" autocomplete="off" /><p>Digita i caratteri che vedi nella immagine qui sopra.</p></div>';mtCaptchaVisible=
true}}var is_preview,user;function mtSetUser(a){if(a){user=a;mtSaveUser();mtFireEvent("usersignin")}}function mtEscapeJS(a){return a=a.replace(/'/g,"&apos;")}function mtUnescapeJS(a){return a=a.replace(/&apos;/g,"'")}
function mtBakeUserCookie(a){var b="";if(a.name)b+="name:'"+mtEscapeJS(a.name)+"';";if(a.url)b+="url:'"+mtEscapeJS(a.url)+"';";if(a.email)b+="email:'"+mtEscapeJS(a.email)+"';";if(a.is_authenticated)b+="is_authenticated:'1';";if(a.profile)b+="profile:'"+mtEscapeJS(a.profile)+"';";if(a.userpic)b+="userpic:'"+mtEscapeJS(a.userpic)+"';";if(a.sid)b+="sid:'"+mtEscapeJS(a.sid)+"';";b+="is_trusted:'"+(a.is_trusted?"1":"0")+"';";b+="is_author:'"+(a.is_author?"1":"0")+"';";b+="is_banned:'"+(a.is_banned?"1":
"0")+"';";b+="can_post:'"+(a.can_post?"1":"0")+"';";b+="can_comment:'"+(a.can_comment?"1":"0")+"';";return b=b.replace(/;$/,"")}
function mtUnbakeUserCookie(a){if(a){for(var b={},c;c=a.match(/^((name|url|email|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/);){a=a.substring(c[1].length);b[c[2]]=c[2].match(/^(is|can)_/)?c[3]=="1"?true:false:mtUnescapeJS(c[3])}if(b.is_authenticated)b.is_anonymous=false;else{b.is_anonymous=true;b.can_post=false;b.is_author=false;b.is_banned=false;b.is_trusted=false}return b}}
function mtGetUser(){if(!user){var a=mtGetCookie(mtCookieName);if(!a)return;user=mtUnbakeUserCookie(a);if(!user){user={};user.is_anonymous=true;user.can_post=false;user.is_author=false;user.is_banned=false;user.is_trusted=false}}return user}var mtFetchedUser=false;
function mtFetchUser(a){a||(a="mtSetUser");if(a=="mtSetUser"&&mtGetUser()){a=document.URL;a=a.replace(/#.+$/,"");a+="#comments-open";location.href=a}else{mtFetchedUser=true;var b=document.createElement("script"),c=(new Date).getTime();b.src="http://www.pigaz.org/cgi-bin/mt/mt-comments.cgi?__mode=session_js&blog_id=2&jsonp="+a+"&ts="+c;document.getElementsByTagName("head")[0].appendChild(b)}}function mtRememberMeOnClick(a){a.checked||mtClearUser(a.form);return true}var mtRequestSubmitted=false;
function mtCommentOnSubmit(a){if(!mtRequestSubmitted){mtRequestSubmitted=true;if(a.armor)a.armor.value="7cd190eb5f839c357c35073715d30e3a7e8ed426";a.bakecookie&&a.bakecookie.checked&&mtSaveUser(a);if(a.preview_button)a.preview_button.disabled=true;if(a.post)a.post.disabled=true;a=mtGetUser();if(!is_preview&&a&&a.is_authenticated){mtFetchedUser=false;mtFetchUser("mtCommentSessionVerify");return false}return true}return false}
function mtCommentSessionVerify(a){var b=mtGetUser(),c=document.comments_form;if(b&&a&&a.sid&&b.sid==a.sid)c.submit();else{alert("La tua sessione \u00e8 scaduta. Autenticati nuovamente per commentare.");mtClearUser();mtFireEvent("usersignin")}}
function mtUserOnLoad(){var a=mtGetUser();if(document.getElementById("comments-form")){if(a&&a.is_authenticated){mtShow("comments-form");mtHide("comments-open-data");mtCaptchaVisible&&mtHide("comments-open-captcha")}a&&a.is_banned&&mtHide("comments-form");is_preview?mtShowCaptcha():mtShowGreeting();var b=document.comments_form;if(b){if(a&&a.is_anonymous){if(a.email)b.email.value=a.email;if(a.name)b.author.value=a.name;if(a.url)b.url.value=a.url;if(b.bakecookie)b.bakecookie.checked=a.name||a.email}else if(a&&
a.sid&&b.sid)b.sid.value=a.sid;if(b.post&&b.post.disabled)b.post.disabled=false;if(b.preview_button&&b.preview_button.disabled)b.preview_button.disabled=false;mtRequestSubmitted=false}}}function mtEntryOnLoad(){var a=document.comments_form;if(a&&a.preview)a.preview.value="";mtFireEvent("usersignin")}
function mtEntryOnUnload(){if(mtRequestSubmitted){var a=document.comments_form;if(a){if(a.post&&a.post.disabled)a.post.disabled=false;if(a.preview_button&&a.preview_button.disabled)a.preview_button.disabled=false}mtRequestSubmitted=false}return true}mtAttachEvent("usersignin",mtUserOnLoad);
function mtSignIn(){var a=document.URL;a=a.replace(/#.+/,"");var b="http://www.pigaz.org/cgi-bin/mt/mt-cp.cgi?__mode=login&blog_id=2";b+=is_preview?document.comments_form?"&entry_id="+document.comments_form.entry_id.value:"&return_url=http%3A%2F%2Fwww.pigaz.org%2F":"&return_url="+encodeURIComponent(a);mtClearUser();location.href=b}
function mtSignInOnClick(a){var b;if(a)(b=document.getElementById(a))||(b=document.getElementById("comment-form-external-auth"));if(b)b.innerHTML='Autenticazione... <span class="status-indicator">&nbsp;</span>';mtClearUser();mtFetchUser("mtSetUserOrLogin");return false}function mtSetUserOrLogin(a){a&&a.is_authenticated?mtSetUser(a):mtSignIn()}
function mtSignOut(a){mtClearUser();a=document.URL;a=a.replace(/#.+/,"");var b="http://www.pigaz.org/cgi-bin/mt/mt-cp.cgi?__mode=logout&static=0";if(is_preview)if(document.comments_form){a=document.comments_form.entry_id.value;b+="&entry_id="+a}else b+="&return_url=http%3A%2F%2Fwww.pigaz.org%2F";else b+="&return_url="+encodeURIComponent(a);location.href=b}function mtSignOutOnClick(){mtSignOut();return false}
function mtShowGreeting(){if(document.comments_form){var a=document.getElementById("comment-greeting");a||(a=document.getElementById("comment-form-external-auth"));if(a){var b;if((b=mtGetUser())&&b.is_authenticated)if(b.is_banned)b='Non hai il permesso di lasciare commenti su questo blog. (<a href="javascript:void(0);" onclick="return mtSignOutOnClick();">esci</a>)';else{var c;if(b.is_author){c='<a href="http://www.pigaz.org/cgi-bin/mt/mt-comments.cgi?__mode=edit_profile&return_url='+encodeURIComponent(location.href);
c+='">'+b.name+"</a>"}else c=b.url?'<a href="'+b.url+'">'+b.name+"</a>":b.name;b='Grazie per esserti autenticato, __NAME__. (<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">esci</a>)';b=b.replace(/__NAME__/,c)}else b='<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">Autenticati</a> tramite OpenID o Facebook. Oppure lascia un commento anonimo.';a.innerHTML=b}}}
function mtReplyCommentOnClick(a,b){mtShow("comment-form-reply");var c=document.getElementById("comment-reply"),d=document.getElementById("comment-reply-label"),j=document.getElementById("comment-text"),h='Rispondi al <a href="#comment-__PARENT__" onclick="location.href=this.href; return false">commento di __AUTHOR__</a>.';h=h.replace(/__PARENT__/,a);h=h.replace(/__AUTHOR__/,b);d.innerHTML=h;c.value=a;c.checked=true;try{j.focus()}catch(u){}mtSetCommentParentID()}
function mtSetCommentParentID(){var a=document.getElementById("comment-reply"),b=document.getElementById("comment-parent-id");if(a&&b){var c=0;if(a.checked==true)c=a.value;b.value=c}}
function mtSaveUser(a){if(!is_preview){var b=mtGetUser();if(a&&(!b||b.is_anonymous)){if(!b){b={};b.is_authenticated=false;b.can_comment=true;b.is_author=false;b.is_banned=false;b.is_anonymous=true;b.is_trusted=false}if(a.author!=undefined)b.name=a.author.value;if(a.email!=undefined)b.email=a.email.value;if(a.url!=undefined)b.url=a.url.value}if(b){var c=mtCookieTimeout*1E3;if(b.is_anonymous&&a&&a.bakecookie&&a.bakecookie.checked)c=31536E6;a=new Date;mtFixDate(a);a.setTime(a.getTime()+c);b=mtBakeUserCookie(b);
mtSetCookie(mtCookieName,b,a,mtCookiePath,mtCookieDomain,location.protocol=="https:")}}}function mtClearUser(){user=null;mtDeleteCookie(mtCookieName,mtCookiePath,mtCookieDomain,location.protocol=="https:")}function mtSetCookie(a,b,c,d,j,h){if(j&&j.match(/^\.?localhost$/))j=null;a=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+d:"")+(j?"; domain="+j:"")+(h?"; secure":"");document.cookie=a}
function mtGetCookie(a){a=a+"=";var b=document.cookie,c=b.indexOf(a);if(c==-1)return"";var d=b.indexOf(";",c+a.length);if(d==-1)d=b.length;return unescape(b.substring(c+a.length,d))}function mtDeleteCookie(a,b,c,d){if(mtGetCookie(a)){if(c&&c.match(/^\.?localhost$/))c=null;document.cookie=a+"="+(b?"; path="+b:"")+(c?"; domain="+c:"")+(d?"; secure":"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function mtFixDate(a){var b=(new Date(0)).getTime();b>0&&a.setTime(a.getTime()-b)}
function mtGetXmlHttp(){if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){for(var a=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){}};if(window.XMLHttpRequest)return new XMLHttpRequest}
function mtInit(){if(!arguments.callee.done){arguments.callee.done=true;window._timer&&clearInterval(window._timer);if(window.onload&&window.onload!==window.mtInit){window.onload();window.onload=function(){}}}}document.addEventListener&&document.addEventListener("DOMContentLoaded",mtInit,false);if(/WebKit/i.test(navigator.userAgent))_timer=setInterval(function(){/loaded|complete/.test(document.readyState)&&mtInit()},10);window.onload=mtInit;
var clearCookie=window.location.hash&&window.location.hash.match(/^#_log(in|out)/)?true:false;if(clearCookie){mtClearUser();RegExp.$1=="in"&&mtFetchUser()}else is_preview&&!user&&mtFetchUser();