document.onmouseover = fover;
document.onmouseout = fout;
document.onmousedown = fdown;
document.onmouseup = fup;
document.onclick = fclick;
var b_over = "#C1D2EE";
var b_out = "#D4D0C8";
var b_click = "#C1D2EE";
var f_over = "#000000";
var f_out = "#000000";
var f_click = "#000000";
var t_over = "1 solid #0a246a";
var t_out = "1 solid #D4D0C8";
function fclick()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xpbutton != null)
		{
			if (tg.url != null) {window.location = tg.url};
		}
	}

}
function fup()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xpbutton != null)
		{
			tg.style.background = b_over;
			tg.style.color = f_over;
			tg.style.border = "1 solid black";
			tg.hideFocus=true;
		}
	}

}
function fdown()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xpbutton != null)
		{
			tg.style.background = b_click;
			tg.style.color = f_click;
			tg.style.border = "1 solid black";
			tg.hideFocus=true;
		}
	}
}
function fover()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xpbutton != null)
		{
			tg.style.background = b_over;
			tg.style.color = f_over;
			tg.style.border = "1 solid black";
			tg.hideFocus=true;
		}
		if (tg.xptextbox != null)
		{
			tg.style.border = t_over;
			tg.onfocus = ffocus;
		}
	}
}

function fout()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xpbutton != null)
		{
			tg.style.background = b_out;
			tg.style.color = f_out;
			tg.style.border = "1 solid black";
			tg.hideFocus=true;
		}
		if (tg.xptextbox != null)
		{
			if (document.activeElement != tg)	tg.style.border = t_out;
		}
	}
}
function ffocus()	
{
	if (document.all)
	{
	var tg = event.srcElement;

		if (tg.xptextbox != null)
		{
			tg.style.border = t_over;
			tg.onblur = flfocus;
		}
	}
}
function flfocus()
{
	if (document.all)
	{
	var tg = event.srcElement;
		if (tg.xptextbox != null)
		{
			tg.style.border = t_out;
		}
	}
}