// MainArticles.js
// This script creates article headings and bodies for Thrifty Outfitter's home page main news column.
// Written by: Brian Bahn
// Updated: 01/20/2010


////////////////////////////////////////////////////////////
// User variables and image array section.                //
// Edit only within this section.                         //
////////////////////////////////////////////////////////////

// Create an index for the articles array and initialize to 0.
var idxArticles = 0; 
// Table caption.
var strTableCaption = "";

// Edit event fields in this array using comma separated quoted format.  
// Two fields per article:
// 1. Heading
// 2. Content
// Example data record:
//	"ArticleHeading", "ArticleContent", 

var aryMainArticles = new Array
	(
//	"Employee Garage Sale", "<img src=\"images/GarageSale.jpg\" width=\"100\" height-\"71\" alt=\"GarageSale.jpg\" style=\"margin-left: 5px; float: right;\" /> <p>The garage sale is coming quickly!&nbsp; It is this weekend - December 5th and 6th.</p> <p>Sat:&nbsp; 9 &ndash; 7<br />Sun:&nbsp; 11 &ndash; 6</p> <p>Save 50% and more on Thrifty Outfitters employee's outdoor gear and clothing.&nbsp; Our employees upgrade all of the time - here's your chance to cash in on some really great gear!</p> <p>Arrive early, the best deals disappear quickly!&nbsp; Good luck!</p>", 
//	"Extended Holiday Hours", "<img src=\"images/MistletoeRibbon.jpg\" width=\"77\" height-\"78\" alt=\"MistletoeRibbon.jpg\" style=\"margin-left: 5px; float: right;\" /> <p>Avoid the rush.&nbsp; Come to Thrifty Outfitters and shop hassle-free during our extended Holiday hours.&nbsp; We are open two extra hours on Saturdays and Sundays from now through January 3rd, 2010.</p> <p>Mon&ndash;Fri Hours:&nbsp; 10 &ndash; 9<br />Saturday Hours:&nbsp; 9 &ndash; 7<br />Sunday Hours:&nbsp; 11 &ndash; 6</p>", 
//	"Closed for Inventory", "<img src=\"images/ClosedSign-Transparent.gif\" width=\"123\" height-\"123\" alt=\"ClosedSign-Transparent.gif\" style=\"margin-left: 5px; float: right;\" /> <p>Thank you for your patience while we are closed on Tuesday, January 19<span class=\"ordinal\">th</span> to count all of the fun products in the store.</p><div style=\"clear: both;\">&nbsp;</div>", 
	"Thrifty Outfitters Repair Department has Expanded", "<p>We now have 2 industrial sewing machines along with two great additions to the sewing team, Joey and Rose.&nbsp; We can turn around repairs in most cases in two weeks or less!&nbsp; We can fix your tent, jacket, sleeping bag or backpack.&nbsp; Tent poles stoves and lanterns, too.</p> <p>Stop on by and get your gear all fixed up again!</p>", 
	"Thrifty Outfitters Retail Floor<br />has Expanded", "<p>Thrifty has gained a new room of space!&nbsp; We now have a women's clothing room and more space for merchandise.&nbsp; Also, check out the gear for sale/wanted bulletin board next to the stairs.&nbsp; Come in soon!</p>", 
	"Thrifty Outfitters is a locally owned outdoor store in Minneapolis, Minnesota.", "<p>We have great deals on closeouts, factory seconds, salesman samples, and used gear for outdoors people on a budget.</p> <p>Our expert repair service can get your worn or damaged equipment and clothing back in action in no time.&nbsp; We are an authorized repair center for Coleman, Gore, and Helly Hansen brand products.</p> <h4 style=\"display: none;\"><img src=\"images/Canoeing.jpg\" alt=\"Canoeing.jpg\" width=\"289\" height=\"218\" style=\"margin: 5px; border: 1px solid silver; padding: 2px;\" /><br />Get Outdoors &mdash; Then Come See Us !!!</h4>"//, 
	);


////////////////////////////////////////////////////////////
// Processing section.                                    //
// Do not edit within this section.                       //
////////////////////////////////////////////////////////////


function fnCreateMainArticlesColumn()
	{
	var strArticleHeading; 
	var strArticleContent; 

	// Write column header.
//	document.write('<div id="divArticlesHeading">');
//	document.write('Main Articles');
//	document.write('</div>	<!-- End of LatestNewsHeading. -->');

	// Write article(s) from array.
	for (var idxArticles = 0; idxArticles < aryMainArticles.length; idxArticles++)
		{
		// Get heading field from articles array.
		strArticleHeading = aryMainArticles[idxArticles]; 
		if (idxArticles == 0)
			{
			document.write('<div class="clsArticle" style="margin-top: 0px; padding-top: 0px;">');
			}
		else
			{
			document.write('<div class="clsArticle">');
			}
		document.write('<div class="clsArticleHeading">');
		document.write(strArticleHeading);
		document.write('</div>	<!-- End of clsArticleHeading. -->');
		// Get content field from articles array.
		idxArticles++
		strArticleContent = aryMainArticles[idxArticles]; 
		document.write('<div class="clsArticleContent">');
		document.write(strArticleContent);
		document.write('</div>	<!-- End of clsArticleContent. -->');
		document.write('</div>	<!-- End of div.clsArticle. -->');
		}

	}	// End of function fnCreateLatestNewsColumn.


// End of MainArticles.js