// JavaScript Document

tabNum = 5;

function login() {
	logTab = document.getElementById("login");

	if (logTab.className == "closed") {
		logTab.className = "expanded";
		logTab.innerHTML = '<form id="loginForm" method="post" action="?page=login"><input class="fInput" name="username" type="text" value="username" onfocus="this.value=\'\';" /><a href="javascript:;" title="Chiudi form" onclick="login();"><img class="formBtn" src="img/close.gif" alt="" /></a><br /><input class="fInput" name="password" type="password" value="password" onfocus="this.value=\'\';" /><input class="formBtn" type="image" src="img/submit.gif" value="submit" title="invia" /><input type="hidden" name="action" value="submitted" /></form>';
	}
	else {
		logTab.className = "closed";
		logTab.innerHTML = '<div><a href="#" title="[c]" tabindex="60" accesskey="c" onclick="login();">AREA CLIENTI</a></div>';
	}
}

function activate(current) {
	cTab = document.getElementById("m"+current);
	cTab.style.height = "27px";
}

function res(current) {
	cTab = document.getElementById("m"+current);
	cTab.style.height = "21px";
}

function GetE(/*String*/ elementId ) {
    if(document.getElementById)
    {	    
    	return document.getElementById( elementId );
    }
	  else
	    return null;
}

function ShowE(/*String*/ element, /*boolean*/ isVisible ) {    
    if ( typeof( element ) == 'string' )
		element = GetE( element );    
		if (element!=null)
    	element.style.display = isVisible ? 'block' : 'none' ;
}
