// JavaScript Document   
//
//   This contains the main script  block for all CCAP pages
//
<!-- this code block does browser detect stuff  - All variables are global
  var Netscape, MSIE, Opera, Firefox, Safari, Unknown;
  var Win, Mac, Other;
  var NetscapeVer, MSIEVer, FirefoxVer, OperaVer;
  var NetscapeSubVer, MSIESubVer, FirefoxSubVer, OperaSubVer;
  
  Opera = navigator.userAgent.indexOf("Opera") > -1;
  Firefox =  navigator.userAgent.indexOf("Firefox") > -1;
  MSIE = navigator.appName == "Microsoft Internet Explorer" == !(Opera) ;
  Netscape = navigator.appName == "Netscape" == !(Firefox);
  Unknown = !(Netscape || MSIE || Opera || Firefox);
  
  // detect platform
  
  Win = navigator.userAgent.indexOf("Win") > -1;
  Mac = navigator.userAgent.indexOf("Mac") > -1;
  Other = !(Win || Mac);
  
  // now extract version numbers 
  
  if(Netscape) {
    NetscapeVer = parseFloat(navigator.appVersion);
  }
  if(Firefox) {
    n = navigator.userAgent;
	FirefoxVer = n.substr(n.indexOf("Firefox/")+("Firefox ").length, 4);
    FirefoxVer = parseFloat(FirefoxVer);
  }    
  if(Opera) {
	 n = navigator.userAgent;
     OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
     OperaVer = parseFloat(OperaVer);
  }
  else if(MSIE) {
    n = navigator.userAgent;
    MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
    MSIEVer = parseFloat(MSIEVer); 
    // converts it into a floatint point number
   }
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function iconpopup(idnum)
{
popUpWindow("/about/a_icons.html",100,100, 300, 300)
}
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
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 toggle(divName)
{   var element ='';
	for(var i=0; i<arguments.length; i++)
   {
	    element = document.getElementById(arguments[i]);
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			   if (element.style.display == "block"){element.style.display = "none";}
			   else {element.style.display = "block";}
		}
		if (document.layers) 
			{ //IS NETSCAPE 4 or below
			if (document.layers[element].style.display == "block")
				{document.layers[element].style.display = "none";}
			else 
				{document.layers[element].style.display = "block";}
			} //IS NETSCAPE 4 or below
		if (document.getElementById && !document.all) 
			{
			element = document.getElementById(arguments[i]);
			if (element.style.display == "block")
				{element.style.display = "none";}
			else 
				{element.style.display = "block";}
			}
}}
   
   
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
<!-- This script may be freely distributed. -->
<!-- as long as these headers are left in place. -->

<!-- Momp's Web Design -->
<!-- http://www.mompswebdesign.com -->

var gAutoPrint =false; // Flag for whether or not to automatically call the browser print function when calling printFriendly

function printFriendly()
{
	if (document.getElementById != null)
	{var html = '<HTML>\n<HEAD>\n';
		if (document.getElementsByTagName != null)
		{var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		html += '\n</HE' + 'AD>\n<BODY>\n';
		var printPageElem = document.getElementById("printFriendly");
		if (printPageElem != null){html += printPageElem.innerHTML;	}
		else{alert("Could not find the printReady section in the HTML");return;}
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		var printWin = window.open("","printFriendly");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else{alert("Sorry, the printer friendly feature works\nonly in javascript enabled browsers.");}
}

  function getObj(objId){
	  if(document.getElementById) return document.getElementById(objId);
	  if(document.all) return document.all(objId);
	  return document.layers[objId];
  }
  function changeClass(objName, objClass ){
  objName = getObj(objName);
  objName.className=objClass;
  }
 function saveToFavorites()

 {
  if (window.external)
  {
   window.external.AddFavorite(location.href, document.title)
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }
