function NavOver(imgName)
{
 var theImage = document.getElementById(imgName);
 if(theImage.src.indexOf("_off.gif") != -1)
 {
  theImage.src = theImage.src.replace("_off.gif","_on.gif");
 }
 else
 {
  theImage.src = theImage.src.replace("_on.gif","_off.gif");
 }
}

function RadiusOver(imgName)
{
 var theImage = document.getElementById(imgName);
 if(theImage.src.indexOf("_off.gif") != -1)
 {
  theImage.src = theImage.src.replace("_off.gif","_over.gif");
 }
 else
 {
  theImage.src = theImage.src.replace("_over.gif","_off.gif");
 }
}


/* validation for productandpricing.html */
function validateAccess(theForm)
{

     valid = true;

     message = "Please enter the following sections before proceeding:\n\n";

     if(theForm.elements["state"].value == "")
     {
      message += "State\n";
      valid = false;
     }

      if(theForm.elements["access"].value == "")
     {
      message += "Access Hours\n";
      valid = false;
     }

     if(valid)
     {
      return true;
     }


     else
     {
      alert(message);
      return false;
     }
}


function switchMenu(obj) 
{
	var list = document.getElementById(obj);
	
	if (list.style.display != "none")
    {
		list.style.display = 'none';
	}
   
    else
    {
		list.style.display = '';
	}
}


// Flash test
var isDOM = (document.getElementById) ? true : false;
var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isNetscape = (!isOpera && (navigator.appName.indexOf("Netscape") != -1 && navigator.userAgent.indexOf("4.") != -1)) ? true : false;
var isMac = (navigator.userAgent.indexOf("Mac") != -1) ? true : false;
var bUsedHTML = ((isDOM || isIE || isNetscape) && !isMac) ? true : false
var iLatestFlashVersion = 10;
var iMinimumFlashVersion = 7;
var iFlashVersion = -1;

// Variable must be global for VBScript to work correctly.
var thisFlashVersion;

function flash_getIEVersion() 
{

	var thisMaxVersion = false;
	for(var currentVersion=iMinimumFlashVersion; currentVersion<=iLatestFlashVersion; currentVersion++) 
	{
		if(thisFlashVersion) 
		{
			thisMaxVersion = currentVersion;
		}
	}
	return thisMaxVersion;
}

function flash_setVersion() 
{
	if (navigator.plugins.length > 0) 
	{
		navigator.plugins.refresh(false);
		numPlugins = navigator.plugins.length;
		for(var i=0; i<numPlugins; i++)	
		{
			plugDesc = navigator.plugins[i].description;
			iFlashVersion = (plugDesc.indexOf("Flash") != -1) ? parseInt(plugDesc.charAt(parseInt(plugDesc.indexOf("Flash"))+6)) : 0;
			if(iFlashVersion > 0) 
			{
				return;
			}
		}
	} 
	else if(!isMac && (isIE || isOpera)) 
	{
		iFlashVersion = flash_getIEVersion();
	}
	else 
	{
		iFlashVersion = iLatestFlashVersion;
	}
}

flash_setVersion();

function courseFeature(btn, theId)
{
	var courseID = document.getElementById(theId);

	if(btn.src.indexOf("off.gif") != -1)
	{
		btn.src = btn.src.replace("off.gif","on.gif");
		courseID.style.display = "block";
	}		
	else
	{
		btn.src = btn.src.replace("on.gif","off.gif");	
		courseID.style.display = "none";
	}
}

function insertIFm(holderDivID, iFrameID)
{
    document.getElementById(holderDivID).innerHTML = 
		"<iframe id='" + iFrameID + "'></iframe>";
}

function toUpperCase(id) 
{
    var x = document.getElementById(id);
    if (x.value != "")
    {   
        x.value = x.value.toUpperCase();
    }
}  

function checkNumeric(id)
{
    var x = document.getElementById(id);

    if (!isNaN(x.value))
    {
        alert('Please input numbers only in this field!');
        x.value = '';
    }
}