function AR_openGenWin(theURL,winName,features) { 
	  window.open(theURL,winName,features);
}	
function AR_openWin(theURL,winName,features) { 
	var  ar=window.open(theURL,winName,features);
}	
function preview(img) {
		pwin = window.open("about:blank", "pwin", "directories=no,height=450,width=680,location=no,menubar=no,status=no,toolbar=no,scrollbars=1");
		var out = "<title>Image Preview</title><center><font face=verdana size=2><b>Preview</b><BR>";
		out += "<br><img src='../images/"+img+"'></center>"
		out += "<br><br><br><br><center><A title='CHIUDI' href='javascript:window.close();' style='color:1d039e;'><b>Chiudi</b></a></font></center>";
		pwin.document.write(out);
}	
function formpreview() {
	if ((document.formdati.FldFilex.value.length) > 3) {
		pwin = window.open("about:blank", "pwin", "directories=no,height=450,width=680,location=no,menubar=no,status=no,toolbar=no");
		var out = "<title>Image Preview</title><center><font face=verdana size=2><b>Preview</b><BR>";
		out += "<br><img src='file://"+document.formdati.FldFilex.value+"'></center>"
		out += "<br><br><br><br><br><br><br><br><br><br><center><A title='CHIUDI' href='javascript:window.close();' style='color:1d039e;'><b>Chiudi</b></a></font></center>";
		pwin.document.write(out);
		}
	else {
		alert('Dovete selezionare una immagine.');
		document.formdati.FldFilex.focus();
	}
}	
function insert_image(img) {
	parent.opener.InsertImage(img)
	parent.close();
}
function InsertImage(url) {
document.formdati.FldImg.value=url;
window.focus(); 
 } 
 
function InserisciLogo(url) {
document.formdati.FldLogo.value=url;
window.focus(); 
 } 
function InserisciSimbolo(url) {
document.formdati.FldSimbolo.value=url;
window.focus(); 
 } 
 
function InserisciAllegato(url) {
//alert(url);
document.formdati.FldAllegato_File.value=url;
window.focus(); 
 } 
 
 function insertImage()
{
	if(SelectedImageName!=null) 
	{
		insertText('<img src="' + SelectedImageName + '" border=0 alt="' + ImageAlt + '" hspace=' + ImageHSpace + ' align=' + ImageAlign + ' vspace=' + ImageVSpace + '>','',true,true);
	}
	ImageLibWindow.close();		
}

function openImageLib(dove)
{

  ImageLibWindow = window.open('imageLib.asp?ImgDove='+dove,'ImageLibrary','toolbar=no,top=0,width=800,height=550,directories=no,status=yes,resizable=yes,scrollbars=yes,menubar=no');
  ImageLibWindow.location.href = 'imageLib.asp?ImgDove='+dove+'&init=true';
  if (ImageLibWindow.opener == null) ImageLibWindow.opener = self; 
}
function openFileLib()
{
  FileLibWindow = window.open('fileLib.asp','FileLibrary','toolbar=no,width=430,height=400,directories=no,status=yes,resizable=yes,scrollbars=yes,menubar=no');
  FileLibWindow.location.href = 'fileLib.asp?init=true';
  if (FileLibWindow.opener == null) FileLibWindow.opener = self; 
}



