// Preload blue button images

//bluebtn_off_left = new Image();
bluebtn_off_left = 'images/buttons/bluebtn_off_left.gif';
//bluebtn_off_back = new Image();
bluebtn_off_back = 'images/buttons/bluebtn_off_back.gif';
//bluebtn_off_right = new Image();
bluebtn_off_right = 'images/buttons/bluebtn_off_right.gif';
//bluebtn_on_left = new Image();
bluebtn_on_left = 'images/buttons/bluebtn_on_left.gif';
//bluebtn_on_back = new Image();
bluebtn_on_back = 'images/buttons/bluebtn_on_back.gif';
//bluebtn_on_right = new Image();
bluebtn_on_right = 'images/buttons/bluebtn_on_right.gif';

function bluebtn_on(which, root)
{
	document.getElementById(which+'_left').style.backgroundImage = 'url('+root+bluebtn_on_left+')';
	document.getElementById(which+'_back').style.backgroundImage = 'url('+root+bluebtn_on_back+')';
	document.getElementById(which+'_right').style.backgroundImage = 'url('+root+bluebtn_on_right+')';
}

function bluebtn_off(which, root)
{
	document.getElementById(which+'_left').style.backgroundImage = 'url('+root+bluebtn_off_left+')';
	document.getElementById(which+'_back').style.backgroundImage = 'url('+root+bluebtn_off_back+')';
	document.getElementById(which+'_right').style.backgroundImage = 'url('+root+bluebtn_off_right+')';
}

bluebtn_next = 0;

function draw_blue_button(text, url, trg)
{
	if (!trg) trg="_self";
	do_draw_blue_button(text, url, trg, "");
}

function draw_blue_button_sub(text, url, trg)
{
	if (!trg) trg="_self";
	do_draw_blue_button(text, url, trg, "../");
}

function do_draw_blue_button(text, url, trg, root)
{
	document.writeln('	<table cellspacing="0" height="23" onmouseover="bluebtn_on('+bluebtn_next+', '+root+');" onmouseout="bluebtn_off('+bluebtn_next+', '+root+');" style="cursor: pointer;">');
	document.writeln('		<tr>');
	document.writeln('			<td width="11" height="23" style="background-image: url('+root+bluebtn_off_left+');" id="'+bluebtn_next+'_left"></td>');
	document.writeln('			<td height="23" valign="middle" style="background-image: url('+root+bluebtn_off_back+'); background-repeat: repeat-x;" id="'+bluebtn_next+'_back"><a style="cursor: pointer; font-weight: bold; font-size: 17px; text-decoration: none; color: black;" href="'+url+'" target="'+trg+'">'+text+'</a></td>');
	document.writeln('			<td width="11" height="23" style="background-image: url('+root+bluebtn_off_right+');" id="'+bluebtn_next+'_right"></td>');
	document.writeln('		</tr>');
	document.writeln('	</table>');
	++bluebtn_next;
}
