/** Javascript UTILS
 * @author Lorenzo Zanivan | Oxalis
 */
function openWindow(page, name, width, height)
{
    //Window dimension
    var windowWidth = width;
    var windowHeight = height;
    //Find window position
    var leftPos = (screen.width-windowWidth)/2;
    var topPos = (screen.height-windowHeight)/2;
    //Open Window
    window.open(page, name, "width=" + windowWidth + ", height=" + windowHeight + 
                            ", left=" + leftPos + ", top=" + topPos + "");
}

function enableDisableInputs(value, inputs)
{
  var b=false;
  if (typeof value == "string")
    b = (value=="false");
  else b=value;  

  for (i=0; i<inputs.length; i++)
  {
    var inputToChange = document.getElementById( inputs[i] );
    inputToChange.disabled = b;
  }
}