var templatedir = './assets/templates/teamalert/'

//IE6 image cache bug fix!!
try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(e) {};

function mouseOverEffect(obj) {
	var parentid = obj.parentNode.parentNode.parentNode.id;
	if(obj.nodeName == "A") {
		obj.style.background='url('+templatedir+'img/'+parentid+'_button_left_hover.png) no-repeat';
		obj.nextSibling.style.background='url('+templatedir+'img/'+parentid+'_button_right_hover.png) no-repeat';
		obj.style.color='#fff';
	}
	else if(obj.nodeName == "SPAN") {
		obj.style.background='url('+templatedir+'img/'+parentid+'_button_right_hover.png) no-repeat';
		obj.previousSibling.style.background='url('+templatedir+'img/'+parentid+'_button_left_hover.png) no-repeat';
		obj.previousSibling.style.color='#fff';
	}
}

function mouseOutEffect(obj) {
	var parentid = obj.parentNode.parentNode.parentNode.id;
	if((obj.nodeName == "A") && (obj.parentNode.className != "currentcategory")) {
		obj.style.background='url('+templatedir+'img/'+parentid+'_button_left.png) no-repeat';
		obj.nextSibling.style.background='url('+templatedir+'img/'+parentid+'_button_right.png) no-repeat';
		obj.style.color='red';
	}
	else if((obj.nodeName == "SPAN") && (obj.parentNode.className != "currentcategory")) {
		obj.style.background='url('+templatedir+'img/'+parentid+'_button_right.png) no-repeat';
		obj.previousSibling.style.background='url('+templatedir+'img/'+parentid+'_button_left.png) no-repeat';
		obj.previousSibling.style.color='red';
	}
}

function fetchTarget(obj) {
	window.location=obj.previousSibling.href;
}

function fetchLink(obj) {
	window.location=obj.href;
}

function setOver(obj) {
	obj.className="subover";
	//obj.style.background='black';
}

function setOut(obj) {
	setClass=(obj, "subout");
}

//onmouseover="setOver(this);" onmouseout="setOut(this);" onclick="fetchLink(this);"