$(document).ready(function(){
						   
if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myHeight_1 = window.innerHeight;		
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myHeight_1 = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	myHeight_1 = document.body.clientHeight;
}

myHeight_2 = document.body.scrollHeight;

	
if (myHeight_1 > myHeight_2) {
	myHeight = myHeight_1-20;
} else {
	myHeight = myHeight_2; 
}



//alert (myHeight_2);
//alert (myHeight_1);


						  		
	// inizio zoom AURORA
		$("#aurora_gall a").click(function(){
		var url_img = $(this).attr("rel");
		$("body").append("<div id='pop' style='position:absolute; z-index:10000; top:0; width:100%;'><div style='margin:0 auto; padding:10px 0 2px 0; text-align:center;'><a href='#' onclick='closePop();'><img src='"+url_img+"' border:0; /></a><div><a href='#' onclick='closePop();'>close</a></div></div></div>");
		$("#pop").css("height",myHeight+"px");
		window.scrollTo(0,0);
		return false;
	});	
	
	// fine zoom

	// inizio zoom CALENDARIO
		$("#calendario_gall a.cal_zoom").click(function(){
		var url_img = $(this).attr("rel");
		$("body").append("<div id='pop' style='position:absolute; z-index:10000; top:0; width:100%; height:100%;'><div style='margin:0 auto; padding:10px 0 2px 0; text-align:center;'><a href='#' onclick='closePop();'><img src='"+url_img+"' border:0; /></a><div><a href='#' onclick='closePop();'>close</a></div></div></div>");
		return false;
	});	
	
	// fine zoom
	
	// Pagina ID 197
	var thisUrl = location.href;
	if (thisUrl.indexOf("news_articolo.asp?art=197") != -1) {
					$("td #sottotitolo").removeClass("comm_padding_sottotit");
					$("td #sottotitolo").addClass("txt_var")
				}
});

function closePop() {
	$("#pop").fadeOut("normal",function(){
		$(this).remove();
	});
}
