/* ================================
    Sitewide JavaScript
   ================================ */

/* If you need to preload images:

if(document.images)
{
	var myImages = new Object();
	preload_image('images/header8.png');
	preload_image('images/header9.png');
}

*/

function pageLoaded()
{
	var tipcat;
	tipcat = parseInt(Math.random()*4) + 1;
	var tipnum;
	if(tipcat==1)
	{
		tipnum = parseInt(Math.random()*4) + 1;
		document.getElementById("tipImage").src = "images/tips/weddings.gif";
		if(tipnum==1)
		{
			document.getElementById("tipText").innerHTML = "Ask your wedding clients to consider donating their arrangements to a hospital or nursing home after their event.";
		}
		else if(tipnum==2)
		{
			document.getElementById("tipText").innerHTML = "Use empty, clean used wine bottles, canning jars, and tin cans for eco-friendly centerpieces.";
		}
		else if(tipnum==3)
		{
			document.getElementById("tipText").innerHTML = "Ceremony decorations can be repurposed at the reception, including bouquets.";
		}
		else if(tipnum==4)
		{
			document.getElementById("tipText").innerHTML = "Don't mix daffodils with other flowers&mdash;a chemical they emit can shorten the vase life of neighboring flowers.";
		}
	}
	else if(tipcat==2)
	{
		tipnum = parseInt(Math.random()*4) + 1;
		document.getElementById("tipImage").src = "images/tips/sympathy.gif";
		if(tipnum==1)
		{
			document.getElementById("tipText").innerHTML = "Remind your clients that it is important that flowers be delivered before the first visitation hours.";
		}
		else if(tipnum==2)
		{
			document.getElementById("tipText").innerHTML = "Flowers can be sent up to a month following a funeral service to the family's home.";
		}
		else if(tipnum==3)
		{
			document.getElementById("tipText").innerHTML = "Have your clients keep their sympathy card messages relatively short, and make sure they sign last names.";
		}
		else if(tipnum==4)
		{
			document.getElementById("tipText").innerHTML = "Traditional funeral flowers include carnations, lilies and calla lilies, but any type are perfectly acceptable.";
		}
		
	}
	else if(tipcat==3)
	{
		tipnum = parseInt(Math.random()*4) + 1;
		document.getElementById("tipImage").src = "images/tips/special.gif";
		if(tipnum==1)
		{
			document.getElementById("tipText").innerHTML = "Incorporate non-floral elements into boutonnieres for added personality.";
		}
		else if(tipnum==2)
		{
			document.getElementById("tipText").innerHTML = "Wrist corsages are a great alternative to pinned.";
		}
		else if(tipnum==3)
		{
			document.getElementById("tipText").innerHTML = "Cut stems at an angle to ensure maximum water uptake.";
		}
		else if(tipnum==4)
		{
			document.getElementById("tipText").innerHTML = "Remove any leaves that will be under water to keep them from rotting.";
		}
		else if (tipnum==5)
		{
			document.getElementById("tipText").innerHTML = "People find it hard to find the right words. Help them out with a prepared list of &quot;great lines&quot; that customers can use on the cards that accompany your designs.";
		}	
	}
	else if(tipcat==4)
	{
		tipnum = parseInt(Math.random()*5) + 1;
		document.getElementById("tipImage").src = "images/tips/care.gif";
		if(tipnum==1)
		{
			document.getElementById("tipText").innerHTML = "There's less oxygen in lukewarm water, which can get trapped in the flowers' stems and prevent them from getting water.";
		}
		else if(tipnum==2)
		{
			document.getElementById("tipText").innerHTML = "Make sure all vases are thoroughly cleaned &mdash; bacteria will cause flowers to die.";
		}
		else if(tipnum==3)
		{
			document.getElementById("tipText").innerHTML = "Pennies, bleach and aspirin are thought to prolong flowers, but are not good substitutes to flower food.";
		}
		else if(tipnum==4)
		{
			document.getElementById("tipText").innerHTML = "Ethylene gas in ripening fruit can prematurely wilt flowers, so take care where flowers are placed.";
		}
		else if(tipnum==5)
		{
			document.getElementById("tipText").innerHTML = "Flower food contains a combination of biocide (to kill bacteria), acid (to promote water movement up the stem), and sugar (flower food).";
		}
	}
	
	// Insert code before and after the overall template page loaded code as necessary
	sitewidePageLoaded();
}
