function show(id, className) {
	document.getElementById('submenu'+id).style.visibility = 'visible';	
	document.getElementById('submenu_link'+id).className = className+' '+className+'_on';	
}

function hide(id, className) {
	document.getElementById('submenu_link'+id).className = className;	
	document.getElementById('submenu'+id).style.visibility = 'hidden';	
}

function othershow(id) {
	document.getElementById(id).style.visibility = 'visible';	
}

function otherhide(id) {
	document.getElementById(id).style.visibility = 'hidden';	
}

function validateEmail(f) {
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return filter.test(f.email.value);
}

var scrollPrev = -1;
var scrollPaused = false;
function doScroll() {
	if(document.getElementById) {
		if(!scrollPaused) {
			var scroller = document.getElementById('homepagenews');		
			scroller.scrollTop = scroller.scrollTop + 1;
			
			if(scroller.scrollTop==scrollPrev) {
				scrollPrev = -1;
				scroller.scrollTop = 0;
			}
			else {
				scrollPrev = scroller.scrollTop;
			}
		}
		setTimeout('doScroll();',100);
	}
}

function pauseScroller() {
	scrollPaused = true;	
}

function startScroller() {
	scrollPaused = false;	
}
