function btnonmousedown(f,act,overcolor,gradcolor)
{
	if(act)
	{
		f.parentNode.parentNode.childNodes[0].childNodes[1].style.backgroundColor='#333333';
		f.parentNode.parentNode.childNodes[1].childNodes[0].style.backgroundColor='#444444';
		f.parentNode.parentNode.childNodes[1].childNodes[2].style.backgroundColor=overcolor;
		f.parentNode.parentNode.childNodes[1].childNodes[3].style.backgroundColor=gradcolor;
		f.parentNode.parentNode.childNodes[2].childNodes[0].style.backgroundColor='#444444';
		f.parentNode.parentNode.childNodes[2].childNodes[1].style.backgroundColor=overcolor;
		f.parentNode.parentNode.childNodes[2].childNodes[2].style.backgroundColor=gradcolor;
		f.parentNode.parentNode.childNodes[3].childNodes[1].style.backgroundColor=gradcolor;
		//f.style.padding = '3 5 -1 5';
	}
	else
	{
		f.parentNode.parentNode.childNodes[0].childNodes[1].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[1].childNodes[0].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[1].childNodes[2].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[1].childNodes[3].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[2].childNodes[0].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[2].childNodes[1].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[2].childNodes[2].style.backgroundColor='';
		f.parentNode.parentNode.childNodes[3].childNodes[1].style.backgroundColor='';
		//f.style.padding = '2 6 0 4';
	}
}
function btncreate(btntxt,btnimg,btncolor,btngradcolor,btnovercolor,btnfunc)
{
	document.write ("<table border=0 cellpadding=0 cellspacing=0 oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart=\"return false\">")
	document.write ("	<tr height=1>")
	document.write ("		<td width=1></td>")
	document.write ("		<td bgcolor=\"" + btngradcolor + "\" colspan=2></td><td></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td bgcolor=\"" + btngradcolor + "\" width=1></td>")
	document.write ("		<td align=center style=\"padding:2 6 1 4\" bgcolor=\"" + btncolor + "\" style=\"cursor:hand;\" onclick=\"" + btnfunc + "\" onmouseover=\"this.style.backgroundColor='" + btnovercolor + "'\" onmouseout=\"this.style.backgroundColor='';btnonmousedown(this,false,'','');\" onmousedown=\"btnonmousedown(this,true,'" + btnovercolor + "','" + btngradcolor + "');\" onmouseup=\"btnonmousedown(this,false,'','');\"> ")
	if(btnimg)
		document.write ("<img src=/images/" + btnimg + " border=0 align=absmiddle hspace=2>")
	document.write (btntxt)
	document.write (" </td>")
	document.write ("		<td width=1 bgcolor=\"" + btngradcolor + "\"></td><td bgcolor=\"#333333\" width=1></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td bgcolor=\"#BEBEBE\" width=1></td>")
	document.write ("		<td colspan=2 bgcolor=\"" + btngradcolor + "\"></td><td bgcolor=\"#333333\" width=1></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td width=1></td>")
	document.write ("		<td colspan=2 bgcolor=\"#333333\"></td><td></td>")
	document.write ("	</tr>")
	document.write ("</table>")
}


function btncreate2(btntxt,btnimg,btncolor,btngradcolor,btnovercolor,btnfunc)
{
	document.write ("<table border=0 cellpadding=0 cellspacing=0 oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart=\"return false\">")
	document.write ("	<tr height=1>")
	document.write ("		<td width=1></td>")
	document.write ("		<td bgcolor=\"" + btngradcolor + "\" colspan=2></td><td></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td bgcolor=\"" + btngradcolor + "\" width=1></td>")
	document.write ("		<td align=center style=\"padding:2 6 1 4\" bgcolor=\"" + btncolor + "\"  > ")
	if(btnimg)
		document.write ("<img src=/images/" + btnimg + " border=0 align=absmiddle hspace=2>")
	document.write (btntxt)
	document.write (" </td>")
	document.write ("		<td width=1 bgcolor=\"" + btngradcolor + "\"></td><td bgcolor=\"#333333\" width=1></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td bgcolor=\"#BEBEBE\" width=1></td>")
	document.write ("		<td colspan=2 bgcolor=\"" + btngradcolor + "\"></td><td bgcolor=\"#333333\" width=1></td>")
	document.write ("	</tr>")
	document.write ("	<tr>")
	document.write ("		<td width=1></td>")
	document.write ("		<td colspan=2 bgcolor=\"#333333\"></td><td></td>")
	document.write ("	</tr>")
	document.write ("</table>")
}
