function printRandomQuote() {var quotes = new Array(); var quoters = new Array(); quotes[0] = 'Bamboo coffins are biodegradable... a good starting point if you are interested in a green funeral.';
	quoters[0] = 'The Observer';
	quotes[1] = 'A bamboo coffin, a woodland grave... a template for a green funeral in every respect.';
	quoters[1] = 'The Daily Telegraph';
	quotes[2] = 'I was certainly most impressed with the quality and look, and know my sister would have been.';
	quoters[2] = 'Client, Holland';
	quotes[3] = 'The whole sad process of my father dying has been made considerably easier by finding your product.';
	quoters[3] = 'Client, Wiltshire';
	quotes[4] = 'A great coffin, showing how funerals are changing with the times.';
	quoters[4] = 'Hogben &amp; Partis Funeral Directors, Kent';
	quotes[5] = 'The family decorated the coffin themselves. All the mourners thought the coffin was perfect and much preferable to a standard style coffin.';
	quoters[5] = 'J E Spence Funeral Directors, Leeds';
	quotes[6] = 'My parents had very different wishes. My father was buried in the local churchyard. My mother was cremated. Your coffin was perfect for both.';
	quoters[6] = 'Client, Sheffield';
	quotes[7] = 'I\'m so glad I saw the coffin on Emmerdale. It came at just the right time.';
	quoters[7] = 'Client, Bristol';
	var randomNumber = Math.floor( Math.random() * quotes.length );
	document.getElementById( 'clientQuote' ).innerHTML = "<em>'" + quotes[ randomNumber ] + '\'</em>' + quoters[ randomNumber ];
}

function correctPNGBackground( divId, src ) // correctly handle PNG transparency in Win IE 5.5 , 6 & 7.
{
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
	{
		var div = document.getElementById( divId );
		div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";
		div.style.background = '';
	}    
}

var largeImageBox;
var showImageBoxOnLoad = false;

function initLargeImage() {
	// Initialize the temporary Panel to display while waiting for external content to load
	document.getElementById( 'largeImagePopup' ).style.display = '';
	correctPNGBackground('largeImagePopupBackground','/custom/images/large-image-bg.png');
	largeImageBox = new YAHOO.widget.Panel("largeImagePopup",  
											{ width:"637px", 
											  height:"487px", 
											  fixedcenter:true, 
											  close:false, 
											  draggable:false, 
											  modal:true,
											  visible:false,
											  underlay:"none",
											  effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.5} 
											} 
										);

	largeImageBox.render(document.body);
	
	if( showImageBoxOnLoad )
		largeImageBox.show();

}

function showLargeImage(imgSrc, productName) 
{
document.getElementById('largeProductImagePhoto').src = imgSrc;
document.getElementById('largeProductImageName').innerHTML = productName;
document.getElementById('largeProductImagePhoto').style.display = '';
// Show the Panel
if(typeof largeImageBox != "undefined" ) largeImageBox.show();	
else showImageBoxOnLoad = true
}

function hideLargeImage() {
	// Hide the Panel
	if( typeof largeImageBox != "undefined" ) {
		document.getElementById( 'largeProductImagePhoto' ).style.display = 'none';
		document.getElementById( 'largeProductImagePhoto' ).src = '/custom/images/loading.gif';
		largeImageBox.hide();
	}
}

function writeEmail( account, txt ) {
	if ( typeof txt == 'undefined' ) {
		txt = account + '@' + 'ec' + 'offins' + '.co' + '.uk';
	}
	document.write( '<a h' + 'ref' + '\="mai' + 'lto:' + account + '@' + 'ec' + 'offins' + '.co' + '.uk">' + txt + '</a>' );
}
