function sniffRedirect(fVer,fLsh,nFlsh){
				detectFlash(fVer);
				if((haveFlash) && (haveFlashVer))
   {
      window.top.location.href = fLsh;
   }
   else 
   {
      window.top.location.href = nFlsh;
   }
}

function homeForward(fVer,querystring)
{
   detectFlash(fVer);
   if(typeof querystring == 'undefined' ) {
	querystring = "" ;		   
   }
   if((haveFlash) &&(haveFlashVer))
   {
      // NOTE: 
	  // flash uses the following format for deep linking #?param1=value1&param2=value2
	  // we need to add the # to the querystring
	  window.top.location.href = "/flindex.jsp?#"+querystring;
   }
   else 
   {
      window.top.location.href = "/nfindex.jsp"+querystring;
   }
}

function flhomeForward(fVer)
{
   detectFlash(fVer);
   if((haveFlash) &&(haveFlashVer))
   {
      window.top.location.href = "/24007/flindex.jsp";
   }
   else 
   {
      window.top.location.href = "/24007/nfindex.jsp";
   }
}
//This function preloads rollover images with a,i and o suffixes for active, inactive and on states.
//The function can preload any number of images.
//Usage: uPreload('list of images separated by commas','path where the images live','OPTIONAL: pass in any variable to load active and on states','OPTIONAL: pass in a different file extension other than gif');

function uPreload(imgList, uPath, iSufx, iExt)
{
   if(iExt != null)
   {
      var imgExt = iExt;
   }
   else 
   {
      var imgExt = 'gif';
   }
   var imgSuffix = new Array('i', 'a');
   if(document.images)
   {
      imgArgArray = imgList.split(',');
      for(var z = 0; z < imgArgArray.length; z++)
      {
         var imgArg = imgArgArray[z];
         var imgSufLen = imgSuffix.length;
         for(j = 0; j < imgSufLen; j++)
         {
            var imgSuf = imgSuffix[j];
            imgNew = imgArg + imgSuf + ' = new Image();';
            eval(imgNew);
            imgSrc = imgArg + imgSuf + '.src = \'' + uPath + '/' + imgArg + imgSuf + '.' + imgExt + '\';';
            eval(imgSrc);
         }
      }
   }
}

function plImages()
{
    var links = document.getElementsByTagName("img");
    for (var i=0; i<links.length; i++)
    {
        classes = links[i].className.split(' ');
        for (var j=0; j<classes.length; j++)
        {
        	if (classes[j] == "pl")
        	{
				uPreload( links[i].id, links[i].src.substring( 0, links[i].src.lastIndexOf('/')), links[i].src.substring( links[i].src.lastIndexOf('.') ) );
				break;
        	}
        }
    }
}

//This function preloads the global navigation elements
navRoll = false;
//Set this variable to false so no global rollovers will work until all preloading is done.

function plGnav(lnList, lnPath)
{
   plImages();
   uPreload('g_nav01,g_nav02,g_nav03,g_nav04,g_nav05,g_nav06,g_btn_srch_go', '/assets/images/global');
  if(lnList)
   {
      uPreload(lnList, lnPath);
   }
   navRoll = true;
}


//This function creates an object list and preloads the left nav specific to each page
//USEAGE EXAMPLE: plLnav('05','01-03','03-05','/this is the path/')

function plLnav(lNavNum, lSnavNum, lSsnavNum, lNavPath)
{
   var plList = '';
   //Next line total number of sections for left nav
   var lNavNum = lNavNum;
   for(var i = 1; i <= lNavNum; i++)
   {
      if(plList != '') plList = plList + ',';
      i = addLz(i);
      plList = plList + 'ln' + i + '0000';
   }
   if(lSnavNum != null)
   {
      snavNumsArray = lSnavNum.split('-');
      var lSnavNm = snavNumsArray[0];
      //Sub Nav to be highlighted
      lSnavNm = addLz(lSnavNm);
      var lSnavTot = snavNumsArray[1];
      //Total number of sub nav sections for left nav
      for(var i = 1; i <= lSnavTot; i++)
      {
         if(plList != '') plList = plList + ',';
         i = addLz(i);
         plList = plList + 'ln' + lSnavNm + i + '00';
      }
   }
   if(lSsnavNum != null)
   {
      ssnavNumsArray = lSsnavNum.split('-');
      var lSsnavNm = ssnavNumsArray[0];
      //Sub Sub Nav to be highlighted
      lSsnavNm = addLz(lSsnavNm);
      var lSsnavTot = ssnavNumsArray[1];
      //Total number of sub sub nav sections for left nav
      for(var i = 1; i <= lSsnavTot; i++)
      {
         if(plList != '') plList = plList + ',';
         i = addLz(i);
         plList = plList + 'ln' + lSnavNm + lSsnavNm + i;
      }
   }
   uPreload(plList, lNavPath);
}
//this function adds leading zeros to digits if they are less than 10

function addLz(dGt)
{
   if(dGt < 10)
   {
      dGt = '0' + dGt;
   }
   else 
   {
      dGt = dGt;
   }
   return dGt;
}
//This function is for navigation rollover images and window status; uName is name of graphic, uState is on, off or over state, uWstat is window status message

function nr(uName, uState, uWstat)
{
   if(navRoll)
   {
      document.images[uName].src = self[uName + uState].src;
      if (uWstat)
      {
      	ws(uWstat);
      }
   }
}
//This is used to display window status in browsers. It should be used for all links. The nr function makes use of it as well.

function ws(uWstat)
{
   uWstat = uWstat.replace('|', "'");
   //Use the vertical bar (|) character if you need to display an apostrophe in the window status area
   window.status = uWstat;
}
//This is used to popup a new centered window with no chrome. The last variable can be passed in to make the window scrollable.

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).
   var zWin = window.open(url, winName, "status=no,width=" + wWidth + ",height=" + wHeight + ",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" + scrollB);
   zWin.focus();
}
//This is used to popup a new centered window with the Toolbar and Menubar. The last variable can be passed in to make the window scrollable.

function wPopTools(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;
   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).
   var zWin = window.open(url, winName, "status=no,toolbar=yes,menubar=yes,width=" + wWidth + ",height=" + wHeight + ",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" + scrollB);
   zWin.focus();
}

// Detects if a parent window is open and loads URL into it.  Otherwise, pops a new window for URL.
function toParent(zUrl)
{
   // First check to see if there's a parent window, or a parent.parent window
   var pWin = 0;
   // Parent window is assumed closed
   if(window.opener != null && !window.opener.closed)
   {
      // One parent
      pWin = 1;
   }
   if(window.opener.opener != null && !window.opener.opener.closed)
   {
      // Two parents
      pWin = 2;
   }
   if(pWin == 0)
   {
      // Open a blank window
      var blankWin = window.open(zUrl, blankWin, "width=775,height=600,resizable=yes,left=10,top=10,screenX=10,screenY=10,scrollbars=yes,toolbar=yes,titlebar=yes,status=yes,menubar=yes,personalbar=yes,location=yes,directories=yes");
   }
   if(pWin == 1)
   {
      // Load into parent window
      opener.location.href = zUrl;
      opener.focus();
   }
   if(pWin == 2)
   {
      // Load into parent parent window
      opener.opener.location.href = zUrl;
      opener.opener.focus();
   }
}

//This function will be used to direct to contact pages from popup windows. Path/Strategy to be determined later.
function sendinfo()
{
   parent.window.opener.location = "https://www.goarmy.com/contact/send_for_info.jsp";
   parent.window.opener.focus();
   parent.window.close();
   //alert('We will send to a page in the future once we determine a path.');
   window.close();
}
//This function is for submitting a form from a graphic or text link.

function submitSearch(formName)
{
   document.forms[formName].submit();
}
// This function is for creating arrays of elements to be used with the elSwap function.
// The first argument is the name of the array you wish to create.
// The variable number of following arguments are the list of element ID's you wish have stored in the array.
// The created array will have it's name as the first argument and all additional elements follow in sequence
// as passed in to the buildElArray() function. -M.Y. 2/26/04

function buildElArray()
{
   argv = buildElArray.arguments;
   argc = argv.length;
   if(argc > 1)
   {
      eval(argv[0] + '= argv');
   }
   else 
   {
      alert('no element IDs were passed to the buildElArray function');
   }
}
// This function will show whatever element's ID you pass into it and hide all the others in the array.
// The first argument is the name of the array to use.
// The second argument is the ID of the element which you want to show.
// This function needs to be used with arrays created with the buildArray(); function. -M.Y. 2/26/04

function elSwap(whichArray, showID)
{
   eval('elArray=' + whichArray);
   //loop starts at element 1 of the array to skip the name of the array which is stored in 0
   for(i = 1; i < elArray.length; i++)
   {
      var curID = elArray[i];
      if(showID != curID)
      {
         elmt = document.getElementById(curID);
         elmt.style.display = 'none';
      }
      else 
      {
         elmt = document.getElementById(curID);
         elmt.style.display = 'block';
      }
   }
}

function forParents(whichArray, showID)
{
   var ansID = 'detail' + showID;
   var quesID = 'ques' + showID;
   elSwap(whichArray, ansID);
   eval('elArray=allQues');
   if(showID != ' ')
   {
      for(i = 1; i < elArray.length; i++)
      {
         var curID = elArray[i];
         elmt = document.getElementById(curID);
         elmt.style.display = 'block';
         quesDisp = document.getElementById(quesID);
         quesDisp.style.display = 'none';
      }
   }
   else 
   {
      for(i = 1; i < elArray.length; i++)
      {
         var curID = elArray[i];
         elmt = document.getElementById(curID);
         elmt.style.display = 'block';
      }
   }
}

function MM_findObj(n, d)
{
   //v4.01
   var p, i, x;
   if(!d) d = document;
   if((p = n.indexOf("?")) > 0 && parent.frames.length)
   {
      d = parent.frames[n.substring(p + 1)].document;
      n = n.substring(0, p);
   }
   if(!(x = d[n]) && d.all) x = d.all[n];
   for(i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
   for(i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
   if(!x && d.getElementById) x = d.getElementById(n);
   return x;
}

function MM_setTextOfLayer(objName, x, newText)
{
   //v4.01
   if((obj = MM_findObj(objName)) != null)
   with(obj)
   if(document.layers)
   {
      document.write(unescape(newText));
      document.close();
   }
   else innerHTML = unescape(newText);
}
// ***------------- Media Player functions start here. --------------*** //

function setTextVersion(textOnorOff)
{
   cookiesOfforOn();
   if(cookiesOn)
   {
      SetCookie('text_version', textOnorOff, null, '/');
   }
   else 
   {
      var text_version = false;
   }
}

function setBandwidth(bndWdth)
{
   cookiesOfforOn();
   if(cookiesOn)
   {
      parseInt(bndWdth);
      if(bndWdth != 0 || null || 'null')
      {
         SetCookie('flashBandWidth', bndWdth, null, '/');
      }
   }
}

function embdPlyr(numRows, mXml, textVersion, assetsServer)
{
   detectFlash(7);
   var mPc = '';
   if((haveFlash) &&(haveFlashVer))
   {
      switch(numRows)
      {
         case "0" :
            var flashHeight = '234';
            var flashSwf = assetsServer + '/mplayer/zerorow.swf';
            var oBase = '<param name="base" value="' + assetsServer + '/mplayer/"/>';
            break
         case "1" :
            var flashHeight = '292';
            var flashSwf = assetsServer + '/mplayer/onerow.swf';
            var oBase = '<param name="base" value="' + assetsServer + '/mplayer/"/>';
            break
         case "2" :
            var flashHeight = '347';
            var flashSwf = assetsServer + '/mplayer/tworow.swf';
            var oBase = '<param name="base" value="' + assetsServer + '/mplayer/"/>';
            break
         case "uss" :
         	var flashHeight = '347';
		  	var flashSwf = '/assets/swf/reserve/uss.swf';
		   	var oBase = '<param name="base" value="/assets/swf/reserve"/>';
		    break
         case "nightstrike" :
         	var flashHeight = '347';
   			var flashSwf = '/assets/swf/nightstrike/build_a_mission.swf';
   			var oBase = '<param name="base" value="/assets/swf/nightstrike"/>';
            break
         case "jag_history" :
            var flashHeight = '292';
            var flashSwf = '/assets/swf/jag/shell.swf';
            var oBase = '<param name="base" value="/assets/swf/jag"/>';
            break
         case "anivid" :
   			var flashHeight = '234';
   			var flashSwf = mXml;
            break
         case "not_mp" :
   			var flashHeight = '347';
   			var flashSwf = '/assets/mplayer/not_mp.swf';
            break
         case "profile_olivero" :
            var flashHeight = '234';
            var flashSwf = '/assets/swf/reserve/ps/profiles/iu/olivero_iu.swf?embedPath=/_res/xml/reserve/ps/profiles_xmlpointer.xml';
            var oBase = '<param name="base" value="/assets/swf/reserve/ps/profiles/iu"/>';
            break
         case "profile_gurrera" :
            var flashHeight = '234';
            var flashSwf = '/assets/swf/reserve/ps/profiles/iu/gurrera_iu.swf?embedPath=/_res/xml/reserve/ps/profiles_xmlpointer.xml';
            var oBase = '<param name="base" value="/assets/swf/reserve/ps/profiles/iu"/>';
            break
         case "profile_davis" :
            var flashHeight = '234';
            var flashSwf = '/assets/swf/reserve/ps/profiles/iu/davis_iu.swf?embedPath=/_res/xml/reserve/ps/profiles_xmlpointer.xml';
            var oBase = '<param name="base" value="/assets/swf/reserve/ps/profiles/iu"/>';
            break
         case "profile_law" :
            var flashHeight = '234';
            var flashSwf = '/assets/swf/reserve/ps/profiles/iu/law_iu.swf?embedPath=/_res/xml/reserve/ps/profiles_xmlpointer.xml';
            var oBase = '<param name="base" value="/assets/swf/reserve/ps/profiles/iu"/>';
            break
      }
      cookiesOfforOn();
      if(cookiesOn)
      {
         var bndWdth = getCookie('flashBandWidth');
      }
      if(cookiesOn &&(bndWdth != null))
      {
         var flshUrl1 = '<param name="movie" value="' + flashSwf + '?xmlSource=' + mXml + '&prevBandwidth=' + bndWdth + '&noCacheIE=' + (new Date()).getTime()+'" />';
         var flshUrl2 = '<embed src="' + flashSwf + '?xmlSource=' + mXml + '&prevBandwidth=' + bndWdth + '" base="' + assetsServer + '/mplayer/" quality="high" bgcolor="#000000" width="436" height="' + flashHeight + '" name="mediaPlayer" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
      }
      else 
      {
         var flshUrl1 = '<param name="movie" value="' + flashSwf + '?xmlSource=' + mXml + '&noCacheIE=' + (new Date()).getTime()+'" />';
         var flshUrl2 = '<embed src="' + flashSwf + '?xmlSource=' + mXml + '" base="' + assetsServer + '/mplayer/" quality="high" bgcolor="#000000" width="436" height="' + flashHeight + '" name="mediaPlayer" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
      }
      mPc += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="436" height="' + flashHeight + '" id="mediaPlayer" align="middle">';
      mPc += '<param name="allowScriptAccess" value="always" />';
      mPc += oBase;
      mPc += flshUrl1;
      mPc += '<param name="quality" value="high" />';
      mPc += '<param name="bgcolor" value="#000000" />';
      mPc += flshUrl2;
      mPc += '</object>';
      mPc += '<table style="margin-top: 3px;" border="0" cellpadding="0" cellspacing="0" width="100%" summary="This table is for layout purposes only.">';
      mPc += '<tr>';
      mPc += '<td width="100%" class="mplyr_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></td>';
      mPc += '<td nowrap="yes" class="mplyr_txt"><a onmouseover="ws(\'Non-Flash Version\');return true" onmouseout="ws(\' \');return true" href="' + textVersion + '">Non-Flash Version</a></td>';
      mPc += '</tr>';
      mPc += '</table>';
   }
   else if((!haveFlash) ||(!haveFlashVer))
   {
      mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="alert">';
      mPc += '<strong>WE COULD NOT DETECT THE REQUIRED FLASH PLAYER.</strong>';
      mPc += '<ul class="sml">';
      mPc += '<li>The page contains rich-media content that uses the Flash Player</li>';
      mPc += '<li>We recommend that you get the latest Flash Player</li>';
      mPc += '</ul>';	
      mPc += '<p><a href="http://www.macromedia.com/" onmouseover="ws(\'Get Latest Flash Player\');return true" onmouseout="ws(\' \');return true" target="_blank">Get Latest Flash Player</a>';
      mPc += '<br /><span class="note">Note: You will need to <a href="javascript:void(0)" onclick="history.go(0)" onmouseover="ws(\'reload this page\');return true" onmouseout="ws(\' \');return true">reload this page</a> after installing Flash Player.</span></p>';
      mPc += '<a href="' + textVersion + '" onmouseover="ws(\'Browse Non-Flash Version\');return true" onmouseout="ws(\' \');return true">Browse Non-Flash Version</a>';
      mPc += '</div>';
      mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
   }
   document.write(mPc);
}

// generic flash checker/embedder -- usage: embdFlsh(width,height,"path to flash including swf name","path to 508 including file name")
// to NOT display alert box omit "path to 508" (in case you are displaying more than one flash movie on a page)
function embdFlsh(flashWidth, flashHeight, flashSwf, textVersion)
{
   detectFlash(7);
   var rndUrlGen = Math.floor(Math.random() * 10000) + 1; //Generate a random number between 1 and 10000 to append onto the flash URL to combat client-side caching.
  	if (flashSwf.indexOf("?") != -1 ) //Check to see if we're pointing to XML files/appending the URL
   {
   		var fullUrl = flashSwf.split("?") //Split flashSwf at the "?" so we can get the path and swf name without xml data on the next line.
   		var flUrl = fullUrl[0];
   		var flashUrl = flUrl.substring(flUrl.lastIndexOf("/"),flUrl.length); //Gets specific name of SWF without path. We find this so we can get only the path on the next line.
   		var flashPath = flUrl.substring(0,flUrl.length - flashUrl.length); //Gets full path without SWF name to use for object base parameter.
   		flashSwf = flashSwf + '&' + rndUrlGen;
   }
   else
   {
   	var flashUrl = flashSwf.substring(flashSwf.lastIndexOf("/"),flashSwf.length); //Gets specific name of SWF without path. We find this so we can get only the path on the next line.
   	var flashPath = flashSwf.substring(0,flashSwf.length - flashUrl.length); //Gets full path without SWF name to use for object base parameter.
   	flashSwf = flashSwf + '?' + rndUrlGen;
   }
   var mPc = '';
   if((haveFlash) && (haveFlashVer))
   {
      mPc = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + flashWidth + "\" height=\"" + flashHeight + "\" align=\"middle\">";
      mPc += "<param name=\"allowScriptAccess\" value=\"always\" />";
     	mPc += "<param name=\"base\" value=\"" + flashPath + "\" />";
     	mPc += "<param name=\"movie\" value=\"" + flashSwf + "&noCacheIE=" + (new Date()).getTime()+"\" />";
      mPc += "<param name=\"quality\" value=\"high\" />";
      mPc += "<embed src=\"" + flashSwf + "\" quality=\"high\" width=\"" + flashWidth + "\" height=\"" + flashHeight + "\" align=\"middle\" base=\"" + flashPath + "\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
      mPc += "</object>";
   }
   else if((!haveFlash) || (!haveFlashVer) && (textVersion))
   {
      mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="alert">';
      mPc += '<strong>WE COULD NOT DETECT THE REQUIRED FLASH PLAYER.</strong>';
      mPc += '<ul class="sml">';
      mPc += '<li>The page contains rich-media content that uses the Flash Player</li>';
      mPc += '<li>We recommend that you get the latest Flash Player</li>';
      mPc += '</ul>';
      mPc += '<p><a href="http://www.macromedia.com/" onmouseover="ws(\'Get Latest Flash Player\');return true" onmouseout="ws(\' \');return true" target="_blank">Get Latest Flash Player</a>';
      mPc += '<br /><span class="note">Note: You will need to <a href="javascript:void(0)" onclick="history.go(0)" onmouseover="ws(\'reload this page\');return true" onmouseout="ws(\' \');return true">reload this page</a> after installing Flash Player.</span></p>';
      mPc += '<a href="' + textVersion + '" onmouseover="ws(\'Browse Non-Flash Version\');return true" onmouseout="ws(\' \');return true">Browse Non-Flash Version</a>';
      mPc += '</div>';
      mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
      mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
   }
   document.write(mPc);
}

function embdFlashWxml(flashWidth, flashHeight, flashSwf, mXml, textVersion)
{
	detectFlash(7);
   	var mPc = '';
   	if((haveFlash) && (haveFlashVer))
   	{
   		var oBase = '<param name="base" value="/assets/swf/global"/>';
     	var flshUrl1 = '<param name="movie" value="' + flashSwf + '?xmlPointer=' + mXml + '&noCacheIE=' + (new Date()).getTime()+'" />';
     	var flshUrl2 = '<embed src="' + flashSwf + '?xmlPointer=' + mXml + '" base="/assets/swf/global" quality="high" width="' + flashWidth + '" height="' + flashHeight + '" name="mediaPlayer" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
     	mPc += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + flashWidth + '" height="' + flashHeight + '" id="mediaPlayer" align="middle">';
	  	mPc += '<param name="allowScriptAccess" value="always" />';
	  	mPc += oBase;
	 	mPc += flshUrl1;
	  	mPc += '<param name="quality" value="high" />';
	  	mPc += flshUrl2;
	 	mPc += '</object>';
   	}
   	else if((!haveFlash) || (!haveFlashVer))
   	{
		mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
		mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
		mPc += '<div class="alert">';
		mPc += '<strong>WE COULD NOT DETECT THE REQUIRED FLASH PLAYER.</strong>';
		mPc += '<ul class="sml">';
		mPc += '<li>The page contains rich-media content that uses the Flash Player</li>';
		mPc += '<li>We recommend that you get the latest Flash Player</li>';
		mPc += '</ul>';
		mPc += '<p><a href="http://www.macromedia.com/" onmouseover="ws(\'Get Latest Flash Player\');return true" onmouseout="ws(\' \');return true" target="_blank">Get Latest Flash Player</a>';
		mPc += '<br /><span class="note">Note: You will need to <a href="javascript:void(0)" onclick="history.go(0)" onmouseover="ws(\'reload this page\');return true" onmouseout="ws(\' \');return true">reload this page</a> after installing Flash Player.</span></p>';
		mPc += '<a href="' + textVersion + '" onmouseover="ws(\'Browse Non-Flash Version\');return true" onmouseout="ws(\' \');return true">Browse Non-Flash Version</a>';
		mPc += '</div>';
		mPc += '<div class="dbl_lne"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
		mPc += '<div class="spf_space"><img src="/assets/images/global/spcr.gif" alt="" border="0" /></div>';
	}
	document.write(mPc);
}
// ***------------- Media Player functions end here. --------------*** //

function flashSwap( flashDiv, flatDiv )
{
	detectFlash(7);
	if ( haveFlashVer ) { 
		document.getElementById( flatDiv ).style.display = 'none';
		document.getElementById( flashDiv ).style.display = 'block';
	}
	else {
		document.getElementById( flashDiv ).style.display = 'none';
		document.getElementById( flatDiv ).style.display = 'block';
	}
}

function mosToParentLink(linkText, mosNum)
{
   goarmyWin = false;
   if(opener)
   {
      goarmyWin = true
   }
   if(goarmyWin)
   {
      var targetURL = "../../jobs/mos/mos" + mosNum + ".jsp";
      document.write('MOS: ' + linkText + '');
   }
   else 
   {
      var targetURL = "../../jobs/mos/mos" + mosNum + ".jsp";
      document.write('MOS: ' + linkText + '');
   }
}
// show/hide layers scripts that don't require an array -- just an element id

function getElemRefs(id)
{
   var el =(document.getElementById) ? document.getElementById(id) :(document.all) ? document.all[id] :(document.layers) ? document.layers[id] : null;
   if(el) el.css =(el.style) ? el.style : el;
   return el;
}

function displayBlock(id)
{
   var lyr = getElemRefs(id);
   if(lyr && lyr.css) lyr.css.display = "block";
}

function displayNone(id)
{
   var lyr = getElemRefs(id);
   if(lyr && lyr.css) lyr.css.display = "none";
}

function picPop()
{
   var iMyWidth;
   var iMyHeight;
   iMyWidth =(window.screen.width /2) - (390 + 10); //half the screen width minus half the new window width(plus 5 pixel borders).iMyHeight =(window.screen.height /2) - (260 + 15); //half the screen height minus half the new window height(plus title and status bars).
   var cWin = window.open("http://app.wishoo.com/html/events/usarmy/", "photo", "status=no,width=790,height=540,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes"); cWin.focus();
}

function champPop()
{
   var iMyWidth;
   var iMyHeight;
   iMyWidth =(window.screen.width /2) - (390 + 10); //half the screen width minus half the new window width(plus 5 pixel borders).iMyHeight =(window.screen.height /2) - (260 + 15); //half the screen height minus half the new window height(plus title and status bars).
   var cWin = window.open("/racing/tony_2004_championship.html", "champ", "status=no,width=775,height=515,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no"); cWin.focus();
}

// These function are used in the Careers Search -->

function suggestedSearch(keywords, cmpntCd, respCd, closedToWomen, entryLevel, categoryID)
{
   document.JobSearchForm.keywords.value = keywords; document.JobSearchForm.cmpntCd.value = cmpntCd; document.JobSearchForm.respCd.value = respCd; document.JobSearchForm.closedToWomenInd.value = closedToWomen; document.JobSearchForm.entryLevelInd.value = entryLevel; document.JobSearchForm.categoryID.value = categoryID; document.JobSearchForm.submit();
}

function rewind()
{
   if(document.JobSearchForm.pageNumber.value != 1)
   {
      document.JobSearchForm.pageNumber.value = 1; submitmain();
   }
}

function pageback()
{
   var pn = parseInt(document.JobSearchForm.pageNumber.value);
   if(document.JobSearchForm.pageNumber.value > 1)
   {
      document.JobSearchForm.pageNumber.value = pn - 1; submitmain();
   }
}

function pagenext()
{
   var pn = parseInt(document.JobSearchForm.pageNumber.value);
   var pn_next = pn + 1;
   if(document.JobSearchForm.pageNumber.value < document.JobSearchForm.pageCount.value)
   {
      document.JobSearchForm.pageNumber.value = pn_next; submitmain();
   }
}

function fastforward()
{
   if(document.JobSearchForm.pageNumber.value != document.JobSearchForm.pageCount.value)
   {
      document.JobSearchForm.pageNumber.value = document.JobSearchForm.pageCount.value; submitmain();
   }
}

function desc_onoff()
{
   var descon = document.JobSearchForm.showDescriptions.value;
   if(descon == "true")
   {
      document.JobSearchForm.showDescriptions.value = false;
   }
   else 
   {
      document.JobSearchForm.showDescriptions.value = true;
   }
   submitmain();
}

function reset_pagesize()
{
   document.JobSearchForm.pageNumber.value = 1; submitmain();
}

function submitmain()
{
   document.JobSearchForm.submit();
}
// END function are used in the Careers Search -->

function sniffLink(flVersion,txtVersion,width,height,winName)
{
	var w = parseInt(width);
	var h = parseInt(height);
	detectFlash(7);
	if ( haveFlashVer ) { 
		wPop(flVersion,winName,w,h);
	}
	else {
		var newHeight = h + 200;
		wPop(txtVersion,winName,w,newHeight,'yes');
	}
}

