// JavaScript Document
 window.onerror = null;
var DOM = (document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE = (document.all) ? true : false;
var IE4 = IE && !DOM;
var Mac = (navigator.appVersion.indexOf("Mac") != -1);
var IE4M = IE4 && Mac;
var Opera = (navigator.userAgent.indexOf("Opera")!=-1);
var Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);
var IsMenu = !Opera && !IE4M && (DOM || NS4 || IE4 || Konqueror);
var Browser = NS4 ? 1 : DOM ? 2 : 3;
  var menuActive = 0
  var menuOn = 0
  var onLayer
  var timeOn = null// LAYER SWITCHING CODE
function ShowId(id,show) {
  if (IsMenu){
    switch (Browser){
       case 1:
         document.layers[id].visibility=show;
         break;
       case 2:
         document.getElementById(id).style.visibility=show;
         break;
       case 3:
         document.all(id).style.visibility=show;
         break;
    }
  }
 }
function ModifyColor(id,color) {
  if (IsMenu){
    switch (Browser){
       case 1:
         document.layers[id].bgcolor=color;
         break;
       case 2:
         document.getElementById(id).bgcolor=color;
         break;
       case 3:
         document.all(id).bgcolor=color;
         break;
    }
  }
 }
  function btnTimer() {
  timeOn = setTimeout("btnOut()",400)
 }// BUTTON MOUSE OUT
  function btnOut(layerName) {
  if (menuActive == 0) {
  hideLayer(onLayer)
  }
 }// MENU MOUSE OVER 
  function menuOver(itemName) {
  itemName= 'menu'+itemName
  clearTimeout(timeOn)
  menuActive = 1
 }// MENU MOUSE OUT 
  function menuOut(itemName) {
  itemName= 'menu'+itemName
  menuActive = 0 
  timeOn = setTimeout("hideLayer(onLayer)", 1000)
  }
  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 NavRollOver(oTd) {oTd='menu'+oTd;ModifyColor(oTd,"#7599d8");}
  function NavRollOut(oTd) {oTd='menu'+oTd;ModifyColor(oTd,"#475875");}
  function MainRollOver(oTd) {oTd='menu'+oTd;ModifyColor(oTd,"#abbbd7");}
  function MainRollOut(oTd) {oTd='menu'+oTd;ModifyColor(oTd,"#d5ddeb");}
     
  function golink() {
  if (document.businessform.business.options[document.businessform.business.selectedIndex].value != "") {    
   parent.location.href=document.businessform.business.options[document.businessform.business.selectedIndex].value;
   }
  }
  function golink2() {
  if (document.improvemyform.improvemy.options[document.improvemyform.improvemy.selectedIndex].value != "") {    
   parent.location.href=document.improvemyform.improvemy.options[document.improvemyform.improvemy.selectedIndex].value;
   }
  }
function whoURSubmit(){
document.businessform.submit();
}


window.name="coltmainwindow";
var newSearchResult;
function changeLocation(){
if(document.search.search.value==""){alert("Please enter a search term");document.search.search.focus();return false;}
var searchText=document.search.search.value;
var value1=escape("search="+searchText);
var selectScope=document.search.select[document.search.select.selectedIndex].value;
var value2=escape("select="+selectScope);
var start=document.search.start.value;
var value3=escape("start="+start);
top.location="/headerfooter/search/;internal&action=search.action&Parameter=" +value1+"|" +value2+"|" +value3;
return false;
}
function colseWindow(){
newSearchResult.close();
}

  function showLayer(layerName){
  layerName = 'menu'+ layerName
 if (IsMenu) {
  if (timeOn != null) {
  clearTimeout(timeOn)
  hideLayer(onLayer)
  }
  if (IsMenu) {
  ShowId(layerName,"visible");
  } 
  onLayer = layerName
  }
 showElements(hideElements,"hidden");
 }// HIDE MENU
  function hideLayer(layerName){
  if (menuActive == 0) {
  if (IsMenu) {
  ShowId(layerName,"hidden");
  }
  }
 showElements(hideElements,"visible");
 }
 var hideElements= new Array();
 function showElements(checklist,show){
 if(checklist.length>0) {
	for (var i=0; i<checklist.length; i++){
  		var elementname = checklist[i];
  		ShowId(elementname,show);
	}
 }
 }

    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_findObj(n, d) { //v4.0
      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 && document.getElementById) x=document.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
 function NavIERollOver(oTd) {if (!oTd.contains(event.fromElement)) {oTd.bgColor="#FFFFFF";}}
  function NavIERollOut(oTd) {if (!oTd.contains(event.toElement)) {oTd.bgColor="#FFFFFF";}}

    function changeMe(href){
    top.location=href;
    }
	
	 var men = document.cookie;


function getCookie(name) { // use: getCookie("name");
    var index = men.indexOf(name + "=");
    if (index == -1) return null;
    index = men.indexOf("=", index) + 1;
    var endstr = men.indexOf(";", index);
    if (endstr == -1) endstr = men.length;
    return unescape(men.substring(index, endstr));
}

var today = new Date();
var expiry = new Date(today.getTime() + 10000 * 24 * 60 * 60 * 1000); // plus 28 days

function setCookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) +"; path=/";
	men = document.cookie; // update
}



