function lettore(){
   var titolo = document.rss.titolo.value;
   var url = document.rss.url.value;
   var largo = document.rss.larghezza.value;
   var alto = document.rss.altezza.value;
   var sfondo = document.rss.sfondo.options[document.rss.sfondo.selectedIndex].value;
   var testo = document.rss.testo.options[document.rss.testo.selectedIndex].value;
   var bordo = document.rss.bordo.options[document.rss.bordo.selectedIndex].value;
   //document.rss.submit();
   //window.location="http://www.donatantonio.net/blog/widgets/rss-feedreader/?url="+url+"&titolo="+titolo+"&larghezza="+largo+"&altezza="+alto+"&sfondo="+sfondo+"&testo="+testo+"&bordo="+bordo+"";
   jQuery('#passo_2').html("<p style='text-align:center;color:red'>Attendi generazione lettore...</p>");
   jQuery.ajax({
     type: "GET",
     dataType: "html",
     url: "http://www.donatantonio.net/blog/wp-content/themes/ultrapixel/feed_reader.php",
     data: "url="+url+"&titolo="+titolo+"&larghezza="+largo+"&altezza="+alto+"&sfondo="+sfondo+"&testo="+testo+"&bordo="+bordo,
     success: function(dati){
        jQuery('#passo_2').html(dati);
     }
     });
}

function left(){
    var a = document.getElementById('img1').src;
    var la = document.getElementById('img1').onclick;
    var b = document.getElementById('img2').src;
    var lb = document.getElementById('img2').onclick;
    var c = document.getElementById('img3').src;
    var lc = document.getElementById('img3').onclick;
    
    document.getElementById('img1').src = b;
    document.getElementById('img1').onclick=lb;
    document.getElementById('img2').src = c;
    document.getElementById('img2').onclick=lc;
    document.getElementById('img3').src = a;
    document.getElementById('img3').onclick=la;
}

function right(){
    var a = document.getElementById('img1').src;
    var la = document.getElementById('img1').onclick;
    var b = document.getElementById('img2').src;
    var lb = document.getElementById('img2').onclick;
    var c = document.getElementById('img3').src;
    var lc = document.getElementById('img3').onclick;
    
    document.getElementById('img1').src = c;
    document.getElementById('img1').onclick=lc;
    document.getElementById('img2').src = a;
    document.getElementById('img2').onclick=la;
    document.getElementById('img3').src = b;
    document.getElementById('img3').onclick=lb;
}

// Fabio Donatantonio 2010 - http://www.donatantonio.it/
function centra(div){
    var DIVwidth = jQuery(div).width();    
    var DIVheight = jQuery(div).height();
    var SCREENwidth = jQuery(document).width();
    var SCREENheight = jQuery(window).height();    
    var SCREENscrolltop = jQuery(window).scrollTop();
    jQuery(div).animate({   
        top: (SCREENheight-DIVheight)/2+SCREENscrolltop+"px",
        left: (SCREENwidth-DIVwidth)/2+"px"
    },100,function(){
        centra(div);
    });     
}

function Mail(title,url){   
    var w = 300;   
    var h = 480;   
    var l = Math.floor((screen.width-w)/2);   
    var t = Math.floor((screen.height-h)/2);       
    window.open("http://www.donatantonio.net/mail/index.php?tit_art="+escape(title)+"&url="+escape(url),"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l); 
}

sfHover = function() {
    if (!document.getElementsByTagName) return false;
    var sfEls = document.getElementById("nav").getElementsByTagName("li");

    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
                          this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }

}
if (window.attachEvent) window.attachEvent("onload", sfHover);

jQuery(document).ready(function(){
    jQuery("ul#news").liScroll({travelocity: 0.05});
    
});

