function showPicture(el) {
  var URL = ConstructURL('','index',Array('interface','module','file_id'),Array('interface/picture','XCatNew',el.getAttribute('picture')));
  vWinX = 10;
  vWinY = 10;
  vWinW = 800;
  vWinH = 600;
  window.open(URL, "ImageViewer", "WIDTH="+vWinW+",HEIGHT="+vWinH+",LEFT="+vWinX+",TOP="+vWinY+",TOOLBAR=NO,location=no,STATUS=NO,MENUBAR=NO,RESIZABLE=no,scrollbars=no");
}
  
function ConstructURL(SessionID, action, ParamNames, ParamValues) {
  var URL = '../' + action + '/' + SessionID;
  var s = '?';
  for (var i = 0; i < ParamNames.length; i++) {
    URL += s + ParamNames[i] + '=' + escape(ParamValues[i]);
    s = '&';
  }
  return URL;
}

function setSize (id) {
  var el = document.getElementById(id);
  var wdh = screen.width;
  if (wdh <= 1024) {
    el.style.width = '990px';
  }
  if (wdh > 1024) {
    el.style.width = '1250px';
  }
}


function activateSubmitBtn() {
  var btn = document.getElementById('submitBtn');
  btn.onclick = function(event) { document.getElementById('voteForm').submit() }
  btn.className = 'button';
}