//---------------------------------------------------------------------------------------
	var selectedButton=new Object();
	var buttonList=new Object();
	var oldContent="";
//---------------------------------------------------------------------------------------
//this function initializes the array of button information for the menus
	function initButtons()
	{	
	buttonList["homeButton"]=new myButton("homeButton",
												"images/button-Home.gif",
												"images/button-Home-red.gif",
												"menuGroup",
												"Home",
												"220",
												"window.location=\'index.html\';");

	buttonList["orderButton"]=new myButton("orderButton",
												"images/button-order.gif",
												"images/button-order-red.gif",
												"menuGroup",
												"How to Order",
												"220",
												"window.location=\'order.html\';");
	buttonList["ptsButton"]=new myButton("ptsButton",
												"images/button-PTS.gif",
												"images/button-PTS-red.gif",
												"menuGroup",
												"Phoneme Touch &amp; Say DVD",
												"220",
												"window.location=\'PTS-plus.htm\';");
	buttonList["spellingButton"]=new myButton("spellingButton",
												"images/button-pts-spelling.gif",
												"images/button-pts-spelling-red.gif",
												"menuGroup",
												"Phoneme Touch &amp; Say for Spelling",
												"220",
												"window.location=\'spelling.html\';");
	buttonList["tdibButton"]=new myButton("tdibButton",
												"images/button-TDIB.gif",
												"images/button-TDIB-red.gif",
												"menuGroup",
												"The Dog is Barking DVD",
												"220",
												"window.location=\'TDIB.html\';");
	buttonList["iahButton"]=new myButton("iahButton",
												"images/button-IAH.gif",
												"images/button-IAH-red.gif",
												"menuGroup",
												"I am happy book",
												"220",
												"window.location=\'IAH.html\';");
	buttonList["tsmlButton"]=new myButton("tsmlButton",
												"images/button-TSML.gif",
												"images/button-TSML-red.gif",
												"menuGroup",
												"Touch & Say magnetic letters",
												"220",
												"window.location=\'tsml.htm\';");
	buttonList["ss1Button"]=new myButton("ss1Button",
												"images/button-ss1.gif",
												"images/button-ss1-red.gif",
												"menuGroup",
												"Sound Starters 1",
												"220",
												"window.location=\'ss1.html\';");
	buttonList["icsiButton"]=new myButton("icsiButton",
												"images/button-ICSI.gif",
												"images/button-ICSI-red.gif",
												"menuGroup",
												"I Can Say It Calendar",
												"220",
												"window.location=\'calendar.html\';");
	buttonList["lltButton"]=new myButton("lltButton",
												"images/button-LLT.gif",
												"images/button-LLT-red.gif",
												"menuGroup",
												"Learning Language Together&trade;",
												"220",
												"window.location=\'LLT.html\';");
	buttonList["jillButton"]=new myButton("jillButton",
												"images/button-Jill.gif",
												"images/button-Jill-red.gif",
												"menuGroup",
												"Who is Jill Hicks",
												"220",
												"window.location=\'jill.html\';");
	buttonList["contactButton"]=new myButton("contactButton",
												"images/button-contact.gif",
												"images/button-contact-red.gif",
												"menuGroup",
												"How to contact us..",
												"220",
												"window.location=\'contact.html\';");
	buttonList["mailingListButton"]=new myButton("mailingListButton",
												"images/button-mailing-list.gif",
												"images/button-mailing-list-red.gif",
												"menuGroup",
												"Join our mailing list..",
												"220",
												"window.location=\'address-start.php\';");
	buttonList["workshopButton"]=new myButton("workshopButton",
												"images/button-workshops.gif",
												"images/button-workshops-red.gif",
												"menuGroup",
												"Workshops from Learning Language Together&trade;",
												"220",
												"window.location=\'workshops.html\';");
	buttonList["articlesButton"]=new myButton("articlesButton",
												"images/button-article.gif",
												"images/button-article-red.gif",
												"menuGroup",
												"Articles",
												"220",
												"window.location=\'articles.html\';");
	buttonList["testimonialButton"]=new myButton("testimonialButton",
												"images/button-testimonial.gif",
												"images/button-testimonial-red.gif",
												"menuGroup",
												"Testimonials for Learning Language Together&trade;",
												"220",
												"window.location=\'testimonials.html\';");
												
	selectedButton["menuGroup"]="homeButton";
	}
//---------------------------------------------------------------------------------------
//this is the object used to manage individual buttons
//it saves the urls for selected, mouseover, and normal
	function myButton(buttonId,src,redSrc,group,altText,buttonWidth,clickAction)
	{
	this.buttonId=buttonId;
	this.src=src;
	this.redSrc=redSrc;
	this.group=group;
	this.altText=altText;
	this.buttonWidth=buttonWidth;
	this.clickAction=clickAction;
	this.mouseOver=function()
		{
		if(selectedButton[this.group]==this.buttonId)document.getElementById(this.buttonId).src=this.redSrc;
		else 
			{
			document.getElementById(this.buttonId).style.backgroundColor="#E0E0E0";
			}
		};
	this.mouseOut=function()
		{
		if(selectedButton[this.group]==this.buttonId)document.getElementById(this.buttonId).src=this.redSrc;
		else 
			{
			document.getElementById(this.buttonId).src=this.src;
			document.getElementById(this.buttonId).style.backgroundColor="#FFFFFF";
			}
		};	
	this.select=function()
		{
		var currentSelection=selectedButton[this.group];
		document.getElementById(currentSelection).src=buttonList[currentSelection].src;
		selectedButton[this.group]=this.buttonId;
		document.getElementById(this.buttonId).src=this.redSrc;
		};	
	};

//--------------------------------------------------------------------------------------------
// method to manage behaviour on button clicks
//---------------------------------------------------------
//This function does everything required when a page is loaded
	function initContent(button) {

	    
    //	productContent.innerHTML=document.getElementById(content).innerHTML;
	    scroll(0,0);
    //	buttonList[button].select();
	}
//---------------------------------------------------------------------------------------
// This function is called by "onload" for the document body
	function initBody()
	{
	//initWorkshopTabs();
	initAboutUsTabs();
	initHorizontalTabs();
	}


//----------------------------------------------------------
// This function returns a string containing the HTML for a row of the product menu
function makeButtonHTML(buttonID)
	{
	var theButton=buttonList[buttonID];
	return	"<tr><td>"
		+	"<a "
		+	"onmouseover="+"\"buttonList[\'"+buttonID+"\'].mouseOver();\""
		+	" onmouseout=\"buttonList[\'"+buttonID+"\'].mouseOut();\""
		+	" onclick=\""+theButton.clickAction+";\">"
		+	"<img id=\""+buttonID+"\""+" src=\""+theButton.src+"\""
		+	" alt=\""+theButton.altText+"\" height=\"25\""
		+	" width=\""+theButton.buttonWidth+"\" border=\"0\">"
		+	"</a>"
		+	"</td></tr>";
	}
//----------------------------------------------------------------------------------------
// creates a table row with  a divider
function barHTML()
	{
	return "<tr><td><table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>"
		+ "<td><img src=\"images/divider-left-end.gif\"></td>"
		+ "<td><img src=\"images/divider-bar.gif\"></td>"
		+ "<td><img src=\"images/divider-right-end.gif\"></td>"
		+ "</tr></table></tr></td>";
	}


//-----------------------------------------------------------------------------------------
// function builds menu structure when the "catalogue" button has been selected
function buildMenu()
{
	var menuTable=document.createElement("DIV");
	menuTable.id="menuTable";
	document.body.appendChild(menuTable);
	menuTable.innerHTML="<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
		+ makeButtonHTML("homeButton")
		+ barHTML()
		+ makeButtonHTML("lltButton")
		+ makeButtonHTML("jillButton")
		+ makeButtonHTML("workshopButton")
		+ makeButtonHTML("articlesButton")
		+ makeButtonHTML("testimonialButton")
		+ barHTML()
		+ makeButtonHTML("orderButton")
		+ makeButtonHTML("contactButton")
		+ makeButtonHTML("mailingListButton")
		+ "</table>";
 
	menuTable.style.top="120";
	menuTable.style.left="5";
	menuTable.style.position="absolute";
}
function initLogo()
{
    var LltLogo = document.getElementById("logo");
		LltLogo.innerHTML="<table><tr>"	
			+ '<td><A href="index.html"><img height="60" alt="" src="images/LLT_Logo_RGB.jpg"  border="0"></A></td>'
			+ '<td width = "400"></td>'
			+ '<td><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">'
            + '<input type="hidden" name="cmd" value="_s-xclick">'
            + '<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIG1QYJKoZIhvcNAQcEoIIGxjCCBsICAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAhmZLgWZX6ItJcGcduX+XMcxhCS6GgvXyO0C7iiSQoMD7qOlNTAwocWrjx0jb09UtFhpg49JYskM3BwMJg0cylXLtHL8db12uTqApkP7VdDAUK3leNLHQFcsg/KXgLGFnuqD4x4acgpRRjNmI/43+eDdmT86iDxHVk9SV0EUruAzELMAkGBSsOAwIaBQAwUwYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAjIeZRSRpi1DYAwoZr0ZcZxtqq/t+enD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/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTAwNDI4MDAxOTUwWjAjBgkqhkiG9w0BCQQxFgQU/n8mxtcciZT5Gka4LpE8ZTJmabgwDQYJKoZIhvcNAQEBBQAEgYA/y2pOIiLjPlDQss306uxpYJg+pTrqo3pbd0W+UcJaqt+Wt1BNZW82H0Lm/uDG3xXyrXwVKzoE6r4O47BppWsvU+d9+ie6kWRD40aTmSncFXsjtVo82CHYIkmF/WkfG4GOY7rScp0f3PgHHsrdM3yn2lQVWiE0FwYiG44AIUaq5w==-----END PKCS7-----">'
            + '<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">'
            + '<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">'
            + '</form></td>'
			+ "</tr></table>";

	LltLogo.style.top="0";
	LltLogo.style.left="0";
	LltLogo.style.position="relative";
	
}
function initFooter(yPosition)
{
	var footer=document.createElement("DIV");
	document.body.appendChild(footer);
	footer.innerHTML=footerHTML();
	footer.style.position="absolute";
	footer.style.top=yPosition;
}

function footerHTML() {
    var myHTML = "<div class=\"footer\";><table class=\"lltNoBorder\">"
			+ "<tr><td width='200'></td><td align='middle'>"
			+ "<TABLE cellSpacing='0' cellPadding='0' border='0'>"
//			+ "<TR><TD><img height='25' alt='' src='images/divider-left-end.gif' width='10' border='0'></TD>"
//			+ "<TD><img height='25' alt='' src='images/divider-bar.gif' width='400' border='0'></TD>"
//			+ "<TD><img src='images/divider-right-end.gif'></TD></TR></TABLE>"
			+ "<tr>"
			+ "<td >"
			+ "</td>"
			+ "<td align='middle'>Copyright &copy; 2004-2009 Jill Hicks All rights reserved.</font></td>"
			+ "</tr>"
			+ "</table></div>";
    return myHTML;
}
