function jsDropDownMenu (sButton, sList) {
	var object = this;
	
	object.tmr = 0;	
	object.button = document.getElementById(sButton);
	object.list = document.getElementById(sList);
	object.list.style.display = 'none';

	object.open = function () {
		clearTimeout(object.tmr);
		object.list.style.display = '';
	}
	
	object.close = function () {
		object.tmr=setTimeout(function() {
			object.list.style.display = 'none';
		},500);
	}
	
	object.button.onclick = object.open;
	object.button.onmouseout = object.close;
	object.list.onmouseover = object.open;
	object.list.onmouseout = object.close;
}

function docLoad() {
	new jsDropDownMenu('quickLinks','quickLinksList');
	new jsDropDownMenu('issueLinks','issueLinksList');
	new jsDropDownMenu('rubricsLinks','rubricsLinksList');

}

function swapEnable(obj, id) {
	if (obj.checked) {
		var e = document.getElementById(id);
		e.style.color='#000000';
		e.style.backgroundColor='#ffffff';
		e.readOnly = false;
	}
	else {
		var e = document.getElementById(id);
		e.style.color='#bbbbbb';
		e.style.backgroundColor='#dddddd';
		e.readOnly = true;
	}
}

function checkSbsEmail (message) {
	if (!(/\w+@\w+\.[a-z]{2,4}/.test(document.getElementById('sbs_email').value))) {
		alert(message);
		return false;
	}
	return true;
}