// JavaScript Document
	var dominio="hotelvilladellepalme.eu"
	var quantenews=1;
	var altezza=50;
	var step=altezza;
	var termine=quantenews*step;
	var pausa=3500;
	var velocity=100;
	var timerId;
    var stile = "top=200, left=100, width=450, height=400, status=no, menubar=no, toolbar=no scrollbar=no";
     function Popup(apri) {
        window.open(apri, "", stile);
     }

function writemail(email,classe) {
	var myemail=email + "@" + dominio
	document.write("<a href=\"mailto:" + myemail + "\" class=\"" + classe + "\">" + myemail + "</a>");
}
function writesito(classe) {
	var mysito=dominio
	document.write("<a href=\"http://www." + mysito + "\" class=\"" + classe + "\">www." + mysito + "</a>");
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function scrollh() {
//alert("ok");
	var contenitore,
		contenuto,
		hDist,
		box_width,
		max_width;
		
		contenuto=document.getElementById("testo_news");
		contenitore=document.getElementById("contenitore");
		box_width=contenitore.offsetWidth;
		
		max_Width=parseInt(contenuto.offsetWidth)+5;
		hDist=parseInt(contenuto.style.left)-10;
		//scrollo solo se la larghezza del contenuto è inferiore allo spostamento verso sinistra
		if (max_Width>Math.abs(parseInt(contenitore.offsetWidth))) {
			if (max_Width>Math.abs(parseInt(contenuto.style.left))) {
				contenuto.style.left=hDist.toString() + "px";
			} else {
				contenuto.style.left=box_width.toString() + "px";
			}
		}	
		//writelog(contenuto.style.left + " - larghezza contenuto: " + contenuto.offsetWidth);
		timerId=setTimeout("scrollh()",velocity);
}


		
		
		
		function stop()
		{
		  clearTimeout(timerId);
		}
		
		function go()
		{
		  timerId=setTimeout("scrollh()",velocity);
		}
		
	

