var foto=new Image();
var apri=false;
var timer="";

function cambia()
{

if (F2.document.images[0].complete == false){
       timer=setTimeout("cambia()",10);
	   }
   else{
       clearTimeout(timer);
	   }
F2.resizeTo((foto.width),(foto.height+44));
}

function big(URL)
{
foto.src=URL;
if (apri==false){
   F2=open ("foto.htm","foto","scrollbars=no,width='300',height='200'");
   txt0="<html>";
   txt1="  <head>";
   txt2="    <title>Ristorante Taverna del Cacciatore</title>";
   txt3="    <link rel='stylesheet' href='../script/stile.css'>";
   txt4="  </head>";
   txt5="  <body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 onLoad='javascript:window.focus();setTimeout(stop(),100)'>";
   txt6="    <div>";
   txt7="      <div><img src="+URL+"></div>";
   txt8="      </div>";
   txt9="         <div id='popupFoot'><div id='closePop'><a href='javascript:window.close()'>&nbsp;chiudi questa finestra</a></div><div id='printPop'><a href='javascript:window.print()'>stampa</a></div>";
   txt10="      </div>";
   txt11="   </div>";
   txt12="  </body>";
   txt13="</html>";
   F2.document.writeln(txt0);
   F2.document.writeln(txt1);
   F2.document.writeln(txt2);
   F2.document.writeln(txt3);
   F2.document.writeln(txt4);
   F2.document.writeln(txt5);
   F2.document.writeln(txt6);
   F2.document.writeln(txt7);
   F2.document.writeln(txt8);
   F2.document.writeln(txt9);
   F2.document.writeln(txt10);
   F2.document.writeln(txt11);
   F2.document.writeln(txt12);
   F2.document.write(txt13);
   cambia();
   apri=true;
   }
else
{
	F2.close();
	apri=false;
	big (URL);
}
}

function genericPop(myUrl,myWinName,myWidth,myHeight,myPars) {
	var winl = (screen.width - myWidth) / 2;
	var wint = (screen.height - myHeight) / 2;
	parameters = myPars + '';
	if (parameters == '') parameters = ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';
	gwin=window.open(myUrl,myWinName,'width='+myWidth+',height='+myHeight+',left='+winl+',top='+wint+parameters);
	gwin.focus();
}


	
function popupimage(url, ptitle, alttext, IdLang) {
	if ((ptitle=='')) {wintitle = 'Ristorante Taverna del Cacciatore - Cartina';} else {wintitle = ptitle;}
	if ((IdLang=='italian')) {TxtCloseWin = 'Chiudi finestra';TxtPrintWin = 'Stampa immagine';} else {TxtCloseWin = 'Close window';TxtPrintWin = 'Print image';}
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
	w.document.write("<HTML><HEAD><TITLE>"+wintitle+"</TITLE></HEAD>");
	w.document.write("<link href='../script/stile.css' rel='stylesheet' type='text/css' />");
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+6,document.images[0].height+126); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
	if (document.all) {
    	//IE4 = true;
		w.document.write("<BODY onload='checksize();' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	}
	else {
    	//IE4 = false;
		w.document.write("<BODY onload='checksize();' onblur='window.close();' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	}
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>");
	w.document.write("<TR align='center'><TD colspan=2,valign='top',align='center'><IMG src='"+url+"' border=0 alt='"+alttext+"' onClick='top.close()'></TD></TR>");
	w.document.write("<TR align='center'><TD colspan=2,align='center'><h4>"+alttext+"</h4></TD></TR>");
	w.document.write('<TR><form><td align="center"><div id="btclose"><input type="Button" NAME="close" VALUE="'+TxtCloseWin+'" onClick="top.close()"></div></td></form>');
	if (document.all) {
    	//IE4 = true;
		w.document.write("<form><td align='center'><input type='Button' NAME='print' VALUE='"+TxtPrintWin+"' onClick='javascript:self.print();return false;'></td></form></tr>");
	}
	else {
    	//IE4 = false;
		w.document.write("<form><td align='center'><div id='btprint'><input type='Button' NAME='print' VALUE='"+TxtPrintWin+"' onClick='javascript:document.getElementById(\"btprint\").style.visibility=\"hidden\";document.getElementById(\"btclose\").style.visibility=\"hidden\";window.print();return false;'></div></td></form></tr>");
		///if (document.layers) {
	    //	//NS4 = true;
		//}
		//else {
	    //	//NS4 = false;
		//}
	}
	w.document.write("</TABLE>");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

