// Show and Hide elements

function showBox(showid,hideids) {
	var hideids=hideids.split(",");
	
	var showboxElement = document.getElementById(showid);
	if(showboxElement != null) {
	showboxElement.setAttribute("style", "display: block;");
	showboxElement.style.cssText = "display: block;";
	}

	
	
	for(var x=0;x<hideids.length;x++){
		if(hideids[x]!=""){
			var hideboxElement = document.getElementById(hideids[x]);
			hideboxElement.setAttribute("style", "display: none;");
			hideboxElement.style.cssText = "display: none;";
		}
	}

}

// Activates tabs on homepage

function activeTab(showtab,hidetabs) {
	var showtabElement = document.getElementById(showtab)
	showtabElement.setAttribute("class", "active-tab");
	showtabElement.setAttribute("className", "active-tab");
	
	var hidetabs = hidetabs.split(",");
	for(var x=0;x<hidetabs.length;x++){
		if(hidetabs[x]!=""){
			var hidetabsElement = document.getElementById(hidetabs[x]);
			hidetabsElement.setAttribute("class", "plain-tab");
			hidetabsElement.setAttribute("className", "plain-tab");
		}
	}
}

// Attaches hover event

sfHover = function() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
	var drpObj = document.getElementById("selectProduct");
	for (var i=0; i<sfEls.length; i++) {
		if(i==2) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";drpObj.style.cssText = "position:absolute;left:-9999px;";
			}
		
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");drpObj.style.cssText = "position:static;";
			}
		} else {
			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);

