// MainArticles.js
// This script creates article headings and bodies for Thrifty Outfitter's home page main news column.
// Written by: Brian Bahn
// Updated:  01/18/2012

////////////////////////////////////////////////////////////
// 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
	(
	"Thrifty Outfitters Retail Floor has Expanded", "<img src=\"images/ThriftyOutfitters-NewRoomNW-Medium.jpg\" width=\"450\" height=\"338\" alt=\"ThriftyOutfitters-NewRoomNW-Medium.jpg\" style=\"border: 1px solid silver; \" /><br /><br /> <p>Thrifty has gained another new room of space!&nbsp; We now have more space for merchandise.&nbsp; Also, check out the gear for sale/wanted bulletin board next to the stairs.&nbsp; Come in soon!</p>", 
//	"Holiday Hours", "<p>July 4<span class=\"ordinal\">th</span> Weekend Hours:&nbsp; Sat. 9&ndash;7,&nbsp; Sun. 11&ndash;6,&nbsp; Mon. 10&ndash;5</p>",
//	"Spring Cleaning", "<p>Read the recent Midwest Ramblings article in our customer e-newsletter about cleaning and repairing your gear.&nbsp; We think you'll find it very insightful!</p> Article:&nbsp; <a href=\"forms/SpringGearRepairMaintenance.pdf\" target=\"ThriftyPopup\">SpringGearRepairMaintenance.pdf</a>", 
//	"New Store Hours", "<p style=\"text-align: center; \">Beginning Saturday, April 30<span class=\"ordinal\">th</span>, 2011 we will be open:</p> <p style=\"text-align: center; \">Saturdays from 9:00<span class=\"ampm\">am</span> &ndash; 7:00<span class=\"ampm\">pm</span><br />and<br />Sundays from 11:00<span class=\"ampm\">am</span> &ndash; 6:00<span class=\"ampm\">pm</span></p>",
	"Repairs", "<p>We are currently experiencing a high volume of repairs.&nbsp; Due to this high volume repairs may take approximately two weeks.&nbsp; Thanks for your patience while we work feverishly to get your items repaired and back in your hands as soon as possible.</p>",
//	"Employee Garage Sale", "<img src=\"images/GarageSale.jpg\" width=\"150\" height-\"106\" alt=\"GarageSale.jpg\" style=\"margin-left: 5px; float: right;\" /> <p>The garage sale is coming quickly!&nbsp; It is the weekend of May 28<span class=\"ordinal\">th</span> to 30<span class=\"ordinal\">th</span>.&nbsp; 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>Sat, May 28<span class=\"ordinal\">th</span>:&nbsp; 9<span class=\"ampm\">am</span> &ndash; 7<span class=\"ampm\">pm</span><br />Sun, May 29<span class=\"ordinal\">th</span>:&nbsp; 11<span class=\"ampm\">am</span> &ndash; 6<span class=\"ampm\">pm</span><br />Mon, May 30<span class=\"ordinal\">th</span>:&nbsp; 10<span class=\"ampm\">am</span> &ndash; 5<span class=\"ampm\">pm</span></p> <p>Arrive early, the best deals disappear quickly!&nbsp; Good luck!</p>", 
//	"Thank You", "<h2>For an excellent Spring Outdoor Adventure Expo</h2> <p>We worked hard and had a lot of fun!&nbsp; Hope you did too!&nbsp; We look forward to seeing you next Fall at Midwest Mountaineering's 53<span class=\"ordinal\">rd</span> Bi-Annual Outdoor Adventure Expo from November 18<span class=\"ordinal\">th</span> to 20<span class=\"ordinal\">th</span>.</p>", 
 //  "", "<script id=\"scrExpoWeekHoursCalendar\" language=\"javascript\" type=\"text/javascript\">fnExpoWeekHoursCalendar(); </script> <noscript><p class=\"noJavaScript\">javascript/OAE-PresentationCalendar.js cannot be loaded.<br />Enable JavaScript to view all of the content of this website.</p></noscript> <p style=\"text-align: center; \">Please note:&nbsp; Thursday night is our customer appreciation night pre-sale.<br />Best selection - get first pick!&nbsp; Everything is on Sale.</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 2<span class=\"ordinal\">nd</span>, 2011.</p> <p>Mon&ndash;Fri Hours:&nbsp; 10<span class=\"ampm\">am</span> &ndash; 9<span class=\"ampm\">pm</span><br />Saturday Hours:&nbsp; 9<span class=\"ampm\">am</span> &ndash; 7<span class=\"ampm\">pm</span><br />Sunday Hours:&nbsp; 11<span class=\"ampm\">am</span> &ndash; 6<span class=\"ampm\">pm</span></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<br />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>", 
	"About Thrifty Outfitters", "<h3>Thrifty Outfitters is a locally owned outdoor gear store<br />located in Minneapolis, Minnesota</h3> <p>We have a great selection of deals for you on manufacturer's closeouts, salesman samples, and special purchases.&nbsp; We purchase wisely and sell first-quality products at discount prices 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> <p>You can <b>save a lot of money</b> on our merchandise.&nbsp; We purchase our merchandise at a deep discount and pass the savings on to you!&nbsp; Shop us often &ndash; new bargains are hitting the floor all of the time!</p>"//, 
	);


////////////////////////////////////////////////////////////
// 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
