﻿function hideElements()
{
  var count = 0;
  while(hideElements.arguments[count] != undefined)
  {
    document.getElementById(hideElements.arguments[count]).style.display = 'none';
    count++;
  }
}

function showElements()
{
  var count = 0;
  while(showElements.arguments[count] != undefined)
  {
    document.getElementById(showElements.arguments[count]).style.display = 'block';
    count++;
  }
}

function fullscreenElements()
{
  var count = 0;
  while(fullscreenElements.arguments[count] != undefined)
  {
    document.getElementById(fullscreenElements.arguments[count]).style.position = 'absolute';
    document.getElementById(fullscreenElements.arguments[count]).style.left = '0px';
    document.getElementById(fullscreenElements.arguments[count]).style.top = '0px';
    document.getElementById(fullscreenElements.arguments[count]).style.width = document.body.clientWidth+'px';
    document.getElementById(fullscreenElements.arguments[count]).style.height = document.body.clientHeight+'px';
    count++;
  }
}

function centerElement(element,hOffSet,VOffSet)
{
  document.getElementById(element).style.position = 'absolute';
  document.getElementById(element).style.left = ((document.body.clientWidth - parseInt(document.getElementById(element).style.width,10))/2)+hOffSet+'px';
  document.getElementById(element).style.top = ((document.body.clientHeight - parseInt(document.getElementById(element).style.height,10))/2)+VOffSet+'px';
}

function zeroPad(n,places)
{
  n = n.toString();
  while(n.length<places)
  {
    n = '0'+n;
  }
  return n;
}