//**************************************
//
//			faq_main_Buttons.js
//
//**************************************
var	ButtonUpDelay	= 200;
var	ButtonUpId		= "ButtonUp";
var	ButtonDnId		= "ButtonDn";
var	Buttons = new Array(0);
//		Create Buttons
Button("faq.htm","IP Frequenty Asked Questions","Answers to Frequently Asked Questions (FAQ) about Intellectual Property");
Button("contact_info.htm","Contact Information","Contact Information for Bruce E. Hayden, P.C.");
Button("outline.htm","Patent Practice Outline","Patent Practice Outline");
Button("fees.htm","Explanation of Billing and Costs","Billing and Cost Information");
Button("flowchart.htm","Patent Prosecution Flowchart","Flowchart Illustrating Typical Patent Prosecution");
Button("patlist.htm","Sample List of Patents","Sample List of Issued U.S. Patents");
Button("links.htm","Useful IP Links","Potentially Useful Intellectual Property Links (URLs)");
Button("resume.htm","Qualifications and Expertise","Professional Qualification and Expertise");
Button("","",""); // Dummy button for odd number of buttons
//**************************************
//		Button(url, text, title)
//**************************************
function Button(url, text, title)
{
var index = Buttons.length;
Buttons[index] = new ButtonObject(index, url, text, title);
}
//**************************************
//	ButtonObject(index, url, text, title)
//**************************************
function ButtonObject(index, url, text, title)
{
this.index = index;
this.url   = url;
this.text  = text;
this.title = title;
this.id    = "BID"+index;
this.timer = null;
this.down  = false;
this.elt   = null;
} 
//**************************************
//			PushButton(index)
//**************************************
function PushButton(index)
{
var button = Buttons[index];

if(!button.elt)
    button.elt = document.getElementById(button.id);

button.timer = setTimeout("PopButton("+index+")",ButtonUpDelay);
button.elt.className = ButtonDnId;
button.down = true;
window.location = button.url;
}
//**************************************
//			PopButton(index)
//**************************************
function PopButton(index)
{
var button = Buttons[index];
if (button.down)
	{
	button.down = false;
	button.elt.className = ButtonUpId;
	}
}
//**************************************
//			PutButton(button)
//**************************************
function PutButton(button)
{
document.write('<td class="'+ButtonUpId+'"');
document.write(' id="'+button.id+'"');
document.write(" onclick='PushButton("+button.index+")'");
document.write(' title="'+button.title+'">');
document.writeln(button.text+'</td>');
}
//**************************************
//		Generate Button Table
//**************************************
document.writeln('<table class="table3" border="1" cellspacing="1" >');
document.writeln('<colgroup span=2 align=left valign=middle width="1*,1*">');
document.writeln('<col  span=1 align=left valign=center width="50%"></col>');
document.writeln('<col  span=1 align=left valign=center width="50%"></col>');
document.writeln('</colgroup>');
document.writeln('<tbody>');

for (var i=0; i<Buttons.length-1; i+=2)
	{
	document.writeln("<tr>");
	PutButton(Buttons[i]);
	PutButton(Buttons[i+1]);
	document.writeln("</tr>");
	}
document.writeln("</tbody>");
document.writeln("</table>");

