function ChkAssegna(f,t,vtrue,vfalse)
{
   var w = "if (document." + f.name + "." + t + ".value==\""+vtrue+"\") "
         +    "document." + f.name + "." + t + ".value=\""+vfalse+"\"; "
         +    "else "
         +    "document." + f.name + "." + t + ".value=\""+vtrue+"\"; "
   eval(w);
}
function ChkAssSub(f,t,vtrue,vfalse)
{
   f.CustomFirstSubmit.value='NO';
   ChkAssegna(f,t,vtrue,vfalse);
   f.submit();
}

function goback()
{
   history.go(-1);
}

function PopWind(xthis, xurl, xwidth, xheight)
{
   var c = '?';
   var d = xurl;
   for (i in xthis.form)
   {
     var v = xthis.form[i];
     if ((v.name != 'undefined') && (v.value != ''))
     {
        d += c + v.name + '=' + escape(v.value);
        c  = '&';
     }
   }

   w = window.open(d, 'w', 'alwaysRaised=yes,'
                          +'directories=no,'
                          +'hotkeys=no,'
                          +'location=no,'
                          +'menubar=no,'
                          +'resizable=no,'
                          +'scrollbars=no,'
                          +'status=no,'
                          +'toolbar=no,'
                          +'width='+xwidth+','
                          +'height='+xheight);
}

