function openWindow(windowName, url, winWidth, winHeight, winScrolls) 
 {
  var xPos = (screen.availWidth-winWidth)/2;
  var yPos = (screen.availHeight-winHeight)/2;
 
  window.open(url, windowName, "status=no,menubar=no,personalbar=no,titlebar=no,toolbar=no,location=no,top=" + yPos + ",left=" + xPos + ",width=" + winWidth  + ",height=" + winHeight +",resizable=no, scrollbars="+ winScrolls);
 } 


function PermSum(NomeForm) 
 {
    NomeForm.perm.value=0;
    for (i=0; i<NomeForm.permtmp.length; i++)
    if (NomeForm.permtmp[i].checked) NomeForm.perm.value=NomeForm.perm.value | NomeForm.permtmp[i].value;	

 }

function QuickNav(sel)
{
 if (sel.selectedIndex!=0)
 {
  if (sel[sel.selectedIndex].value.search("Target=1")>0)
   window.open(sel[sel.selectedIndex].value);
  else  document.location.href=sel[sel.selectedIndex].value;
 }
     
}

function tagshow(tag)
{
 if (tag.style.display=='none')  { tag.style.display='';}
                           else  { tag.style.display='none'}
}


function SelectAll(the_form, the_select, do_check)
{
    var selectObject = document.forms[the_form].elements[the_select];
    var selectCount  = selectObject.length;

    for (var i = 0; i < selectCount; i++) {
        selectObject.options[i].selected = do_check;
    } // end for

    return true;
}
