//aprire un link in una pop-up
	function openLink(theURL,wd,hg) {
	  //alert(theURL);
	  newWindow = window.open("","newWindow","width="+wd+",height="+hg+",resizable=no,scrollbars=no");
	  newWindow.document.open();
	  newWindow.document.writeln('<html>');
	  newWindow.document.writeln('<title>' + document.title + '</title>');
	  newWindow.document.writeln('<head>');
	  newWindow.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
	  newWindow.document.writeln('<meta http-equiv="refresh" content="0;url='+theURL+'">');
	  newWindow.document.writeln('</head>');
	  newWindow.document.writeln('<body>'); 
	  newWindow.document.writeln('Loading...');
	  newWindow.document.writeln('</body>');
	  newWindow.document.writeln('</html>');
	  newWindow.document.close();
	  newWindow.focus();
	}
    
	function openLink2(theURL,wd,hg,isresizable) {
	  //alert(theURL);
	  newWindow = window.open("","newWindow","width="+wd+",height="+hg+",resizable="+isresizable+",scrollbars=no");
	  newWindow.document.open();
	  newWindow.document.writeln('<html>');
	  newWindow.document.writeln('<title>' + document.title + '</title>');
	  newWindow.document.writeln('<head>');
	  newWindow.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
	  newWindow.document.writeln('<meta http-equiv="refresh" content="0;url='+theURL+'">');
	  newWindow.document.writeln('</head>');
	  newWindow.document.writeln('<body>'); 
	  newWindow.document.writeln('Loading...');
	  newWindow.document.writeln('</body>');
	  newWindow.document.writeln('</html>');
	  newWindow.document.close();
	  newWindow.focus();
	}
	
	function openLink3(theURL,wd,hg,isresizable,scroller) {
	  //alert(theURL);
	  newWindow = window.open("","newWindow","width="+wd+",height="+hg+",resizable="+isresizable+",scrollbars="+scroller);
	  newWindow.document.open();
	  newWindow.document.writeln('<html>');
	  newWindow.document.writeln('<title>' + document.title + '</title>');
	  newWindow.document.writeln('<head>');
	  newWindow.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
	  newWindow.document.writeln('<meta http-equiv="refresh" content="0;url='+theURL+'">');
	  newWindow.document.writeln('</head>');
	  newWindow.document.writeln('<body>'); 
	  newWindow.document.writeln('Loading...');
	  newWindow.document.writeln('</body>');
	  newWindow.document.writeln('</html>');
	  newWindow.document.close();
	  newWindow.focus();
	}
  
  	function getFilter(frmName,filterName) 
	{
		var frm;
		var filter;
		 //CODICE PER INTERNET EXPLORER & MOZILLA
		frm = document.forms[frmName];
		filter = frm[filterName];
		frm.action += "/(" + filter.name + ")/" + filter.value + "/";
		frm.submit();
	}
	
	function getPage(frmName,pageName,action,pageCount) 
	{
		var frm;
		var filter;
		 //CODICE PER INTERNET EXPLORER
		frm = document.forms[frmName];
		page = frm[pageName];
		
		pageval = parseInt(page.value);
		if ((pageval>0)&&(pageval<=pageCount))
		{
			frm.action += action + '/offset/' + (pageval-1) + '/';
			frm.submit();
		}
		else
		{
			alert('Attenzione! il valore inserito non è valido.');
			return false;
		}
	}
	
	function setValue(objName,value) 
	{
		var obj;
		obj = document.getElementById(objName);
		obj.value = value;
	}
	
	function swapValue(objNameOrig,objNameDest) 
	{
		var objFrom;
		var objTo;
		objFrom = document.getElementById(objNameOrig);
		objTo = document.getElementById(objNameDest);
		objTo.value = objFrom.value;
	}
	
	/*function swapValue(frmName,objNameOrig,objNameDest) 
	{
		var frmName;
		var objFrom;
		var objTo;
		frm = document.forms[frmName];
		objFrom = frm[objNameOrig];
		objTo = frm[objNameDest];
		objTo.value = objFrom.value;
	}*/
		
	/*function checkPrivacy(frmName,objName,itemChecked,msg) 
	{		
		var frm;
		var obj;
		frm = document.forms[frmName];
		obj = frm[objName];
		if (obj[itemChecked].checked==true) return true;
		else 
		{
			alert(msg);
			return false;
		} 
	}*/
	
	function checkPrivacy(objName,itemChecked,msg) 
	{		
		var frm;
		var obj;
		
		obj = document.getElementById(objName);
		if (obj.checked==true) return true;
		else 
		{
			alert(msg);
			return false;
		} 
	}


