/*
	Misc/Utils methods.
*/


function getClassAttributeNameForNavigator() {
    //  fix for IE, the <class> attribute is called <className>
    if (navigator.userAgent.indexOf("MSIE") != -1)
        return "className";
    else
        return "class";
}


function setRandomBanner() {
    //  mostra i banner random, definiti 3
    var bnTag = document.getElementById("td_banner");

    bnTag.setAttribute(getClassAttributeNameForNavigator(), "td_banner" + " " + "td_bannerimage" + Math.floor(1 + (Math.random() * 3)));
}


function setBackgroundStyle(cn) {
    //  sovrascrive il background di default e cambia colore
    var bgTag = document.getElementById("td_background");

    bgTag.setAttribute(getClassAttributeNameForNavigator(), cn);
}

function plogin() {
var st ;
  if (document.fm_login.login_username.value =="") {
     alert("Indicare la propria username ");
     document.fm_login.login_username.focus();
     return false;  }
else
 if (document.fm_login.login_password.value =="") {
     alert("Indicare la propria password  ");
     document.fm_login.login_password.focus();
     return false;  }
else

document.fm_login.ckx.value ="1" ;
document.fm_login.submit();

  }

