
function Disabilita(frm){
    for(i=0;i<frm.length;i++){
      var tempobj=frm.elements[i]
      if((tempobj.type.toLowerCase()=="submit")||(tempobj.type.toLowerCase()=="button")){
        tempobj.disabled=true
      }
    }
}

function jsTrim(stringa){
			while (stringa.charAt(0) == " " && stringa.length >1 )
				stringa = stringa.substring(1, stringa.length);
			while (stringa.charAt(stringa.length-1) == " ")
			stringa = stringa.substring(0, stringa.length-1);
			return stringa;
}

function domande(str){try{
    xx=600;
    yy=400;
    x0=1;
    y0=1;
    opt="scrollbars=yes,resizable=yes,status=no,copyhistory=no,toolbar=no,location=no";
    domande=window.open(str,"domande",opt);
    self.location.reload();
	domande.resizeTo(xx,yy);
	domande.moveTo(x0,y0);
	domande.location=str;
	domande.focus();
}catch(e){ domande=""; return; }}

function domande1(str){try{
}catch(e){ return; }}

function docs(str){try{
    xx=600;
    yy=200;
    x0=1;
    y0=1;
    opt="scrollbars=no,resizable=no,status=no,copyhistory=no,toolbar=no,location=no";
    doc=window.open("","doc",opt);
	doc.resizeTo(xx,yy);
	doc.moveTo(x0,y0);
	doc.location=str;
	doc.focus();
}catch(e){ return; }}

function logout(){
    if(confirm("Sei sicuro di voler chiudere la sessione di lavoro in corso ?")){
        self.location="logout.php";
    }
}

function checkschermo(str){try{ /*
    if(window.name!="windbparl"){
        xx=5+screen.availWidth;
        yy=5+screen.availHeight;
        x0=-2;
        y0=-2;
        opt="scrollbars=yes,resizable=yes,,status=no,location=no,copyhistory=0,toolbar=no";
        windbparl=window.open(str,"windbparl",opt);
	    windbparl.resizeTo(xx,yy);
	    windbparl.moveTo(x0,y0);
        self.opener=self;
        self.close();
        windbparl.focus();
    }
*/ }catch(e){ return; }}


