// General Utilities
function MM_CheckFlashVersion(reqVerStr,msg)
	{
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin)
			{  
      var flashVer = -1;
      if (plugins && plugins.length > 0)
				{
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else
					{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        	}
      	}
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer)
				{
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      	}
    	}
  	} 
	}

function maskAsteriks(inputStr) 
	{
	inputStr = inputStr.replace(/[\w|\W]?/g,"*")
	return inputStr
	}
	
//		This code is designed to show or hide page elements
//	Usage:
//		When you click on the image you call the function in this manner
//		showList('divGen')
//		It handles the show hide automatically.//		For instance you could do this:
//			<input type="button" value="Click Here" onclick="showList('divGen')"; /></button>
//			<div id="divGen" style="display:none">
//				Peek-A-Boo
//			</div>
//		And the code would show the hidden field. Click it a second time and code will hide the field again. Toggle.//	Creation:
//		Created: 2007 � PDD5040
//	Revision History:
//		Modified: 25August2008 Faith R .Sloan - FSC1234
//		Reason: To document source and Delete ShowAllLists, etc since they are not necessary for our purposes. 

function checkBrowserCompatability()
  {
  if (document.getElementById) 
   return (true);
  else if (document.all)
   return (true);
  else
   alert ('This link does not work in your browser.'); 
  return (false);
  }
  
 function setElementStyleDisplay(elementName, displayType)
  {
  if (document.getElementById) 
   document.getElementById(elementName).style.display = displayType;
  else if (document.all) 
   document.all[elementName].style.display = displayType;
  }
 
 function getElementStyleDisplay(elementName, displayType, defaultDisplayType)
  {
  var current = '';
  if (document.getElementById) 
   current = (document.getElementById(elementName).style.display == displayType) ? defaultDisplayType : displayType;
  else if (document.all)
   current = (document.all[elementName].style.display == displayType) ? defaultDisplayType : displayType; 
  return (current); 
  }
 
 function changeImage(elemval, current)
  {
  var elemplus=elemval+'plus';
  if (document.images[elemplus])
   {
   if (current == 'none') 
    document.images[elemplus].src = 'images/plus.gif';
   if (current == 'block') 
    document.images[elemplus].src = 'images/minus.gif';   
   }
  }
  
 function showList(elemval) 
  { 
  if (checkBrowserCompatability() == true)
   {
   var current = getElementStyleDisplay(elemval, 'block', 'none');
   setElementStyleDisplay(elemval, current);
   changeImage(elemval, current);
   }
  }
  
 function changeElement(elemval, current)
  {
  if (checkBrowserCompatability() == true)
   { 
   setElementStyleDisplay(elemval, current);
   changeImage(elemval, current);
   }
  }
// end show/hide functions

// code to add multiple window onload events 
function addLoadEvent(func) 
	{	
  var oldonload = window.onload;
  if (typeof window.onload != 'function') 
		{
    window.onload = func;
  	} 
	else 
		{
    window.onload = function() 
			{
    	if (oldonload) 
				{
        oldonload();
      	}
    	func();
    	}
  	}
	}

function turnOnDivs()
  {
	if (document.getElementById('cfDiv'))	
    document.getElementById('cfDiv').style.display='block'; 
  } 
	