function initMouseEvents() {
	var a = document.getElementsByTagName("a");
	for (i=0;i<a.length;i++){
	    if (a[i].parentElement.className == 'mlink') {
    	    a[i].onmouseover = mover;
	        a[i].onmouseout = mout;
	        a[i].parentElement.onclick = mclick;
    	    a[i].parentElement.onmouseover = dover;
	        a[i].parentElement.onmouseout = dout;
	    }
	}
}

function mover(e) {
	var elem = getTrigger(e);
	//do something with elem;
	elem.style.cursor = "pointer";
	elem.parentElement.style.backgroundColor = '9ac79e';
	elem.style.backgroundColor = '9ac79e';
	elem.style.color = '318d3a';
	elem.style.textDecoration = 'underline';
}

function mout(e) {
	var elem = getTrigger(e);
	//do something with elem;
	elem.parentElement.style.backgroundColor = '';
	elem.style.backgroundColor = '';
	elem.style.color = '';
	elem.style.textDecoration = '';
}

function mclick(e) {
	var elem = getTrigger(e);
	document.location = elem.firstChild.getAttribute('href');
}

function dover(e) {
	var elem = getTrigger(e);
	//do something with elem;
	elem.style.cursor = "pointer";
	elem.style.backgroundColor = '9ac79e';
	if (elem.firstChild.style) {
	    elem.firstChild.style.color = '318d3a';
	}
	//elem.firstChild.style.textDecoration = 'underline';
}

function dout(e) {
	var elem = getTrigger(e);
	//do something with elem;
	elem.style.backgroundColor = '';
	if (elem.firstChild.style) {
    	elem.firstChild.style.color = '';
    	elem.firstChild.style.textDecoration = '';
	}
}


function getTrigger(e) {
	if (!e) e = event;
	return e.target || e.srcElement;
}

function getEvent(e) {
	if (!e) e = event;
	return e;
}