var disableWebSite = false;

var picMsg = "";
var welcomeMsg = "Welcome to the Soldier's Training Homepage which provides you access  to a wealth of training information, documents and products while you're at home, working in the unit, attending initial entry or professional development training at Army schools and institutions.  For enlisted soldiers, you can tailor your homepage as a rucksack adding those tasks that you access frequently.  You can also view your career map and track your progress towards achieving the next rank (SGT, SSG) with our promotion point worksheet.  Access is easy using your AKO userid and password.";
var hotTopicMsg = "Check out the latest product releases under the What's Hot! link in the Alerts Portlet of your training homepage.";

var atiaErrMsg = "The ATIA website is currently unavailable. We apologize for any inconvenience.";
var atiaErrAlert = atiaErrMsg;
var rdlErrAlert = "The RDL website is closed.";

var mWindowW = 810;
var sWindowW = 710;
var nWindowW = 610;

var mPicW = 250;
var mPicH = 179;
var sPicW = 150;
var sPicH = 108;

function determinePortalStatus()
{
  //Check for a small screen size
  var windowW = 800, ScreenW = 800;
  if(parseInt(navigator.appVersion)>3)
  {
    if(navigator.appName.indexOf("Microsoft")!=-1)
      windowW = document.body.offsetWidth;

    if(navigator.appName=="Netscape")
      windowW = window.innerWidth;
  }

  if(windowW<mWindowW)
  {
    if(windowW<sWindowW)
    {
      if(windowW<nWindowW)
        document.getElementById("hot_pic").style.display = "none";
      else
      {
        document.homepic.width = sPicW;
        document.homepic.height = sPicH;
      }
    }
    else
    {
      document.homepic.width = mPicW;
      document.homepic.height = mPicH;
    }
  }

  if(!checkUrl('http://atiam.train.army.mil/soldierPortal'))
  {
    document.getElementById("atiaErr").style.display = "";
    //document.loginForm.j_username.disabled = true;
    //document.loginForm.j_password.disabled = true;
    document.loginForm.loginButton.disabled = true;
  }
}

function checkDisable(msg)
{
  if(disableWebSite)
  {
    alert(msg);
    return false;
  }
  return true;
}

function bbimg($obj)
{
	var zoom = parseInt($obj.style.zoom, 10) || 100;
	zoom += event.wheelDelta / 12;
	if (zoom > 0) $obj.style.zoom = zoom + '%';
	return false;
}

