
function email_to_friend(i, type, l) {
	var i = i || '';
	var type = type || '';
	var l = l || '';
	var emailWin = window.open('/email_to_friend.cfm?debug=show&i=' + i + '&type=' + type + '&l=' + l, 'popWindow', 'width=450,height=580,location=0,status=0,screenX=500,screenY=200,scrollbars=1');
}

function glossary(letter, i) {
	var i = i || '';
	var glossaryWin = window.open('/glossary/frameset.cfm?i=' + i, 'popWindow', 'width=280,height=450,location=0,status=0,screenX=500,screenY=200');
}

function faqs(catID, objectID) {
	var objectID = objectID || '';
	var faqWin = window.open('/faq/frameset.cfm?catID=' + catID + '&objectID=' + objectID, 'popWindow2', 'width=550,height=380,location=0,status=0,screenX=500,screenY=200');
}

function navBar(tableCellRef, hoverFlag, navStyle) {
	if (hoverFlag) {
		switch (navStyle) {
			case 1:
				tableCellRef.style.backgroundColor = '#6699CC';
				break;
			case 2:
				tableCellRef.style.backgroundColor = '#DCE6ED';
				break;
			default:
//				tableCellRef.style.backgroundColor = '#ccc';
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#c00';
				}
		}
	} else {
		switch (navStyle) {
			case 1:
				tableCellRef.style.backgroundColor = '#DCE6ED';
				break;
			case 2:
				tableCellRef.style.backgroundColor = '#B4C5D1';
				break;
			default:
//				tableCellRef.style.backgroundColor = '#ddd';
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000';
				}
		}
	}
}

function ArticleWindow(theURL) {
	window.open(theURL);		//,"location,resizable,scrollbars"
}

function showStatusOff(){
	return;
}


sfHover = function() {
	if(document.getElementById && document.getElementById("nav")) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i < sfEls.length; i++) {
			sfEls[i].style.zIndex = 99;
			if(sfEls[i].getElementsByTagName("LI").length > 0)
				sfEls[i].style.backgroundImage = "url('/images/menubar/mb_gradient_dark2.gif')";
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
				if(document.clientChooser && document.clientChooser.client && (this.id == 'cat7' || this.id == 'cat8' || this.id == 'cat9'))
					document.clientChooser.client.style.visibility = 'hidden';
				var anchors = this.getElementsByTagName("A");
				if(anchors.length) {
					anchors[0].style.color = '#000000';
					//this.style.backgroundImage = "url('/images/menubar/mb_gradient_light.gif')";
					if(this.style.backgroundImage.length > 0)
						this.style.backgroundImage = "url('/images/menubar/mb_gradient_light.gif')";
					else
						this.style.backgroundColor = '#CACED4';
				}
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				if(document.clientChooser && document.clientChooser.client && (this.id == 'cat7' || this.id == 'cat8' || this.id == 'cat9'))
					document.clientChooser.client.style.visibility = 'visible';
				var anchors = this.getElementsByTagName("A");
				if(anchors.length) {
					anchors[0].style.color = '#FFFFFF';
					//this.style.backgroundImage = "url('/images/menubar/mb_gradient_light.gif')";
					if(this.style.backgroundImage.length > 0)
						this.style.backgroundImage = "url('/images/menubar/mb_gradient_dark2.gif')";
					else
						this.style.backgroundColor = '#96A1AE';
				}
			}
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);



function formClashItem(menuNumber, elementName) {
	this.menuNumber = menuNumber;
	this.elementName = elementName;
	
	return this;
}

function formClash(menu, visibility) {
	visibility = (visibility == 1) ? 'visible' : 'hidden';
	for(index = 0; index < formClashArray.length; index++) {
		//if(formClashArray[index].menuNumber == menu) {
			thisObject = eval(formClashArray[index].elementName);
			if(thisObject.style && thisObject.style.visibility)
				eval(formClashArray[index].elementName + ".style.visibility = '" + visibility + "'");
		//}
	}
}

function showHide(objName) {
	if(document.getElementById && document.getElementById(objName)) {
		document.getElementById(objName).style.display = (document.getElementById(objName).style.display == 'block') ? 'none' : 'block';
	}
}