
$(document).ready(
	function(){
		$("#fotoWrapper").draggable();
		//$("#body").height($("#body").height());
		//$("#body").css("height", $("#body").height());
		//alert($("#body").height());
	}
);

function displayNone(id){
	document.getElementById(id).style.display="none";	
}

function displayBlock(id){
	document.getElementById(id).style.display="block";	
}

function visibleDiv(id){
	document.getElementById(id).style.visibility="visible";
}

function swapBg(){
	//alert("swapBg");
	displayNone("background");
	//visibleDiv('cover');
}

function setLingua(lingua){
	if (lingua=="en"){
		document.getElementById("linkInglese").style.display="none";
	}
	else{
		document.getElementById("linkItaliano").style.display="none";
		document.getElementById("mask").style.display="block";
	}
}

function setOverflow(heightNeed){
	heightWindow=document.documentElement.clientHeight;
	document.getElementById("cover").style.top=heightNeed+"px";
	//document.getElementById("fotoContainer").style.top=(heightNeed-500)+"px";
	//width=document.documentElement.clientWidth;
	
	if (heightWindow>(heightNeed+250)){ 
		//alert("heightWindow>heightNeed");
		//document.getElementById("body").style.overflow="hidden";
		document.getElementById("cover").style.height=(heightWindow-heightNeed)+"px"
		document.getElementById("body").style.height=heightWindow+"px"
	}
	else{
		//alert("NOT heightWindow>heightNeed");
		//document.getElementById("body").style.overflow="scroll";
		document.getElementById("cover").style.height=260+"px";
		document.getElementById("body").style.height=(heightNeed+100)+"px";
	}
	
/*	if (width>1000){ 
		//document.getElementById("body").style.overflow="hidden";
		document.getElementById("body").style.width=width+"px"
	}
	else{
		//document.getElementById("body").style.overflow="scroll";
		document.getElementById("body").style.width=1001+"px"
	}*/
	//if ((height>600)&&(width>1000)) document.getElementsByTagName("body")[0].style.overflow="hidden";
	//else document.getElementsByTagName("body")[0].style.overflow="scroll";
	//alert(document.getElementById("body").style.overflow);
}
