

///////////////////////////////////////////
////////T O O L B A R /////////////////////
///////////////////////////////////////////
function loginW()
{
		//FACCIO IL SUBMIT
	var f = document.logon;
	if (validateForm2('logon','login','Login','R','pwd','password','R'))
	{	
		f.cmdIU.value="check";
		f.action="Logon.abl";
		f.submit();
	}

}
function loginP()
{
		//FACCIO IL SUBMIT
	var f = document.topLogin;
	if (validateForm2('topLogin','login','Login','R','pwd','password','R'))
	{	
		f.cmdIU.value="check";
		f.action="Logon.abl";
		f.submit();
	}

}
function logOutP()
{
		//FACCIO IL SUBMIT
	var f = document.topLogin;
	{	
		f.cmdIU.value="login";
		f.action="Logon.abl";
		f.submit();
	}

}
function newUserForm(theForm)
{
		//FACCIO IL SUBMIT
		var f = theForm;
		f.action="Users.abl";
		f.cmd.value="ni";
		//f.act.value="";
		f.submit();
}
function newUser()
{
		newUserForm(document.cart);
}

function newUserLogon()
{
		newUserForm(document.logon);
}

function changeUserForm(theForm)
{
		var f = theForm;
		f.action="Users.abl";
		f.cmd.value="md";
		//alert(f.id_users.value);
		f.submit();
}

function changeUser()
{
		changeUserForm(document.cart);
}


function refreshUser()
{
		//FACCIO IL SUBMIT
		var f = document.registrazione;
		//f.action=f.actionPage.value;
		f.cmd.value="md";
		f.act.value="refresh";
		//f.currentTab.value="";
		f.submit();
}

function saveUser(lang)
{
	if (checkUserData(lang))
	{
		var f = document.registrazione;
		//f.action=f.actionPage.value;
		f.act.value="save";
		f.cmd.value="asq";
		//alert('ID_ARTICOLO xxx '+document.dettaglio.id_articolo.value);
		f.submit();
	}
}


function checkUserData(lang)
{
	if(lang=="en")
		return checkUserData_en();
	else
		return checkUserData_it();
	
}

function checkUserData_en()
{
	var f = document.registrazione;
	return validateForm3('en','registrazione','id_nazione','Nation','R','login','Username','R','pwd','Password','R','cognome','First-Last Name/Comp. Name','R','eMail','email address','RisEmail','indirizzo','Address','R','citta','City','R','cap','ZIP code','R','telefono','Telephone number','R');
		
}


function checkUserData_it()
{
	var f = document.registrazione;
	return validateForm2('registrazione','id_nazione','Nazione','R','login','Login','R','pwd','Password','R','cognome','Cognome Nome / Rag. Soc.','R','eMail','Indirizzo e-mail','RisEmail','indirizzo','Indirizzo','R','citta','Citta','R','cap','CAP','R','telefono','Telefono','R');
		
}

