function AlertMsgResult(href_String)
	{
		if(confirm("Sei sicuro/a di voler cancellare i dati di\n di questo profilo utente ?"))
			{
				if(confirm("Procedo alla cancellazione ?"))
					{
						location.href = href_String;
					}
			}
	}
	
function AlertMsgForm(theForm)
	{
		if(confirm("Sei sicuro/a di voler modificare i dati di questo profilo utente ?"))
			{
				theForm.action="template.bfr";
				theForm.target="_parent";
				theForm.submit();
			}	
	}	

function Reload(theForm)
	{
		//theForm.action="template.bfr";
		theForm.target="_parent";
		theForm.submit();	
	}		

// Funzione che apre una nuova finestra
function NewWindow(x, y)	
	{	
		option 		= "scrollbars=yes,resizable=yes,toolbar=yes,location=no,status=no,menubar=yes,width=" + x + ",height=" + y ;
		msgWindow 	= window.open("","new",option)	
	}	

// Funzione che apre una nuova finestra
function NewLink(x, y)	
	{	
		option 		= "scrollbars=yes,resizable=yes,toolbar=yes,location=yes,status=yes,menubar=yes,width=" + x + ",height=" + y ;
		msgWindow 	= window.open("","new",option)	
	}

// Funzione che sposta i dati dalla select agli input box	
function MoveArg(selArgIn, arg_01In, arg_02In, arg_03In, arg_04In)
		{
			arrayInput = new Array();
			
			arrayInput[1]	=	arg_01In;
			arrayInput[2]	=	arg_02In;
			arrayInput[3]	=	arg_03In;
			arrayInput[4]	= 	arg_04In;
			
			textStr 		= 	selArgIn.options[selArgIn.selectedIndex].value;
			checkFlag	=	true;	
			
			// Controllo se già esiste un elemento
			for(i = 1 ; i <= 4 ; i++)
				{
					if(arrayInput[i].value == textStr)
						{
							checkFlag = false;
						}
				}
			
			// Se non esiste cerca il primo vuoto
			if(checkFlag == true)
				{
					for(i = 1 ; i <= 4 ; i++)
						{
							if(arrayInput[i].value == "")
								{
									arrayInput[i].value = textStr;
									arrayInput[i].focus();
									arrayInput[i].select();
									
									// indice uguale a (i + 1) esco
									i = 5;
									
									selArgIn.selectedIndex = selArgIn.selectedIndex + 1;
								}
						}	
				}
		}

// Funzione che mostra i tooltip
function ShowToolTip(elemIn)
	{
		document.getElementById(elemIn).style.display='inline';
	}

// Funzione che nasconde i tooltip
function HideToolTip(elemIn)
	{
		document.getElementById(elemIn).style.display='none';
	}

// Funzione che mostra i bullet
function ShowBullet(elemIn, bull)
	{
		document.getElementById(elemIn).src=bull;
	}

// Funzione che nasconde i bullet
function HideBullet(elemIn, bull)
	{
		document.getElementById(elemIn).src=bull;
	}

// ---------------------------------------------------------------------------------------------------------------------------

function ViewObject(elemIn)
	{
		el = document.getElementById(elemIn);

		if(el.style.display == 'block')
			{
				el.style.display = 'none';
			}
		else
			{
				el.style.display = 'block';
			}
	}

function ViewBlock(elemIn, n)
	{
		for(i = 1 ; i <= n ; i++)
			{
				if(document.all)
					{
						el = document.all[elemIn + i];
					}
				else
					{
						if(document.layers)
							{
								el = document.layers[elemIn + i];
							}
						else
							{
								if(document.getElementById) 
									{
										el = document.getElementById(elemIn + i);
									}
							}
					}
			
				var display = el.style.display ? '' : 'none';
				el.style.display = display;
			}
	}

function HideBlock(elemIn, n)
	{
		for(i = 1 ; i <= n ; i++)
			{
				if(document.all)
					{
						el = document.all[elemIn + i];
					}
				else
					{
						if(document.layers)
							{
								el = document.layers[elemIn + i];
							}
						else
							{
								if(document.getElementById) 
									{
										el = document.getElementById(elemIn + i);
									}
							}
					}
			
				el.style.display = 'none';
			}
	}

function ViewType(selectIn, checkboxIn , elemIn, n)
	{
		if(selectIn.options[selectIn.selectedIndex].value == "1" && checkboxIn.checked == true)
			{
				ViewBlock(elemIn, n)
			}
		else
			{
				HideBlock(elemIn, n)
			}
	}

function ViewSelect(selectIn, elemIn, n)
	{		
		if(selectIn.options[selectIn.selectedIndex].value == "1")
			{
				ViewBlock(elemIn, n)
			}
		else
			{
				HideBlock(elemIn, n)
			}
	}

// ---------------------------------------------------------------------------------------------------------------------------
		