// any quotation marks (") within the string need to be escaped: \" or special charactered: &quot;
// (or converted to single quote: ')
// copyright: &copy;
// trademark:&trade;
// registered trademark:&reg;




/* Recipe Ideas */

var recipes = new Array( 

/* 2007-10-24 */


"&quot; I like to use Ragu&reg; Pasta Sauce to make lasagna and other pasta dishes. I make them ahead of time and freeze them for those busy holiday nights when I don't have time to cook.&quot; -- Michelle B.",
"&quot; Wish-Bone&reg; Italian dressing makes holiday entertaining simple. Use it as a marinade to make all kinds of meat and vegetables flavorful and delicious in no time! Chicken comes out with a nice kick!&quot; --  Bonnie B.",
"&quot; With all the things to do around the holidays, I try to find shortcuts to help in all the hustle and bustle. One shortcut that helps is using my crockpot. I put one envelope of Lipton&reg; Recipe Secrets&reg; Onion Soup mix in the bottom of the crockpot, add a roast (beef or pork), and one can of cranberry sauce. It's a quick and easy shortcut that doesn't taste like a shortcut!&quot; -- Wendy T."



);









/* Beauty Made Simple */

var beauty = new Array( 


/* 2007-10-24 */

"&quot; Keep Vaseline&reg; Intensive Care&reg; Lotion by the sink, when you are done washing dishes, and drying your hands, put lotion on immediately to keep your hands soft and young looking during one of your busiest seasons of the year.&quot; -- Debra K.",
"&quot; Lever 2000&reg; when you need to refresh and replenish your skin with a formula that contains vitamins and mnerals after a long day in the yard raking, planting and putting away the summer yard decorations and furniture!&quot; -- Ruth Ann N.",
"&quot; I keep a small tube of Vaseline&reg; Total Moisture in my purse so even when running around shopping, I can always pull it out and give my skin a little boost.&quot; -- Beth O."



);










/* Household Hints */

var household = new Array( 

/* 2007-10-24 */


"&quot; Wisk&reg; is a great cleaning product for all kinds of stains. From cooking to the kids playing outside in the weather. It keeps everything clean time after time.&quot; -- Amy S.", 
"&quot; When the holidays get hectic, I like to put my feet up and relax with a nice warm cup of Lipton&reg; Tea.&quot; -- Krista V.",
"&quot; Snuggle&reg; Fabric Softener is a must have in my household. When the seasons change and you can't hang laundry outside, Snuggle helps you make sure your laundry always smells &quot;fresh from the line&quot;.&quot; -- Dawn H."


)







var page = location.href;
var tipPath = page.substring(page.lastIndexOf('/')+1, page.lastIndexOf('.'));
var whichTip = eval(tipPath);
var totalTips = whichTip.length;
var ellipsisMode = false;

function writeTipsNav(whichPage, section)
	{

	// set how many nav links appear per "section"
	var interval=4;
	
	if (totalTips<interval) { interval=totalTips; }
	
	/*  ------------ */
	if (!section) { section=0; }
	if (!whichPage) { whichPage=1; }

	//whichPage--;
	document.getElementById("tipArea").innerHTML = whichTip[(whichPage-1)];

	// determine which page is calling for content
	// put that navigation content into a temp
	if (interval > totalTips ) { interval = totalTips; }
	
	//w = eval(whichDir + "Nav");
	//if (!whichTip) {whichTip = tempArray[0];} /* tempArray formerly w[0] */
	
	intervalStart = interval * section;
	previousLink = "";
	nextLink = "";
	// these set up the "next" and "previous" intervals
	t = intervalStart+interval;
	if ( t >=totalTips ) { intervalNext = totalTips;}
	else { intervalNext = intervalStart+interval; }
	t = intervalStart-interval;
	if ( t <interval ) { intervalPrevious = 0;}
	else { intervalPrevious = intervalStart-interval; }
	// parts of the navigation
	var p1 = "<a href=\"#\" onClick=\"writeTipsNav(";
	var p2 = ", ";
	var p3 = "); return false;\">";
	var previousArrow = "&laquo;";
	var nextArrow = "&raquo;"
	var p4 = "<\/a>";
	var pipe = " | ";
	var showAllTips = "";
	var moreTips = (totalTips<2) ? "" : "<span class=\"moreTips\"><a href=\"real_people.html?id=" + tipPath + "\">View all tips</a><span class=\"fullTips\">|</span>more tips:</span>" ;
	var tipsIntro =  showAllTips + moreTips;
	var tipnav =  tipsIntro;
	// creates the "previous" arrow (if one should be there)
	if ( section > 0)
		{
		previous = intervalPrevious+1;
		//link = tempArray[intervalPrevious];		 
		previousLink=  p1 + previous  + p2 +  (section-1) + p3 + previousArrow + p4 + pipe;
		}
	// creates the "next" arrow (if one should be there)
	if ( intervalNext < totalTips )
		{
		next = intervalNext+1;
		//link = tempArray[intervalNext]; 
		nextLink= pipe + p1 + next  + p2 + (section+1) + p3 + nextArrow  + p4;
		}
	// append the 'previous link' arrow onto the nav (if there is one)
	tipnav = tipnav + previousLink;
	
	link=0;
	for (x=intervalStart; x<intervalNext ; x++)
		{
		link = x +1;
		// if not the last link then put a pipe between links
		pipe = (link < intervalNext )  ? " | " : "";
		// for all other pages (but the one you're on, create link
		if ( whichPage != link ) { tipnav = tipnav + p1 + link + p2 + section + p3 + link + p4  + pipe; }
		// no link for the page you are on
		else { tipnav = tipnav + "<b>" + link + "<\/b>" + pipe; }
		}
	// append the 'next link' arrow onto the nav (if there is one)
	tipnav = tipnav + nextLink;
	if ( totalTips<2 ) { tipnav = tipsIntro; }
	document.getElementById("tipNav").innerHTML = tipnav;
	}



// to insure this works,
// make sure page name matches the array name
// "var beauty" matches "beauty.html"
// "var household" matches "household.html"
// each page sends to this function
// the name of the page that is requesting a tip
// document.write(randomNumber(location.href) );
function randomNumber()
	{
	var quote = Math.floor( Math.random() * whichTip.length);

	// to test out the length of a particular quote,
	// count its place in the array (starting from 0)
	// you can test directly from the location window
	// add number of new quote to test length:   pagename.html?tip=##;
	var tipTester = "tip=";
	var testTipNumber = page.substring(page.indexOf(tipTester)+tipTester.length);
	var isNumeric = /^[0-9]+$/;
	if (isNumeric.test(testTipNumber)) { quote=testTipNumber; }
	
	document.write( whichTip[quote] );
	
	}


