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);

function scBrowseByCategory(thissel){
	var thisselOption = thissel.options[thissel.options.selectedIndex];
	if(thisselOption.value != ''){
		document.location = thisselOption.value;
	}
}

function scRotate(){
	this.cnt = 0;
	this.timer = 5000;
	function display(x){
		var scRotateInner = SC.getById('scRotateInner');
		var scRotate = SC.getById('scRotate');
		var itemLink = scRotatingObj.objs[x].id + '.html';
		var rotateImgContainer = SC.getById('rotateImgContainer');
		var rotateTextContainer = SC.getById('rotateTextContainer');
		rotateTextContainer.innerHTML = '';
		if(rotateImgContainer){
			rotateImgContainer.removeAttribute('style');
			var img = SC.getById('rotateImgLink');
			if(img){
				rotateImgContainer.removeChild(img);
			}
			if(scRotatingObj.objs[x].img){
				var preLoadImg = new Image();
				preLoadImg.src = scRotatingObj.objs[x].img;
				preLoadImg.id = 'rotateImg';
				rotateImgContainer.style.width = (preLoadImg.width)+'px'
				var imgLink = SC.genElem('a', {id: 'rotateImgLink', href: itemLink});
				SC.appElem(preLoadImg, imgLink);
				SC.appElem(imgLink, rotateImgContainer);
			}
		}
		rotateTextContainer.innerHTML = scRotatingObj.objs[x].text + '<span class="rotateMoreInfo"><a href="'+itemLink+'">More Info</a></span>';
	}
	this.rotate = function(timer){
		try{
			if(timer){
				this.timer = timer;
			}
			var objsLen = scRotatingObj.len
			if(objsLen > 0){
				var	thisClass = this;
				this.cnt = (((objsLen-1) == this.cnt) ? 0 : (this.cnt + 1));
				if(scRotatingObj.objs[this.cnt]){
					display(this.cnt)
				}
				if(objsLen > 1){
					setTimeout(function () { thisClass.rotate(thisClass.timer) }, this.timer);
				}
			}
		}catch(e){alert(e)}
	}
}
var scRotateInit = new scRotate();