function swapImage(objId, imagepath){
	swapImageObj(document.getElementById(objId), imagepath);
}
function swapImageObj(obj, imagepath){
	if (obj != null){
		obj.src = imagepath;
	}
}

function show(objId){
	var obj = document.getElementById(objId);
	if (obj != null){
		obj.style.display = 'block';
	}
}
function hide(objId){
	var obj = document.getElementById(objId);
	if (obj != null){
		obj.style.display = 'none';
	}
}

var ns6=document.getElementById&&!document.all;
var ie=document.all;

function changeto(e,backcolor,forecolor,image,hand) {
	source=ie?event.srcElement:e.target
	if (source.tagName=="TABLE") return;
	while(source.tagName!="TD" && source.tagName!="HTML")
		source=ns6? source.parentNode : source.parentElement;
	if (source.style.backgroundColor!=backcolor&&source.id.indexOf("ignore") <= -1) {
		source.style.backgroundColor=backcolor;
		source.style.color=forecolor;
		source.firstChild.firstChild.src=image.src;
		if (hand) source.style.cursor = 'hand';
		else source.style.cursor = 'pointer';
	}
}

function clicklink(e) {
	source=ie? event.srcElement : e.target;
	if (source.tagName=="TABLE") return;
	while(source.tagName!="TD" && source.tagName!="HTML")
		source=ns6? source.parentNode : source.parentElement;

	if (ns6) {
		if (source.hasAttribute("link")) {
			if (source.hasAttribute("target") && source.getAttribute("target").indexOf("blank") > -1)
				window.open(source.getAttribute("link"));
			else
				window.location = source.getAttribute("link");
		}
	}
	else if (ie) {
		if (source.link!=null) {
			if (source.target!=null && source.target.indexOf("blank") > -1)
				window.open(source.link);
			else
				window.location = source.link;
		}
	}
}