//display appropriate visual and textual information pertaining to selected element on the page.
//visual information will appear in the element with the ID "input_image". e.g. (<div id="input_image"></div>)
//textual information will appear in the element with the ID "input_text". e.g. (<div id="input_text"></div>)

var text = new Array()
text[0] = '<h2>holes & receivers</h2><p class=\"subtext\">diPEG currently offers five different hole & receiver combinations. Round and square holes are typically open and unfinished at the core. However, round holes can be filled with nylon or steel receivers. Custom sized holes and receivers can be produced given sufficient quantities and lead-time. Tooling charges will apply for custom shapes.</p>'
text[1] = '<h2>1 1/4\" round open hole</h2><p class=\"subtext\">The round, open hole is diPEG\'s most economical version. The hole features the unique chamfer which, while invisible to the customer, prevents merchandising hardware from rotating and is a key element of the diPEG patent. Open holes are typically unfinished at the core.</p>'
text[2] = '<h2>1 1/4\" nylon receptacle</h2><p class=\"subtext\">If a more finished  look is preferred, holes can be filled with nylon receivers. Receivers are factory installed to ensure a perfect fit. They have a 1/8\" reveal that is flush with the panel\'s surface. Nylon receivers are stocked in white, but are also available in any color given minimum quantities. Nylon receivers are an inexpensive way to finish off a panel!</p>'
text[3] = '<h2>1 1/4\" steel receptacle</h2><p class=\"subtext\">If your design favors the look of steel, or if it features extraordinarily heavy merchandise, a diPEG steel receiver is the answer. Factory installed to ensure a perfect fit, steel receivers have a 3/8\" reveal that frames the 1 1/4\" hole. Typically finished in brushed nickel or mirror polished chrome, custom plated or painted finishes are available given sufficient quantities. Steel Inserts are the most effective puck system in the market!</p>'
text[4] = '<h2>3/4\" square open hole</h2><p class=\"subtext\">If you are considering square holes, the diPEG offers a 3/4\" version. Typically unfinished at the core, square holes feature the unique chamfer which, while invisible to the customer, prevents merchandising hardware from rotating and is a key element of the diPEG patent. Open holes are always an economical alternative</p>'
text[5] = '<h2>1\" square open hole</h2><p class=\"subtext\">If you are considering square holes, diPEG offers a 1\" version. Typically unfinished at the core, square holes feature a unique chamfer which, while invisible to the customer, prevents merchandising hardware from rotating and is a key element of the diPEG patent. Open holes are always an economical alternative.</p>'
text[6] = '<h2>1/2\" steel receptacle</h2><p class=\"subtext\">If your design favors the look of steel, or if it features extraordinarily heavy merchandise, but you want a more refined look, 1/2" diPEG steel receiver is the answer. Factory installed to ensure a perfect fit. Typically finished in brushed nickel or mirror polished chrome, custom plated or painted finishes are available given sufficient quantities. Steel Inserts are the most effective puck system in the market!</p>'

var smalltext = "<p class=\"smalltext\">diPEG offers design flexibility at an affordable price!</p>"
var output_image = document.getElementById("input_image")

//'page' parameter passed for special handling for specific pages
//'image' parameter will be used for displaying the image
//'image_id' parameter will be used to match up the current element with the correct text[] index
function generateimage(page, image, image_id)
{
    output_image.innerHTML = "<img src=\"" + image + "\"><br />"

	if (page == "holes_and_receievers")
	{
		var output_text = document.getElementById("input_text")
    	output_text.innerHTML = text[image_id] + smalltext
	}
}
