function show_ad(A){if(getCookieOverAd("over13")!="1"){document.getElementById(A).style.display="block";
setCookieOverAd("over13","1","180");
setTimeout("close_ad('overlayad')",10000)
}}function close_ad(A){document.getElementById(A).style.display="none"
}getCookieOverAd=function(A){var B=new RegExp(A+"=[^;]+","i");
if(document.cookie.match(B)){return document.cookie.match(B)[0].split("=")[1]
}return""
};
setCookieOverAd=function(B,D,A){var E=new Date;
E.setSeconds(E.getSeconds()+A);
var C=E.toUTCString();
document.cookie=B+"="+D+";path=/"
};
function initxml(){var B=false;
if(window.XMLHttpRequest){B=new XMLHttpRequest();
if(B.overrideMimeType){B.overrideMimeType("text/xml")
}}else{if(window.ActiveXObject){try{B=new ActiveXObject("Msxml2.XMLHTTP")
}catch(A){try{B=new ActiveXObject("Microsoft.XMLHTTP")
}catch(A){}}}}if(!B){alert("Giving up :( Non riesco a creare una istanza XMLHTTP");
return false
}return(B)
}function onStateChange(B,A){if(B.readyState==4){if(B.status==200){document.getElementById(A).innerHTML=B.responseText
}}}function Querystring(A){this.params={};
if(A==null){A=location.search.substring(1,location.search.length)
}if(A.length==0){return 
}A=A.replace(/\+/g," ");
var C=A.split("&");
for(var D=0;
D<C.length;
D++){var F=C[D].split("=");
var B=decodeURIComponent(F[0]);
var E=(F.length==2)?decodeURIComponent(F[1]):B;
this.params[B]=E
}}Querystring.prototype.get=function(A,B){var C=this.params[A];
return(C!=null)?C:B
};
Querystring.prototype.contains=function(A){var B=this.params[A];
return(B!=null)
};
function show_date(){var A=new Array(7);
A[0]="Domenica";
A[1]="Lunedi";
A[2]="Martedi";
A[3]="Mercoledi";
A[4]="Giovedi";
A[5]="Venerdi";
A[6]="Sabato";
var F=new Array(12);
F[0]="Gennaio";
F[1]="Febbraio";
F[2]="Marzo";
F[3]="Aprile";
F[4]="Maggio";
F[5]="Giugno";
F[6]="Luglio";
F[7]="Agosto";
F[8]="Settembre";
F[9]="Ottobre";
F[10]="Novembre";
F[11]="Dicembre";
var D=new Date();
var G=D.getDay();
var B=D.getDate();
var E=D.getMonth();
var H=D.getHours();
var C=D.getMinutes();
var I=D.getSeconds();
parseInt(H)<10?H="0"+H:null;
parseInt(C)<10?C="0"+C:null;
myclock="";
myclock+=A[G]+" "+B+" "+F[E]+" "+H+":"+C;
document.write(myclock)
}function setHome(){if(navigator.appName.indexOf("Explorer")>=0){document.body.style.behavior="url(#default#homepage)";
document.body.setHomePage("http://www.affaritaliani.it/")
}else{if(navigator.appName.indexOf("Netscape")>=0||navigator.appName.indexOf("Opera")>=0){document.location.href="/sethome_firefox.html"
}}}var az_p=location.protocol=="https:"?"https:":"http:";
var az_r=Math.floor(Math.random()*99999999);
if(!document.phpAds_used){document.phpAds_used=","
}function az_adjs(B,C){if(B>-1){var A="<script language='JavaScript' type='text/javascript' src='"+az_p+"//ads.arcuspubblicita.it/max/adjs.php?n="+C+"&zoneid="+B;
A+="&exclude="+document.phpAds_used+"&r="+az_r;
if(window.location){A+="&loc="+escape(window.location)
}if(document.referrer){A+="&referer="+escape(document.referrer)
}if(document.mmm_fo){A+="&mmm_fo=1"
}A+="'><\/script>";
document.write(A)
}}function chk_search(A){if(A.rdsearch[1].checked==true){document.location.href="http://www.affaritaliani.it/websearch/?cx=partner-pub-5288674212710730:ufqkgtqxru1&cof=FORID:11&ie=ISO-8859-1&q="+A.q.value+"&sa=Cerca";
return(false)
}else{return(true)
}}function striptxtHTML(B){var A=/(<([^>]+)>)/gi;
B=B.replace(A,"");
A=/'/gi;
B=B.replace(A,"");
return(B)
}function google_ad_request_done(B){var C="";
var A;
if(B.length==0){return 
}switch(google_ad_layout){case"ads_top_body":C+='<a class="ads_by_google" href="'+google_info.feedback_url+'">Annunci Google</a><br>';
for(A=0;
A<B.length;
++A){C+='<div class="announce"><a class="title" target="_blank" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+"';return true\">"+B[A].line1+'</a><br><a class="announce_url" target="_blank" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+"';return true\">"+B[A].visible_url+'</a><span class="announce_description">'+B[A].line2+" "+B[A].line3+"</span> </div>"
}break;
case"adsense_300x250":case"adsense_bottom":C+='<a class="ads_by_google" href="'+google_info.feedback_url+'">Annunci Google</a><br>';
for(A=0;
A<B.length;
++A){C+='<div class="announce"> <a class="title" target="_blank" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+"';return true\">"+B[A].line1+'</a><span class="announce_description"><br>'+B[A].line2+" "+B[A].line3+'</span><br><a class="announce_url" target="_blank" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+"';return true\">"+B[A].visible_url+"</a></div>"
}break;
default:C+='<a href="'+google_info.feedback_url+'" class="adsense_annunci">Annunci Google</a><br>';
for(A=0;
A<B.length;
++A){C+='<br><a style="text-decoration: none;" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+'\';return true" target="_blank"><span class="adsense_titolo"> <b>'+B[A].line1+'</b></span></a><br><span class="adsense_testo">'+B[A].line2+" "+B[A].line3+'</span><br><span><a class="adsense_link" href="'+B[A].url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+B[A].visible_url+'\';return true" target="_blank">'+B[A].visible_url+"</span></a><br>"
}}document.write(C);
return 
}function show_google_afc(B,A,D,C){if(!D){D=5
}if(!A){A="9821690123"
}google_ad_layout=B;
google_ad_client="pub-5288674212710730";
google_ad_channel=A;
google_ad_output="js";
google_max_num_ads=D;
google_skip=C;
google_ad_type="text";
google_feedback="on";
google_language="it"
}function hideAdsense(A){var B=new String(document.location.href).toLowerCase();
if(B.indexOf("sessoscritto")>0){document.getElementById(A).style.display="none"
}if(B.indexOf("/rubriche/eros/")>0){document.getElementById(A).style.display="none"
}if(B.indexOf("/bottaerisposta/")>0){document.getElementById(A).style.display="none"
}if(B.indexOf("urbino-uccide-a-bastonate-bagagliaio131108")>0){document.getElementById(A).style.display="none"
}if(B.indexOf("/coffee/covergirl")>0){document.getElementById(A).style.display="none"
}else{if(B.indexOf("/coffee/video/")>0){document.getElementById(A).style.display="none"
}else{if(B.indexOf("/coffee/")>0){document.getElementById(A).style.display="none"
}}}if(B.indexOf("/night/")>0){document.getElementById(A).style.display="none"
}if(B.indexOf("calendari")>0){document.getElementById(A).style.display="none"
}}function change_spalla(A){if(A==1){document.getElementById("spalla1").style.display="block";
document.getElementById("spalla2").style.display="none";
document.getElementById("spalla3").style.display="none";
document.getElementById("spalla_btn1").innerHTML="1";
document.getElementById("spalla_btn2").innerHTML="<a href=\"javascript:change_spalla('2')\">2</a>";
document.getElementById("spalla_btn3").innerHTML="<a href=\"javascript:change_spalla('3')\">3</a>";
document.getElementById("spalla_btn1").style.backgroundColor="#DBDAD2";
document.getElementById("spalla_btn2").style.backgroundColor="#FFFFFF";
document.getElementById("spalla_btn3").style.backgroundColor="#FFFFFF"
}if(A==2){document.getElementById("spalla1").style.display="none";
document.getElementById("spalla2").style.display="block";
document.getElementById("spalla3").style.display="none";
document.getElementById("spalla_btn1").innerHTML="<a href=\"javascript:change_spalla('1')\">1</a";
document.getElementById("spalla_btn2").innerHTML="2";
document.getElementById("spalla_btn3").innerHTML="<a href=\"javascript:change_spalla('3')\">3</a>";
document.getElementById("spalla_btn1").style.backgroundColor="#FFFFFF";
document.getElementById("spalla_btn2").style.backgroundColor="#DBDAD2";
document.getElementById("spalla_btn3").style.backgroundColor="#FFFFFF"
}if(A==3){document.getElementById("spalla1").style.display="none";
document.getElementById("spalla2").style.display="none";
document.getElementById("spalla3").style.display="block";
document.getElementById("spalla_btn1").innerHTML="<a href=\"javascript:change_spalla('1')\">1</a";
document.getElementById("spalla_btn2").innerHTML="<a href=\"javascript:change_spalla('2')\">2</a>";
document.getElementById("spalla_btn3").innerHTML="3";
document.getElementById("spalla_btn1").style.backgroundColor="#FFFFFF";
document.getElementById("spalla_btn2").style.backgroundColor="#FFFFFF";
document.getElementById("spalla_btn3").style.backgroundColor="#DBDAD2"
}}function showcomments(B){var A=new Querystring();
var C=A.get("page");
var D=A.get("tbk");
if(D){document.getElementById("ContentNews").style.display="none";
if(C){urlcomment="/static/script/showComment.aspx?idContent="+B+"&tbk="+D+"&pg="+C
}else{urlcomment="/static/script/showComment.aspx?idContent="+B+"&tbk="+D
}document.getElementById("ContentComment").innerHTML="<div style='width: 660px; height: 60px; margin-bottom: 20px; border: solid 1px #E5E5E5;'><div style='position: absolute; margin: 20px 0 0 20px;'><img src='/static/img/loading.gif'></div><div class='wait' style='position: absolute; margin: 22px 0 0 54px;'>Sto caricando il commento...</div></div>";
http_request_cmt=initxml();
http_request_cmt.open("GET",urlcomment,true);
http_request_cmt.onreadystatechange=function(){onStateChange(http_request_cmt,"ContentComment")
};
http_request_cmt.send(null)
}if(C){urlcommentslist="/static/script/showComments.aspx?idContent="+B+"&page="+C
}else{urlcommentslist="/static/script/showComments.aspx?idContent="+B
}document.getElementById("ContentListComments").innerHTML="<div style='width: 660px; height: 60px; margin-bottom: 20px; border: solid 1px #E5E5E5;'><div style='position: absolute; margin: 20px 0 0 20px;'><img src='/static/img/loading.gif'></div><div class='wait' style='position: absolute; margin: 22px 0 0 54px;'>Sto caricando la lista dei commenti...</div></div>";
http_request_cmtlist=initxml();
http_request_cmtlist.open("GET",urlcommentslist,true);
http_request_cmtlist.onreadystatechange=function(){onStateChange(http_request_cmtlist,"ContentListComments")
};
http_request_cmtlist.send(null)
}function showstars(A){http_request=initxml();
http_request.open("GET","/static/stars/starshow.asp?idnews="+A,true);
http_request.onreadystatechange=function(){onStateChange(http_request,"showstars")
};
http_request.send(null)
}function showstars_tags(A){var B=false;
B=initxml();
B.open("GET","/static/stars/starshow.asp?idnews="+A,true);
B.onreadystatechange=function(){onStateChange(B,"showstars"+A)
};
B.send(null)
}function votestars(A,B){url="/static/stars/starsvote.asp?idnews="+A+"&stars="+B;
http_request=initxml();
http_request.open("GET",url,true);
http_request.onreadystatechange=function(){document.getElementById("votestars").innerHTML="Grazie. Il tuo voto e' stato registrato"
};
http_request.send(null);
showstars(A)
}function starsover(whichstars){for(i=1;
i<=whichstars;
++i){starimg=eval("document.stars"+i);
starimg.src="/static/img/star.gif"
}}function starsout(){for(i=1;
i<=5;
++i){starimg=eval("document.stars"+i);
starimg.src="/static/img/starw.gif"
}}function rank_change(A){if(A==0){document.getElementById("starheader").innerHTML="Le notizie pi&#249; gradite";
document.getElementById("stararrowleft").innerHTML="&lt;";
document.getElementById("stararrowright").innerHTML='<a href="javascript:rank_change(1)">></a>';
document.getElementById("stararrowleft").style.backgroundColor="#FFB072";
document.getElementById("stararrowright").style.backgroundColor="#E03501";
document.getElementById("starbyrank").style.display="block";
document.getElementById("starbyvote").style.display="none";
document.getElementById("starbycomments").style.display="none"
}if(A==1){document.getElementById("starheader").innerHTML="Le notizie pi&#249; votate";
document.getElementById("stararrowleft").innerHTML='<a href="javascript:rank_change(0)"><</a>';
document.getElementById("stararrowright").innerHTML='<a href="javascript:rank_change(2)">></a>';
document.getElementById("stararrowleft").style.backgroundColor="#E03501";
document.getElementById("stararrowright").style.backgroundColor="#E03501";
document.getElementById("starbyrank").style.display="none";
document.getElementById("starbyvote").style.display="block";
document.getElementById("starbycomments").style.display="none"
}if(A==2){document.getElementById("starheader").innerHTML="Le notizie pi&#249 commentate";
document.getElementById("stararrowleft").innerHTML='<a href="javascript:rank_change(1)"><</a>';
document.getElementById("stararrowright").innerHTML='<a href="javascript:rank_change(3)">></a>';
document.getElementById("stararrowleft").style.backgroundColor="#E03501";
document.getElementById("stararrowright").style.backgroundColor="#E03501";
document.getElementById("starbyrank").style.display="none";
document.getElementById("starbyvote").style.display="none";
document.getElementById("starbycomments").style.display="block";
document.getElementById("starbyusers").style.display="none"
}if(A==3){document.getElementById("starheader").innerHTML="Gli utenti pi&#249 attivi";
document.getElementById("stararrowleft").innerHTML='<a href="javascript:rank_change(2)"><</a>';
document.getElementById("stararrowright").innerHTML=">";
document.getElementById("stararrowleft").style.backgroundColor="#E03501";
document.getElementById("stararrowright").style.backgroundColor="#FFB072";
document.getElementById("starbyrank").style.display="none";
document.getElementById("starbyvote").style.display="none";
document.getElementById("starbycomments").style.display="none";
document.getElementById("starbyusers").style.display="block"
}}function showbetshop(A){var B=new String(document.location.href).toLowerCase();
if(B.indexOf("/sport/")>0||B.indexOf("/entertainment/")>0||B.indexOf("/giochiescommesse/")>0){betrnd=Math.floor(Math.random()*100+1);
if(A=="500"){if(betrnd<=70){document.write('<div><object height="42" width="670"><param name="movie" value="http://www.affaritaliani.it/static/upl/pok/poker420x26.swf" /> <embed src="http://www.affaritaliani.it/static/upl/pok/poker420x26.swf" width="670" height="42" type="application/x-shockwave-flash"></embed></object></div><br><br>')
}else{document.write('<div><object height="42" width="670"><param name="movie" value="http://www.affaritaliani.it/static/upl/cal/0002/calcio420x26.swf" /> <embed src="http://www.affaritaliani.it/static/upl/cal/0002/calcio420x26.swf" width="670" height="42" type="application/x-shockwave-flash"></embed></object></div><br><br>')
}}if(A=="234"){if(betrnd<=70){document.write('<br><div><object height="90" width="234"><param name="movie" value="http://www.affaritaliani.it/static/upl/pok/poker235x90.swf" /> <embed src="http://www.affaritaliani.it/static/upl/pok/poker235x90.swf" width="234" height="90" type="application/x-shockwave-flash"></embed></object></div><br>')
}else{document.write('<br><div><object height="90" width="234"><param name="movie" value="http://www.affaritaliani.it/static/upl/cal/0002/calcio235x90.swf" /> <embed src="http://www.affaritaliani.it/static/upl/cal/0002/calcio235x90.swf" width="234" height="90" type="application/x-shockwave-flash"></embed></object></div><br>')
}}}}function listpolls(A){var B=false;
B=initxml();
B.open("GET","/static/script/listpolls.asp?idnews="+A,true);
B.onreadystatechange=function(){onStateChange(B,"listpolls")
};
B.send(null)
}function listparliamone(A){document.getElementById("parliamone").innerHTML="<div style='width: 300px;'><div style='height: 200px; margin: 0px; border: solid 1px black; padding: 4px 10px 10px 10px;'><div style='position: absolute; margin: 40px 0 0 40px;'><img src='/static/img/wait30.gif'></div><div class='wait' style='position: absolute; margin: 46px 0 0 80px'>Carico i commenti...</div></div></div>";
var B=false;
B=initxml();
B.open("GET","/static/files/comments_parliamone_"+A+".htm",true);
B.onreadystatechange=function(){onStateChange(B,"parliamone")
};
B.send(null)
}function listnews(A){var B=0;
var C=new String(document.location.href).toLowerCase();
if(C.indexOf("/mediatech/")>0){B=109
}if(C.indexOf("/entertainment/")>0){B=112
}if(C.indexOf("/cronache/")>0){B=4
}if(C.indexOf("/politica/")>0){B=6
}if(C.indexOf("/economia/")>0){B=3
}if(C.indexOf("/sport/")>0){B=82
}if(C.indexOf("/culturaspettacoli/")>0){B=88
}if(C.indexOf("/milano/")>0){B=87
}if(B>0){http_request_listnews=initxml();
http_request_listnews.open("GET","/static/generated/archivio_news_"+B+".htm",true);
http_request_listnews.onreadystatechange=function(){onStateChange(http_request_listnews,A)
};
http_request_listnews.send(null)
}}function ticker_start(){var A=ultimissime_get_total();
ultimissime_rotate_content(0,A)
}function ultimissime_get_total(){var totalcontent=0;
if(document.all){while(eval("document.all.ultimissime"+totalcontent)){totalcontent++
}}else{while(document.getElementById("ultimissime"+totalcontent)){totalcontent++
}}return(totalcontent)
}function ultimissime_rotate_content(B,C){var A=5000;
ultimissime_expand_one(B,C);
B=(B<C-1)?B+1:0;
setTimeout(function(){ultimissime_rotate_content(B,C)
},A)
}function ultimissime_contract_all(tot){for(y=0;
y<tot;
y++){if(document.all){eval("document.all.ultimissime"+y).style.display="none"
}else{document.getElementById("ultimissime"+y).style.display="none"
}}}function ultimissime_expand_one(which,tot){ultimissime_contract_all(tot);
if(document.all){eval("document.all.ultimissime"+which).style.display="inline"
}else{document.getElementById("ultimissime"+which).style.display="inline"
}};