function $(pid, id)
{

	if(!id) {
		return document.getElementById(pid);
	} else {
		return jQuery('#'+pid+'frm').find('*[id='+id+']').get(0);
	}

	/*
	if(!pid || !id) {
		alert('E\' necessario chimare la funzione $ con i prarametri pid e id');
		return false;
	} else {
		return jQuery('#'+pid+'frm').find('*[id='+id+']').get(0);
		//return document.getElementById(id);
	}
	*/
}

function submitFormNs(pid)
{
	jQuery('#'+pid+'frm').submit();
}

function openPopupNs(url)
{
	window.open(url, '', 'resizable=yes,width=840,status=no,location=no,toolbar=no,scrollbars=yes');
}
