function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string') element = document.getElementById(element);
		if (arguments.length == 1) return element;
		elements.push(element);
	}
	return elements;
}
togglehide = function(obj){
	var el = $(obj);
	if(!el.className.match('hide')){
		el.className += ' hide';
	}else{
		var rep=el.className.match(' hide')?' hide':'hide';
		el.className=el.className.replace(rep,'');
	}
}
tl=false;
tlt=false;
togglelogin = function(){
	togglehide('haveacct');
	togglehide('loginfrm');
	if(!tl){
		$('login_un').focus();
		$('login_un').onblur = function(){tlt=true;setTimeout(hidelogin,2000);}
		$('login_pw').onblur = function(){tlt=true;setTimeout(hidelogin,2000);}
		$('login_submit').onblur = function(){tlt=true;setTimeout(hidelogin,2000);}
		$('login_un').onfocus = function(){tlt=false}
		$('login_pw').onfocus = function(){tlt=false}
		$('login_submit').onfocus = function(){tlt=false}
	}
	tl=(tl)?false:true;
}
hidelogin = function(){if(tlt){togglelogin();}}
sfHover = function() {
	if (marketNav = document.getElementById("marketnav")){
		var sfEls = marketNav.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);