


//****************Menu Hover Fix for IE****************
sfHover = function() {
	var sfEls = document.getElementById("mainNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


//****************Start misc scripts****************
 // 4LevelWebs ver1.0 
function unblur() {
	this.blur();
} 
function blurLinks() {
	if (!document.getElementById) return;
	theLinks = document.getElementsByTagName("a");
	theAreas = document.getElementsByTagName("area");
	for(i=0; i<theLinks.length; i++) {theLinks[i].onfocus = unblur;}
	for(i=0; i<theAreas.length; i++) {theAreas[i].onfocus = unblur;}
  } 
//blurLinks End




//****************hide-show div scripts****************	


//here you place the ids of every element you want.
var ids=new Array('search_box');


function switchid(id){
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id

	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


/* 
  ================================================
  PVII Uberlink Script
  Copyright (c) 2006 Project Seven Development
  www.projectseven.com
  Version: 1.0.0
  ================================================
*/
function P7_Uberlink(cl,d){
	var i,ob,tA,h=document.location.href;
	if(document.getElementById){
	ob=(d)?document.getElementById(d):document;
	if(ob){
	tA=ob.getElementsByTagName('A');
	for(i=0;i<tA.length;i++){
	if(tA[i].href==h){
	tA[i].className=cl;
}}}}}
