function openFoto(f,tit){
	window.open("foto.php?t=" + tit + "&p=" + f , "popFoto" , "width=610,height=510");
}


/*****

faq script

************/

	
	//	$('#clock').toggle();
	//	$('#db_res').hide();
		
		
		//var id=$(this).attr("class").substr(8,10);
		//$("a[class*='request_']").removeClass( "active" );
		//$(this).addClass("active");
$(document).ready(function(){
	
	var old='a1';
	 $("a[class*='openFaq_']").click(function () {
	 $("a[class*='openFaq_']").css('font-weight','normal');
	 $(this).css('font-weight','bold');
	 
			var id=$(this).attr("class").substr(8,10);
			if($(".answer_"+id).css("display")=='none') {
					$(".answer_"+old).hide("slow", function() {
						old=id;
						$(".answer_"+id).slideDown("slow");
					});
				}
				});
			
	});		



var zoomWin = null;

function zoom(i,w,h,a,d) {
 var offsetx = 80;
 var offsety = 80;
 var opts = "width="+(w+offsetx)+",height="+(h+offsety)+",status,scrollbars, screenX=20,screenY=40,left=20,top=40";

 if (zoomWin && zoomWin.open) {
    zoomWin.close();
 };
 zoomWin  = window.open("","Zoom",opts);
 zoomWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it"><head><link type="text/css" rel="stylesheet" href="../img/style01/style01.css" /> </head><body id="popupImage" onclick="javascript:window.close()"><div id="image"><img src="'+i+'" width="'+w+'" height="'+h+'" alt="'+a+'" /><p>'+d+'</p></div></body></html>');
}

function changeImage(id,i,w,h,a,d) {
    obj = document.getElementById(id);
    obj.src = i;
    obj.width=w;
    obj.height=h;

    objNote = document.getElementById(id+"Note");
    if (objNote) {
        objNote.firstChild.innerHTML = d;
    }
}

function changeImageWFN(id,i,w,h,a,d,idp,fn) {
    obj = document.getElementById(id);
    obj.src = i;
    obj.width=w;
    obj.height=h;

    objNote = document.getElementById(id+"Note");
    if (objNote) {
        objNote.firstChild.innerHTML = d;
    }
	
	 var ob = document.getElementById(idp);
	 ob.innerHTML = '<strong>Nome file:</strong>' + fn;
	
}
