<!--
// **** popup centrata
var win = null;
function aprialcentro(url,name,w,h,scroll){
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
win = window.open(url,name,'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no')
if(win.window.focus){win.window.focus();}
}

//Popup normale
function openWindow(url, name, w, h,scroll ) {
  popupWin = window.open(url, name, 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars='+scroll+',resizable=no,width='+ w + ',height='+ h + ',top=10,left=10')
}

//Popup per immagini
function ingrandisci(immagine,descrizione,larghezza,altezza)
{ 
eval("NewWin=window.open('','popup','resizable=no,scrollbars=no,status=no,width='+larghezza+',height='+altezza+',left=5,top=5');"); 
NewWin.document.write ("<HTML><HEAD><TITLE>");
NewWin.document.write (".:: NOME AZIENDA ::. ");
NewWin.document.write (descrizione + "</TITLE>");
NewWin.document.write ("</HEAD>\n"); 
NewWin.document.write ("<BODY Onload='top.window.focus()' MARGINWIDTH='0' MARGINHEIGHT='0' TOPMARGIN='0' LEFTMARGIN='0'>\n"); 
NewWin.document.write ("<a href='javascript:this.close();'><IMG SRC='");
NewWin.document.write (immagine);
NewWin.document.write ("' WIDTH='");
NewWin.document.write (larghezza);
NewWin.document.write ("' HEIGHT='");
NewWin.document.write (altezza);
NewWin.document.write ("' BORDER='0'  ALT='Clicca per chiudere' STYLE=position:absolute;left=0px;top=0px></a>"); 
NewWin.document.write ("</BODY></HTML>"); 
NewWin.document.close();
} 




var checkobj
function accetta(el){
checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){  
var tempobj=checkobj.form.elements[i]
	if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
							}
						}
					}

function disabilita(el){
	if (!document.all&&!document.getElementById){
			if (window.checkobj&&checkobj.checked)
return true
		else{
alert("Per favore accetta i termini del contratto")
return false
						}
					}
				}

 
 function EW_onError(form_object, input_object, object_type, error_message)
    {
		alert(error_message);
        if (object_type == "RADIO" || object_type == "CHECKBOX") {
        	if (input_object[0])
				input_object[0].focus();
			else
				input_object.focus();
		}
		else
			input_object.focus();
		if (object_type == "TEXT" || object_type == "PASSWORD")
			input_object.select();		
       	return false;	
    }


function EW_hasValue(obj, obj_type)
    {
    if (obj_type == "TEXT" || obj_type == "PASSWORD" || obj_type == "TEXTAREA")
	{
    	if (obj.value.length == 0) 
      		return false;
    	else 
      		return true;
    	}
    else if (obj_type == "SELECT")
	{
		if (obj.type == "select-multiple")
		{
			for (i=0; i < obj.options.length; i++)
		    {
			if (obj.options[i].selected)
				return true;
			}
		} 
		else // obj.type == "select-one"  
		{
			if (obj.selectedIndex > 0)				
	       		return true;		
		}
		return false;
	}   
    else if (obj_type == "RADIO" || obj_type == "CHECKBOX")
	{
        if (obj[0])
		{
			for (i=0; i < obj.length; i++)
		    {
			if (obj[i].checked)
				return true;
			}
		}
		else
		{
			if (obj.checked)
				return true;			
		}
       	return false;	
	}
	}
 
 
 
function clearFocus() 
{ 
no_bordo = function(){this.blur()} 
for(i=0;i<document.links.length;i++) 
{ 
document.links[i].onfocus=no_bordo; 
} 
} 
onload=clearFocus; 
// --> 

function richiamaOnload() {
clearFocus();
}
onload=richiamaOnload;

