function countUp (limit,element) {
   if ((limit && limit == 'x') || (document.getElementById(element).value < limit)) {
      document.getElementById(element).value++;
   };
};

function countDown (limit,element) {
   if ((limit && limit == 'x') || (document.getElementById(element).value > limit)) {
      document.getElementById(element).value--;
   };
};

function addNewActor () {
   actor = document.getElementById('actor').options[document.getElementById('actor').selectedIndex];
   invisible = document.createElement('input');
   invisible.setAttribute('type','hidden');
   actorCount++;
   invisible.setAttribute('name','actor' + actorCount);
   invisible.setAttribute('value',actor.getAttribute('value'));
   pElem = document.createElement('p');
   pElem.style.marginTop = '0px';
   pElem.appendChild(document.createTextNode(actor.firstChild.nodeValue));
   document.getElementById('actor').parentNode.insertBefore(pElem,document.getElementById('actor'));
   document.getElementById('actor').parentNode.insertBefore(invisible,document.getElementById('actor'));
};

function addStarActor (elem) {
   count = elem.getAttribute('alt');
   actor = document.getElementById('actorStar');
   invisible = document.createElement('input');
   invisible.setAttribute('type','hidden');
   invisible.setAttribute('name','newActor' + count++);
   invisible.setAttribute('value',actor.value);
   pElem = document.createElement('p');
   pElem.style.marginTop = '0px';
   pElem.appendChild(document.createTextNode(actor.value));
   document.getElementById('actor').parentNode.insertBefore(pElem,document.getElementById('actor'));
   document.getElementById('actor').parentNode.insertBefore(invisible,document.getElementById('actor'));
   elem.setAttribute('alt',count);
   actor.value = '';
};