﻿function gamePop(url, winName, wWidth, wHeight, scrll)
{
   var scrollB;
   if(!scrll)
   {
      scrollB = 'no';
      var pWidth = wWidth;
   }
   else 
   {
      scrollB = scrll;
      wWidth = parseInt(wWidth);
   }
   var iMyWidth;
   var iMyHeight;
   wHeight = wHeight;
   var zWin = window.open(url, winName, "status=no,width=" + wWidth + ",height=" + wHeight + ",resizable=no,scrollbars=" + scrollB);
   zWin.focus();
}

function wPop(url, winName, wWidth, wHeight, scrll)
{
   var scrollB;
   if(!scrll)
   {
      scrollB = 'no';
      var pWidth = wWidth;
   }
   else 
   {
      scrollB = scrll;
      wWidth = parseInt(wWidth) + 20;
   }
   var iMyWidth;
   var iMyHeight;
   wHeight = wHeight + 12;
   //Added twelve pixels to ALL popup heights to compensate for newer/larger popup header logo. 
   iMyWidth =(window.screen.width / 2) - (wWidth / 2 + 10);
   //half the screen width minus half the new window width (plus 5 pixel borders).
   iMyHeight =(window.screen.height /2) - (wHeight / 2 + 15);
   //half the screen height minus half the new window height (plus title and status bars).
   //left=" + iMyWidth + ",top=" + iMyHeight + ",
   var zWin = window.open(url, winName, "status=no,width=" + wWidth + ",height=" + wHeight + ",resizable=no,screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" + scrollB);
   zWin.focus();
}


function doClear(tb)
{
    if (tb.value == tb.defaultValue)
    {
        tb.value="";
    }
}

function shiftFocusPlusOne(curtb, nexttbid)
{
    var digits = curtb.value.length;
    if (digits >= curtb.maxLength)
    {
        var nexttb = document.getElementById(nexttbid);
        nexttb.focus();
    }
}