
try {
  document.execCommand("BackgroundImageCache", false, true);
} 
catch(err) {}
/*
sfHoverUL = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("UL");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.id="sfhoverUL";	
		}
		sfEls[i].onmouseout=function() {
			this.id=this.id.replace(new RegExp("sfhoverUL\\b"), "");			
		}
	}
}
*///if (window.attachEvent) window.attachEvent("onload", sfHoverUL);

sfHover = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			adjustWidth(this);
			this.className+=" sfhover";
			if (this.childNodes[1]){
				var subNodes=this.childNodes[1].getElementsByTagName("LI")
				for (var j=0; j<subNodes.length; j++){
					subNodes[j].onmouseover=function(){
						this.className+=" subhover";
					}
					subNodes[j].onmouseout=function() {
						this.className=this.className.replace(" subhover", "");
					}
				}
			}
			if (getInternetExplorerVersion()==6){
				var ulItem=this.getElementsByTagName("UL");				
				ulItem[0].id="sfhoverUL";
				makeiFrame();
			}
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			if (getInternetExplorerVersion()==6){
				if(document.getElementById("dropmenuiframe")!=null){
				 var d = document.getElementById( 'dropmenuiframe' );
					d.parentNode.removeChild( d );
				}
				if(document.getElementById("sfhoverUL")!=null){
				 var c=document.getElementById("sfhoverUL");
				 c.id=c.id.replace(new RegExp("sfhoverUL\\b"), "");
				}
			}
		}
	}
}
// commented so that we are no longer processing this section
// -- Bobby -- 13:00 06/03/2009
//if (window.attachEvent) window.attachEvent("onload", sfHover);


function adjustWidth(obj){
	var maxlength=0;
	if (obj.childNodes[1]){
		var subNodes=obj.childNodes[1].getElementsByTagName("LI");
		var baselength;
		for (var j=0; j<subNodes.length; j++){
			baselength=subNodes[j].childNodes[0].innerText.length;
			if (baselength > maxlength){
				maxlength=baselength;
			}
		}
	}
	if (maxlength > 21){
	var menuWidth=130+ (maxlength-21) * 7;
	obj.childNodes[1].style.width = menuWidth +"px";
	}
}

function getInternetExplorerVersion()
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}




function makeiFrame() { 
	var ifrm = document.createElement("IFRAME");
	var dropItem=document.getElementById("sfhoverUL");
	dropItem.style.zIndex='999';
	ifrm.setAttribute("src", ""); 
	ifrm.id='dropmenuiframe';
	ifrm.style.width = dropItem.offsetWidth;//'640px'; 
	ifrm.style.height =dropItem.offsetHeight;//'480px';
	ifrm.style.top=dropItem.offsetTop;
	ifrm.style.left=dropItem.offsetLeft;
	ifrm.style.zIndex = dropItem.style.zIndex-1;//'1'; //otherElement.style.zIndex;
	ifrm.style.display ='block';//otherElement.style.display;
	ifrm.style.position='absolute';
	document.body.appendChild(ifrm); 
} 
