function setIEHoverState(id,tagname) {
 el		= document.getElementById(id);

 if(el) {
	 tn		= el.getElementsByTagName(tagname);
	 for(i=0;i<tn.length;i++){
	 	tn[i].onmouseover	= function(){
			this.className ? this.className	+= ' over' : this.className = 'over';
		}
		
		tn[i].onmouseout	= function(){
			this.className		= this.className.match(/ over/) ? this.className.replace(/ over/,'') : this.className.replace(/^over/,'');
		}
	 }
 }
}

window.onload = function() {
	if(is_ie5up)	setIEHoverState('tnav','li');
	
	if(is_ie5up){
		el = document.getElementById('schedule');
		if(el){
			for(var i=0;i<el.childNodes.length;i++){
				if(el.childNodes[i].tagName == 'DL'){
					el.childNodes[i].lastChild.style.backgroundImage = 'none';
				}
			}
		}
	}
}


function toggle_view(id) {

	var el   = document.getElementById('showList');
	var pat  = eval('/' + id + ',/');
	if(el){
		el.value = (pat.exec(el.value)) ? el.value.replace(pat,'') : el.value + id + ',';
	}
	
	var el                      = document.getElementById(id);
	el.style.display            = (el.style.display != 'block') ? 'block' : 'none';
	el.style.backgroundImage    = (el.style.display == 'block') ? 'url(/common/shared/images/dottedrule.gif)' : 'none';
	el.style.backgroundRepeat   = 'repeat-x';
	el.style.backgroundPosition = 'bottom left';	
	
	if(is_ie5up){
		el = document.getElementById('schedule');
		for(var i=0;i<el.childNodes.length;i++){
			if(el.childNodes[i].tagName == 'DL'){
				el.childNodes[i].lastChild.style.backgroundImage = 'none';
			}
		}
	}	
	
	return false;
}


function redirect_results(url) {

	var date   = document.getElementById('searchdate');
	var topic  = document.getElementById('searchtopic');	

	window.location.href = url+'/0,,1_'+date[date.selectedIndex].value+'_'+topic[topic.selectedIndex].value + ',00.html';

	return false;
}