function getObj(objID) {
	if (document.getElementById){return document.getElementById(objID);}
	else if (document.all){return document.all[objID];}
	else if (document.layers){return document.layers[objID];}
}
function rollout(span_id){
	if (getObj(span_id).className  != "corrente"){getObj(span_id).style.backgroundPosition = '0 0'}
}
function rollover(span_id){
	if (getObj(span_id).className  != "corrente"){getObj(span_id).style.backgroundPosition = '0 -86px'}
}
function show_cat(span_id){
	if (getObj('pf_cat_navigation').style.display  != 'block'){
		getObj('pf_cat_navigation').style.display = 'block'
	}else{
		getObj('pf_cat_navigation').style.display = 'none'
	}
}
function ac_form_process(area_host, _form)
{
var username = document.AreaClienti.username.value;
var username_i = new RegExp("[^a-zA-Z0-9\_\.]");
var password = document.AreaClienti.password.value;
var password_i = new RegExp("[^a-zA-Z0-9\_\.]");

if (username == ""){alert("Devi inserire un username d'accesso");return false}
if(username_i.test(username) || (username.length < 6 ) || (username.length > 20 )){
alert("Il campo \"username\" deve avere una lunghezza da 6 a 20 lettere e \n\npuo\' contenere solo lettere, numeri, \"_\" o \".\"")
;return false}

if (password == ""){alert("Devi inserire la password d'accesso!");return false}
if (password_i.test(password) || (password.length < 6 ) || (password.length > 20 )){
alert("Il campo \"password\" deve avere una lunghezza da 6 a 20 lettere e \n\npuo\' contenere solo lettere, numeri, \"_\" o \".\"")
;return false
}
document.AreaClienti.action = area_host+"/public/area_user/ac_login_process.asp";
document.AreaClienti.submit();
}

function ar_form_process(area_host, _form)
{
var username = getObj(_form).username.value;
var username_i = new RegExp("[^a-zA-Z0-9\_\.]");
var password = getObj(_form).password.value;
var password_i = new RegExp("[^a-zA-Z0-9\_\.]");

if (username == ""){alert("Devi inserire un username d'accesso");return false}
if(username_i.test(username) || (username.length < 6 ) || (username.length > 20 )){
alert("Il campo \"username\" deve avere una lunghezza da 6 a 20 lettere e \n\npuo\' contenere solo lettere, numeri, \"_\" o \".\"")
;return false}

if (password == ""){alert("Devi inserire la password d'accesso!");return false}
if (password_i.test(password) || (password.length < 6 ) || (password.length > 20 )){
alert("Il campo \"password\" deve avere una lunghezza da 6 a 20 lettere e \n\npuo\' contenere solo lettere, numeri, \"_\" o \".\"")
;return false
}
getObj(_form).action = area_host+"/admin/ar_login_process.asp";
getObj(_form).submit();
}
function recupero_dati_process(area_host, _form)
{
var username = getObj(_form).username.value;
var username_i = new RegExp("[^a-zA-Z0-9\_\.]");
var email = getObj(_form).email.value;

if (username == ""){alert("Devi inserire il tuo username d'accesso");return false}
if (email == ""){alert("Devi inserire la tua email");return false}

getObj(_form).action = area_host+"/public/pagine/recupero_dati_process.asp";
getObj(_form).submit();
}

