
timerID = null;
var active = 0;

function ScrollUp(speed){

    	if(document.getElementById){
        	if(parseInt(txt.style.top) < 0){
        		txt.style.top = parseInt(txt.style.top) + speed + "px";
		}
        	timerID = setTimeout("ScrollUp("+speed+")",30)
    	}
}


function ScrollDown(speed){
   	if(document.getElementById){                        
        	if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ 
        		txt.style.top = parseInt(txt.style.top) - speed + "px";
		}
        	timerID = setTimeout("ScrollDown("+speed+")",30)
    	}
}



function ScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerID);
    	}
}

function ScrollInit() {
	if (document.getElementById) {
        	cnt = document.getElementById("cont");
        	txt = document.getElementById("text");
        	txt.style.top = 0;
    	}
}

function popup(str) {
  if (navigator.appVersion.indexOf ("Macintosh") >=0) {
    window.open (str, "LaMesenda",
      "width=610,height=460,resizable=1,location=no,status=no,menubar=no,scrollbars=yes,toolbar=no")
  } else {
    window.open (str, "LaMesenda",
      "width=610,height=460,resizable=1,location=no,status=yes,menubar=no,scrollbars=yes,toolbar=no,dependent=yes")
  }
}
function SocialBookmarks(Indirizzo, Titolo)
{
	var I = encodeURIComponent(Indirizzo);
	var T = encodeURIComponent(Titolo);
	with (document)
	{
		write('<p>');
		write('<a target="_blank" rel="nofollow" href="http://www.facebook.com/sharer.php?u=' + I + '&t=' + T + '"><img hspace="3" border="0" src="/images/facebook.gif" title="Condividi su Facebook"></a>');
		write('<a target="_blank" rel="nofollow" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + I + '&t=' + T + '"><img hspace="3" border="0" src="/images/yahoo.gif" title="Condividi su Yahoo! MyWeb"></a>');
		write('<a target="_blank" rel="nofollow" href="http://favorites.live.com/quickadd.aspx?marklet=1&url=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/images/live.gif" title="Condividi su Live.com"></a>');
		write('<a target="_blank" rel="nofollow" href="http://www.google.it/bookmarks/mark?op=add&bkmk=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/images/google.gif" title="Condividi su Google Bookmark"></a>');
		write('<a target="_blank" rel="nofollow" href="http://bookmarks.excite.eu/add?url=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/images/excite.gif" title="Condividi su Excite Bookmark"></a>');
	//	write('<a target="_blank" rel="nofollow" href="http://technorati.com/faves/?add=' + I + '"><img hspace="3" border="0" src="/immagini/bookmarks/technorati.gif" title="Condividi su Technorati"></a>');
	//	write('<a target="_blank" rel="nofollow" href="http://del.icio.us/post?url=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/immagini/bookmarks/delicious.gif" title="Condividi su Del.icio.us"></a>');
	//	write('<a target="_blank" rel="nofollow" href="http://digg.com/submit?phase=2&url=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/immagini/bookmarks/digg.gif" title="Condividi su Digg"></a>');
	//	write('<a target="_blank" rel="nofollow" href="http://furl.net/storeIt.jsp?u=' + I + '&t=' + T + '"><img hspace="3" border="0" src="/immagini/bookmarks/furl.gif" title="Condividi su Furl"></a>');
	//	write('<a target="_blank" rel="nofollow" href="http://segnalo.com/post.html.php?url=' + I + '&title=' + T + '"><img hspace="3" border="0" src="/immagini/bookmarks/segnalo_it.gif" title="Condividi su Segnalo"></a>');
		write('</p>');
	}
}
