function reapply(){
setTimeout("slideit()",2000)
return true
}
function imageChange(imageID,imageName) 
{
 document.images[imageID].src = eval(imageName + ".src");
}
function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

//document.form_sms.Invia_SMS.disabled=true;
function alll() {
	var m = document.form_sms.Cod_SMS.value;
	var mm = m.length;
	//document.f1.t2.value = mm;
	if(mm >= 6) {
		//alert(document.form_sms.Cod_SMS.value)
		document.form_sms.Invia_SMS.disabled=false;
	}
	else
	{
		document.form_sms.Invia_SMS.disabled=true;
	}
	setTimeout("alll()" ,0);
}

var image1=new Image()
image1.src="images/libro/2.gif"
var image2=new Image()
image2.src="images/libro/3.gif"
var image3=new Image()
image3.src="images/libro/1.gif"

window.onerror=reapply

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
function mostra_banner() {
	document.getElementById('div2').style.height=0;
	document.getElementById('div2').style.visibility="visible";
	setTimeout("aumenta()", 10);
	
}
function nascondi_banner() {
//alert("ok")

	setTimeout("diminuisci()", 10);

}
function aumenta() {
height1=parseInt(document.getElementById('div2').style.height)
if (height1<364) {
height1+=8;
	document.getElementById('div2').style.height=parseInt(height1);
	altezza=document.getElementById('div2').style.height;
	setTimeout("aumenta()", 10);
	}
else
	{
		//document.getElementById('div2').style.visibility="hidden";
	}
}

function diminuisci() {
height1=parseInt(altezza)
if (height1>1) {
height1-=8;
if (height1<=8)
	{
	height1=0;
	document.getElementById('div2').style.height=0;
	document.getElementById('div2').style.visibility="hidden";
	}
	document.getElementById('div2').style.height=parseInt(height1);
	altezza=document.getElementById('div2').style.height;
	setTimeout("diminuisci()", 10);
	}
else
	{
		//alert("Festa dei Veneti")
		document.getElementById('div2').style.height=0;
		document.getElementById('div2').style.visibility="hidden";
	}
}

document.getElementById('div2').style.top=59;
document.getElementById('div2').style.height=0;