
// Testimonial shifter developed by Allan Bogh - Stealth Media Solutions, Inc.
// www.stealthmediasolutions.com

function flowers(){
//sets up variables to test which version browser the user has
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

//sets up the specials array
var flowers = new Array();
	//specials[0] = 'Each month you will see specials listed in this box, we currently have no specials listed yet but check back next month to see the updated specials!';
	flowers[0] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="349" height="276" align="right"><param name="movie" value="images/swf/cornerflower_1.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="images/swf/cornerflower_1.swf" width="349" height="276" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
	flowers[1] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="349" height="276" align="right"><param name="movie" value="images/swf/cornerflower_2.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="images/swf/cornerflower_2.swf" width="349" height="276" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
	flowers[2] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="349" height="276" align="right"><param name="movie" value="images/swf/cornerflower_3.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="images/swf/cornerflower_3.swf" width="349" height="276" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
	flowers[3] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="349" height="276" align="right"><param name="movie" value="images/swf/cornerflower_4.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="images/swf/cornerflower_4.swf" width="349" height="276" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
	flowers[4] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="349" height="276" align="right"><param name="movie" value="images/swf/cornerflower_5.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="images/swf/cornerflower_5.swf" width="349" height="276" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';

// change the number after Math.random() to the last number in the array or else the program
// won't check that number
// calls write to layer function with defined variables
	writetolayer('Layer1',flowers[Math.round(Math.random() * 4)]);
	
	function writetolayer(lay,txt) {

// checks browser version and writes layer text
// this will write to a layer called 'testimonial'
// should look like <div id="testimonial">
		if (ie4) {
			document.all[lay].innerHTML = txt;
		}
		if (ns4) {
			document[lay].document.write(txt);
			document[lay].document.close();
		}
		if (ns6) {
			over = document.getElementById([lay]);
			range = document.createRange();
			range.setStartBefore(over);
			domfrag = range.createContextualFragment(txt);
			while (over.hasChildNodes()) {
				over.removeChild(over.lastChild);
				}
			over.appendChild(domfrag);
	   		}
	   }

}

function testimonial(){
//sets up variables to test which version browser the user has
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

//sets up the testimonial array
var testimonial = new Array();
	testimonial[0] = 'To the entire staff of <br>the Garden Market.<br>Thank you for the service you provide and for always smiling. I had the greatest pleasure working with you for my bridal flowers.<br><br>Thank you,<br>Christine';
	testimonial[1] = 'Anne - <br>Thank you for all your lovely designs - the flowers were magnificent. You are truely professional!<br><br>Fondly, <br>Yvonne';
	testimonial[2] = 'Dear Anne & Carlene,<br><br>Thank you so much for the fantastic job you did with the flowers at my son\'s wedding.<br>The corsages were beautiful and the floral arrangements were absolutely <u>stunning</u>!! The biggest - most gorgeous arrangements I\'ve ever seen!! You have great talent & [you have] my business in future events. <br><br>Once again - Thank you for helping to make the wedding <u>so special.</u><br><br>Sincerely, <br>Louise';
	testimonial[3] = 'Dear VanLierop Garden Market<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Carlene Schneider,<br><br>We just wanted to take this time to thank you all for your hard work and dedication in our wedding. The flowers were so beautiful. Thank you so much for being so patient and nice to work with. I never had to worry about anything when it came to the flowers, that was such a relief. I would strongly recommend you to anyone that asked for a florist for any occasion. Thank you again for all of your time and patience. We really appreciate it. You did an excellent job!<br><br> Thanks again,<br>Andy and Shannon';

// change the number after Math.random() to the last number in the array or else the program
// won't check that number
// calls write to layer function with defined variables
	writetolayer('testimonial',testimonial[Math.round(Math.random() * 3)]);
	
	function writetolayer(lay,txt) {

// checks browser version and writes layer text
// this will write to a layer called 'testimonial'
// should look like <div id="testimonial">
		if (ie4) {
			document.all[lay].innerHTML = txt;
		}
		if (ns4) {
			document[lay].document.write(txt);
			document[lay].document.close();
		}
		if (ns6) {
			over = document.getElementById([lay]);
			range = document.createRange();
			range.setStartBefore(over);
			domfrag = range.createContextualFragment(txt);
			while (over.hasChildNodes()) {
				over.removeChild(over.lastChild);
				}
			over.appendChild(domfrag);
	   		}
	   }

}


// Testimonial shifter developed by Allan Bogh - Stealth Media Solutions, Inc.
// www.stealthmediasolutions.com
