function toggle_it(itemID){ 
  if ((document.getElementById(itemID).style.display == 'none')) 
  { 
	document.getElementById(itemID).style.display = 'inline'; 
  } else { 
	document.getElementById(itemID).style.display = 'none'; 
  } 
} 
function toggle_back(itemID){ 
  if ((document.getElementById(itemID).style.display == 'inline')) 
  { 
	document.getElementById(itemID).style.display = 'none'; 
  } else { 
	document.getElementById(itemID).style.display = 'inline'; 
  } 
} 
function check(object_id) {
    with (document.getElementById(object_id))
        checked = !checked;
}
function swap(me,main,alt) {
	me.innerHTML = (me.innerHTML == main) ? alt : main;
}

sfHover = function() {
	var sfEls = document.getElementById("subbar").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

navHover = function() {
	var navEls = document.getElementById("navigation").getElementsByTagName("li");
	for (var i=0; i<navEls.length; i++) {
		navEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		navEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

function SetCookie() {
	days=1;
	myDate = new Date();
	myDate.setTime(myDate.getTime()+(days*24*60*60*1000));
	document.cookie = 'stnotice=hide; expires=' + myDate.toGMTString();
}

function SetCookieTwo() {
	days=1;
	myDateTwo = new Date();
	myDateTwo.setTime(myDateTwo.getTime()+(days*24*60*60*1000));
	document.cookie = 'stexshow=hide; expires=' + myDate.toGMTString();
}

//window.addEvent('domready', function(){
//	$('footad').addEvents({
//		'mouseenter': function(){
//			this.set('tween', {
				//duration: 1000,
				//transition: Fx.Transitions.Bounce.easeOut
//			}).tween('height', '57px');
//		},
//		'mouseleave': function(){
//			this.set('tween', {}).tween('height', '10px');
//		}
//	});
//});

window.addEvent('domready',function() {
	$each($$('.fade'), function(el) {
		var originalback = el.getStyle('background-color');
		var originalcolor = el.getStyle('color');
		var morph = new Fx.Morph(el,{ 'duration':'500', link:'cancel' });
		el.addEvents({
			'mouseenter' : function() { morph.start({ 'color':'#006', 'background-color':'#ccf' }) },
			'mouseleave' : function() { morph.start({ 'color': originalcolor, 'background-color': originalback }) }
		});
	});
});

