function ctlaccedi()
	{	
		//var f = document.forms[0];
		var f = document.formAccesso;
		var st = "";
		var c1 =  f.login.value;
		var c2 =  f.pwd.value;
		var fl =0;
		var x=" ";
		var y="";
		
		
		//alert(!(c7 == c5));
		

		if ((ReplaceString(c1,x,y).length ==0) || (ReplaceString(c1,x,y).length <3))
		{ fl = 1
		st = st + "Attenzione Login non valida" + "\n" }		

		if ((ReplaceString(c2,x,y).length ==0) || (ReplaceString(c2,x,y).length <3))
		{ fl = 1
		st = st + "Attenzione Password non valida" + "\n" }
		
		if (fl==0)
			{
			//f.submit();
			f.login.value = "";
			f.pwd.value = "";
			popup(c1,c2);
			}
		else
			{ alert(st) }
	}// JavaScript Document
	
	
	<!--
	function popup(l,p)
	{
	url="accesso.asp?login=" + l + "&pwd=" + p;
	myWindowHandle = window.open(url,'accesso','width=1,height=1,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes');
	if (!myWindowHandle.opener)
		myWindowHandle.opener = self;
	myWindowHandle.blur()
	}
	//-->
	
	function popupimg(nf){
		var popurl="case.asp?img="+ nf;
		winpops=window.open(popurl,"","width=520,height=520,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,")
	}

	function sendMsg(msg)
	{
		alert(msg);
	}
	
	function ReplaceString (argvalue, x, y) 
	{  if ((x == y) || (parseInt(y.indexOf(x)) > -1)) {
	    errmessage = "replace function error: \n";
	    errmessage += "Second argument and third argument could be the same ";
	    errmessage += "or third argument contains second argument.\n";
	    errmessage += "This will create an infinite loop as it's replaced globally.";
	    alert(errmessage);
	    return false;}
															    
	  while (argvalue.indexOf(x) != -1) {
	    var leading = argvalue.substring(0, argvalue.indexOf(x));
	    var trailing = argvalue.substring(argvalue.indexOf(x) + x.length, 
		argvalue.length);
	    argvalue = leading + y + trailing;
}
	  return argvalue;
	}
