<!--

// PopupImg function (c)2001-2003 ARC Graphics 
// latest revision 13.1.2003
// opens the specified image 'ImgSrc' in dynamically created pop-up window   
// PopupImg ( ImgSrc , ImgName , ImgPad , ColorBg , WinXpos , WinYpos )      
// exept ImgSrc, arguments are optional; quotes are requiered between commas 

// language (c)2001 ARC Graphics 
	if (navigator.language) document.language = navigator.language;
	if (navigator.browserLanguage) document.language = navigator.browserLanguage;
	if (document.language == "") document.language = "en";
	else document.language = document.language.substring(0,2);
	Lang=document.language;

function WinClosed(WinImage) {
	if (!WinImage) alert ("no WinImage") ;
	if (!WinImage.closed()) WinImage.close() ;
	}
function PopupImg ( ImgSrc , ImgName , ImgPad , ColorBg , WinXpos , WinYpos ) {
	// customize defaults
	defImgPad = 0 ; defWinWidth = 300 ; defWinHeight = 200 ; defWinXpos = 80 ; defWinYpos = 40 ;
	ColorBg =	(!ColorBg||ColorBg=="undefined") ? "#CCCCFF" : ColorBg ; LoadingTextMSec = 1500 ;
	ColorFont = "#333366" ;	FontFace = "sans-serif" ;
	LoadingTextE =	"... loading picture, please wait ...";
	LoadingTextI =	"... caricamento immagine, attendere prego ...";
	LoadingTextS =	"... telecarga del im&aacute;gen ...";
	LoadingTextD =	"... Bild wird geladen, bitte warten ...";
	LoadingTextF =	"... t&eacute;l&eacute;charge de l\'image, pri&egrave;re d\'attendre ...";
	ClosingTextE =	"click on the image to close the window ..."; 
	ClosingTextI =	"clicca sull'immagine per chiudere la finestra ..."; 
	ClosingTextS =	"haga click para cerrar la ventana ..."; 
	ClosingTextD =	"Ein Klick aufs Bild schliesst das Fenster ..."; 
	ClosingTextF =	"cliquer sur l\'image pour fermer la fen&ecirc;tre..."; 
	// end customize 
	switch ( (typeof Lang=="undefined")?(typeof document.language=="undefined")?false:document.language:Lang )	{
		case"en":LoadingText=LoadingTextE; ClosingText=ClosingTextE;	break;
		case"it":LoadingText=LoadingTextI; ClosingText=ClosingTextI;	break;
		case"es":LoadingText=LoadingTextS; ClosingText=ClosingTextS;	break;
		case"de":LoadingText=LoadingTextD; ClosingText=ClosingTextD;	break;
		case"fr":LoadingText=LoadingTextF; ClosingText=ClosingTextF;	break;
		default: LoadingText=LoadingTextE; ClosingText=ClosingTextE;	break;
		}
	ImgName =	(!ImgName||ImgName=="undefined") ? "" : ImgName ; ImgPad =	(!ImgPad||ImgPad=="undefined") ? defImgPag : ImgPad ;
	WinWidth = defWinWidth ; WinHeight = defWinHeight ; WinXpos=(!WinXpos)? defWinXpos :WinXpos ; WinYpos=(!WinYpos)? defWinYpos :WinYpos ;
	TitleText= (ImgName=="") ? "&nbsp;"+ClosingText : ImgName ;
	WinImage = ",dependent=yes,buttons=no,scrollbars=no,location=no,menubar=no,resizable=yes,status=yes,directories=no,toolbar=no" ;
	WinImage = window.open("","ImgPopup","width="+(WinWidth+2*ImgPad)+",height="+(WinHeight+2*ImgPad)+",left="+((WinXpos=="center")?(screen.width-WinWidth)/2:WinXpos)+",top="+((WinYpos=="center")?(screen.height-WinHeight)/3:WinYpos)+WinImage) ;
	HtmlCode = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD><TITLE>"+TitleText+"</TITLE>" + "\n" ;
	HtmlCode = HtmlCode+"<META HTTP-EQUIV=\"Content-type\" CONTENT=\"text/html; charset=ISO-8859-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n<META NAME=\"Author\" CONTENT=\"ARC Graphics\">" + "\n" ;
	HtmlCode = HtmlCode+"<SCRIPT LANGUAGE=\"JavaScript\"><!--" + "\n";
	HtmlCode = HtmlCode+"\tvar Img2show = new Image(); Img2show.src = '"+ImgSrc+"';" + "\n";
	HtmlCode = HtmlCode+"\tfunction Refresh() {" + "\n";
	HtmlCode = HtmlCode+"\t\tImgWidth = PopWinImg.width ; ImgHeight = PopWinImg.height; " + "\n" ; 
	if ( WinXpos=="center"||WinYpos=="center" ) {
		HtmlCode = HtmlCode+"\t\tWinXpos = "+((WinXpos=="center")?"(screen.width-ImgWidth-(2*"+ImgPad+"))/2":WinXpos)+"; " ;
		HtmlCode = HtmlCode+"WinYpos = "+((WinYpos=="center")?"(screen.height-ImgHeight-(2*"+ImgPad+"))/2":WinYpos)+";" + "\n" ;
		HtmlCode = HtmlCode+"\t\tself.moveTo ( WinXpos , WinYpos );" + "\n" ;
		}
	HtmlCode = HtmlCode+"\t\tself.resizeTo((ImgWidth+(2*"+ImgPad+")+(document.all?12:0))/1,(ImgHeight+(2*"+ImgPad+")+(document.all?31:0))/1);" + "\n" ;
	HtmlCode = HtmlCode+"\t\tif (document.layers) document.LoadTxt.visibility=\"hide\";" + "\n";
	HtmlCode = HtmlCode+"\t\telse if (document.all) document.all.LoadTxt.innerHTML=\"<P>&nbsp;</P>\";" + "\n";
	HtmlCode = HtmlCode+"\t\tself.focus(); }" + "\n";
	HtmlCode = HtmlCode+"//--"+"></SC"+"RIPT>" + "\n" ;
	HtmlCode = HtmlCode+"<STYLE TYPE=\"text/css\"><!-- div { position: absolute; top: "+ImgPad+"px; left: "+ImgPad+"px;} p { font-family: "+FontFace+";} //--></STYLE>" + "\n" ;
	HtmlCode = HtmlCode+"</HEAD>" + "\n" ;
	HtmlCode = HtmlCode+"<BODY BGCOLOR=\""+ColorBg+"\" TEXT=\""+ColorFont+"\" LEFTMARGIN="+ImgPad+" TOPMARGIN="+ImgPad+" MARGINWIDTH=\""+ImgPad+"\" MARGINHEIGHT=\""+ImgPad+"\" onBlur=\"window.close()\" onLoad=\"Refresh();\">" + "\n" ;
	if (document.layers) HtmlCode = HtmlCode+"<LAYER ID=\"LoadTxt\"><DIV><P><BR>"+LoadingText+"</P><P><I>&nbsp;"+ClosingText+"</I></P></DIV></LAYER>" + "\n" ;
	else HtmlCode = HtmlCode+"<DIV ID=\"LoadTxt\"><P><BR>"+LoadingText+"<P><I>&nbsp;"+ClosingText+"</I></DIV>" + "\n" ;
	HtmlCode = HtmlCode+"<A HREF=\"javascript:window.close()\" onMouseOver=\"status='"+ImgName+" - "+ClosingText+"';return true;\" onBlur=\"window.close()\"><IMG SRC=\""+ImgSrc+"\" NAME=\"PopWinImg\" BORDER=\"0\" ALT=\""+ImgName+"\"></A>" + "\n" ;
	HtmlCode = HtmlCode+"<SCRIPT LANGUAGE=\"JavaScript\"><!--" + "\n" ;
	HtmlCode = HtmlCode+"\tImgWidth = Img2show.width ; ImgHeight = Img2show.height; " + "\n" ; 
	//HtmlCode = HtmlCode+"\twindow.status = \"Img2show.width:'\"+Img2show.width+\"'\"; " + "\n" ; 
	HtmlCode = HtmlCode+"\twindow.status = \"" + ImgName + "\"\n" ; 
	HtmlCode = HtmlCode+"\twindow.resizeTo((ImgWidth+(2*"+ImgPad+")+(document.all?12:0))/1,(ImgHeight+(2*"+ImgPad+")+(document.all?31:0))/1);" + "\n" ;
	if ( WinXpos=="center"||WinYpos=="center" ) {
		HtmlCode = HtmlCode+"\tWinXpos = "+((WinXpos=="center")?"(screen.width-ImgWidth-(2*"+ImgPad+"))/2":WinXpos)+" ;" ;
		HtmlCode = HtmlCode+"\tWinYpos = "+((WinYpos=="center")?"(screen.height-ImgHeight-(2*"+ImgPad+"))/2":WinYpos)+" ;" + "\n" ;
		HtmlCode = HtmlCode+"\tself.moveTo ( WinXpos , WinYpos );" + "\n" ;
		}
	HtmlCode = HtmlCode+"//--"+"></SC"+"RIPT>" + "\n" ;
	HtmlCode = HtmlCode+"</BODY></HTML>" + "\n" ;
	WinImage.document.open();WinImage.document.write(HtmlCode);WinImage.document.close();
	window.setTimeout("if(document.layers)WinImage.document.LoadTxt.visibility=\"hide\";else if(document.all)WinImage.document.all.LoadTxt.innerHTML=\"<P>&nbsp;\";",LoadingTextMSec);
	}
// PopupImg function end -->

// PopupWin function (c)2001 ARC Graphics 
function PopupWin ( WinRef , WinName , WinWidth , WinHeight , WinXpos , WinYpos , Scroll ) {
	WinWidth =	(!WinWidth) ? 500 : WinWidth ; WinHeight =	(!WinHeight) ? 400 : WinHeight ; 
	WinXpos =	(!WinXpos) ? 80 : (WinXpos=="center") ? (screen.width-WinWidth)/2 : WinXpos ; 
	WinYpos =	(!WinYpos) ? 40 : (WinYpos=="center") ? (screen.height-WinHeight)/2 : WinYpos ; 
	Scroll =	(!Scroll) ? "yes" : Scroll ; 
	WinObject =	window.open(WinRef,"WinPopup","width="+WinWidth+",height="+WinHeight+",left="+WinXpos+",top="+WinYpos+",dependent=yes,buttons=no,scrollbars="+Scroll+",location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no") ;
	WinObject.focus;
	}
// PopupWin function end -->

	

