function m_on(imagename)
{
	if (document.images)
	{
		document [imagename].src = eval(imagename + "_MO.src");
	}
}

function m_out(imagename)
{
	if (document.images)
	{
		document [imagename].src = eval(imagename + ".src");
	}
}


function popup(file,options,width,height)
{
	if ((width != 0 || width !=null) && (height != 0 || height !=  null))
		{
			options = options+",width="+width+",height="+height;
		}
		var textWindow=window.open(file,"TextWindow",options);
}

function HideShowOver(elem)
{
	elem.style.cursor='hand';
	elem.style.textDecoration='underline';
	elem.style.color='orange';
}

function HideShowOut(elem)
{
	elem.style.textDecoration='none';
	elem.style.color='#C6C3C6';
}

if (document.images)
{
	home = new Image();
	home.src = "/images/menu_home_off.gif";
	home_MO = new Image();
	home_MO.src = "/images/menu_home_on.gif";

	dividends = new Image();
	dividends.src = "/images/menu_dividends_off.gif";
	dividends_MO = new Image();
	dividends_MO.src = "/images/menu_dividends_on.gif";

	loanrates = new Image();
	loanrates.src = "/images/menu_loanrates_off.gif";
	loanrates_MO = new Image();
	loanrates_MO.src = "/images/menu_loanrates_on.gif";

	online = new Image();
	online.src = "/images/menu_online_off.gif";
	online_MO = new Image();
	online_MO.src = "/images/menu_online_on.gif";

	cue = new Image();
	cue.src = "/images/menu_cue_off.gif";
	cue_MO = new Image();
	cue_MO.src = "/images/menu_cue_on.gif";
}	

function popup(file,options,width,height)
{
	if ((width != 0 || width !=null) && (height != 0 || height !=  null))
		{
			options = options+",width="+width+",height="+height;
		}
		win=window.open(file,"TextWindow",options);
}

function OpenCalc()
{
	if (((window.event.screenY) + 300) > (window.screen.height))
	{
		if (((window.event.screenX) + 300) > (window.screen.width))
		{
			window.open("calculator.asp","","width=210,height=265,left=" + (window.screen.width -350) + ",top=" + (window.screen.height -350));
		}
		else
		{
			window.open("calculator.asp","","width=210,height=265,left=" + window.event.screenX + ",top=" + (window.screen.height -350));
		}
	}
	else
	{
		if (((window.event.screenX) + 300) > (window.screen.width))
		{
			window.open("calculator.asp","","width=210,height=265,left=" + (window.screen.width -250) + ",top=" + window.event.screenY);
		}
		else
		{
			window.open("calculator.asp","","width=210,height=265,left=" + window.event.screenX + ",top=" + window.event.screenY);
		}
	}
}
