

// JavaScript data & functions for http://www.helenabroome.com/


	var ScreenWidth  = 752;
	var ScreenHeight = 500;


	var	active_tab_id = 'welcome';
//	var	active_tab_id = 'cards';


//	var tab_id_array = new Array( 'welcome', 'cards',    'order',   'about',   'aboutms' );
//	var tab_id_array = new Array( 'welcome', 'cards',   'order',    'about',  'aboutms' );

	var tab_id_array = new Array( 'welcome', 'cards',   'cards2',	'order',    'about',  'aboutms' );


//	var tab_bc_array = new Array( '#ffeedd', '#ffeeaa', '#ddeeff', '#00ffaa', '#eeffbb', '#ffffbb' );
//	var tab_bc_array = new Array( '#ffffbb', '#ffeeaa', '#00ffaa', '#eeffbb', '#ffeedd' );

//	var tab_bc_array = new Array( '#ffffbb', '#ffeeaa', '#aaeeff', '#00ffaa', '#eeffbb', '#ffeedd' );
//	var tab_bc_array = new Array( '#ffffbb', '#ffeeaa', '#ddeeff', '#00ffaa', '#eeffbb', '#ffeedd' );
	var tab_bc_array = new Array( '#ffffbb', '#ffeeaa', '#ffeeaa', '#00ffaa', '#eeffbb', '#ffeedd' );


//	var active_tab_font_weight 		= '900';
	var active_tab_font_weight 		= '500';
	var inactive_tab_font_weight	= '500';


	var cr = '%0d%0a';
	var pr = cr + cr;


// Orders

	var order_array = new Array();

	var delivery_address = 'uk';			// default

	var uk_free_postage_limit	= 10;		// Postage free after order worth this much

	var uk_postage_rate			= 1.5;		// Up to the limit for free postage

	var overseas_postage_rate_for	= 10;	// Pounds worth of cards
	var overseas_postage_rate		= 2;	// Costs this much



// For floating window

	var use_floating_window = 0;

	var floating_window_width	= 0;
	var floating_window_height	= 0;

	var floating_window_ox;
	var floating_window_oy;

	var floating_window_timeout = 50;


// For popup window

	var use_popup_window = 0;

	var popup_window_width	= 0;
	var popup_window_height	= 0;

	var popup_window_ox;
	var popup_window_oy;



// For cards tab

	var card_objects_array = new Array();
	var card_objects_array2 = new Array();

	// The display area represents this size:

	var area_width	= 21;	// inches
	var area_height	= 17;	// inches

	// Force width to be "ScreenWidth" pixels, and work out the height based on the display area proportions

	var display_width	= ScreenWidth;
	var display_height	= Math.round( ( display_width * area_height ) / area_width );


	// Zoom timeout & increment

	var zoom_increment	= 0.05;
	var zoom_timeout	= 100;




//-------------------------------------------------------------------------------------------------------------------------

function init()

//-------------------------------------------------------------------------------------------------------------------------

// Called by window.onload event

//-------------------------------------------------------------------------------------------------------------------------
{
	// *** CURRENTLY TEST ONLY ***

	which_browser();


	// Set Window Size

//	alert( document.domain );

//	alert( window.name );

//	var gww = get_window_width();
//	alert( gww );



	// TESTING function preserve( name, value )

//	preserve( 'tab_id', active_tab_id );
//	preserve( 'order_array', 'orders(nyd)' );

//	{
//		var value = retrieve( 'tab_id' );
//		alert( 'value = ' + value );
//	}

//	{
//		var value = retrieve( 'order_array' );
//		alert( 'value = ' + value );
//	}


	// Retrieve the order_array

	retrieve_order_array();
	update_order_tab_content();


	// Show Tabs

//	initial_show_tabs();


	// Make sure the order tab has the correct values

	delivery_address = retrieve( 'delivery_address' );

	if( !delivery_address )
	{
		delivery_address = 'uk';
	}

	if( delivery_address == 'uk' )
	{
		document.forms.deliveryaddressform.deliveryaddressoptions.selectedIndex = 0;
	}

	if( delivery_address == 'overseas' )
	{
		document.forms.deliveryaddressform.deliveryaddressoptions.selectedIndex = 1;
	}

	//alert( 'Saved Delivery Address = ' + delivery_address );

	update_order_tab_content();



	// Block right-clicks on elements with image tags

	document.oncontextmenu = blockEvents;




	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING
	// TESTING IMG TAGS MODIFICATION AFTER DOCUMENT LOADING

	var my_imgs = document.getElementsByTagName( 'img' );

//	var estr = '';

	for( var ix=0; ix < my_imgs.length; ix ++ )
	{
		var my_tag = my_imgs[ ix ];

//		estr += ix.toString() + ': ';
//		estr += my_tag.src;
//		estr += '(';
//		estr += my_tag.name;
//		estr += ')';
//		estr += '\n';


//		// VERY CRUDE TEST!!!
//		var img_id = my_tag.id;
//		if( img_id )
//		{
//			if( img_id.indexOf( 'JPG' ) > 0 )
//			{
//				my_tag.src = my_tag.id;
//			}
//			if( img_id.indexOf( 'jpg' ) > 0 )
//			{
//				my_tag.src = my_tag.id;
//			}
//		}


		// VERY CRUDE TEST No. 2!!!

		var img_name = my_tag.name;

		if( img_name )
		{
			if( img_name.indexOf( 'JPG' ) > 0 )
			{
				my_tag.src = my_tag.name;
			}

			if( img_name.indexOf( 'jpg' ) > 0 )
			{
				my_tag.src = my_tag.name;
			}

			if( img_name.indexOf( 'gif' ) > 0 )
			{
				my_tag.src = my_tag.name;
			}
		}



	}

//	alert( estr );



	//---------------
	// Mouse Position
	//---------------

	if( browser != "IE" )
	{
		document.addEventListener( "mousemove", getMouseXY, true )
	}

	document.onmousemove=getMouseXY;



	// Show Tabs

	initial_show_tabs();

}


function set_initial_window_size()
{
	try
	{
		window.resizeTo( 782, window.screen.availHeight );
	}

	catch( e )
	{
		// ignore this problem
	}
}


function initial_show_tabs()
{
	// Show default tab setting unless window.name has a value

	var retrieved_active_tab_id = retrieve( 'tab_id' );

	if( retrieved_active_tab_id )
	{
		// WARNING! Does not check for a valid tab ID!!!

		show_tabs( retrieved_active_tab_id );
	}

	else
	{
		show_tabs( active_tab_id );
	}
}




function blockEvents( evt )
{
    evt = (evt) ? evt : event;

    var blockit = false;

    var elem = (evt.target) ? evt.target : ((evt.srcElement) ? 
        evt.srcElement : null);

    if (elem && elem.tagName && elem.tagName.toLowerCase( ) == "img") {
        if (evt.cancelBubble) {
            evt.cancelBubble = true;
        }
        alert( "Option Not Available" );
        return false;
    }
}

//-------------------------------------------------------------------------------------------------------------------------

function show_tabs( new_active_tab_id )

//-------------------------------------------------------------------------------------------------------------------------

// Set & Preserve active tab (optional), then show tabs (updates display)

//-------------------------------------------------------------------------------------------------------------------------
{
	if( new_active_tab_id )
	{
		active_tab_id = new_active_tab_id;

		preserve( 'tab_id', active_tab_id );
	}


	for( var i=0; i < tab_id_array.length; i ++ )
	{
		var tab_id = tab_id_array[ i ];

		if( tab_id == active_tab_id )
		{
			document.getElementById( tab_id ).style.fontWeight			= active_tab_font_weight;
			document.getElementById( tab_id ).bgColor					= tab_bc_array[ i ];

			document.getElementById( tab_id + '0' ).style.display		= 'block';
			document.getElementById( tab_id + '0' ).bgColor				= tab_bc_array[ i ];
			document.getElementById( tab_id + '1' ).style.display		= 'block';
			document.getElementById( tab_id + '1' ).bgColor				= tab_bc_array[ i ];

			var tid = tab_id + 'content';
			var tido = document.getElementById( tid );


			//alert( "active tid = " + tid + ", tido = " + tido );


			if( tido )
			{
				document.getElementById( tid ).style.display				= 'block';
				document.getElementById( tid ).bgColor						= tab_bc_array[ i ];
			}
		}

		else
		{
			document.getElementById( tab_id ).style.fontWeight			= inactive_tab_font_weight;
			document.getElementById( tab_id ).bgColor					= '#ffffff';

			document.getElementById( tab_id + '0' ).style.display		= 'block';
			document.getElementById( tab_id + '0' ).bgColor				= '#ffffff';
			document.getElementById( tab_id + '1' ).style.display		= 'block';
			document.getElementById( tab_id + '1' ).bgColor				= '#ffffff';

			var tid = tab_id + 'content';
			var tido = document.getElementById( tid );


			//alert( "inactive tid = " + tid + ", tido = " + tido );


			if( tido )
			{
				document.getElementById( tab_id + 'content' ).style.display	= 'none';
				document.getElementById( tab_id + 'content' ).bgColor		= '#ffffff';
			}
		}
	}



//	// TEST
//	{
//		var id = "tabs";
//		var x = document.getElementById( id ).style.left;
//		var y = document.getElementById( id ).style.top;
//		alert( "Absolute Position of Element " + id + " is ( " + x + ", " + y + " )" );
//	}


}
//-------------------------------------------------------------------------------------------------------------------------

function create_cards()

//-------------------------------------------------------------------------------------------------------------------------

// Create card objects for the cards tab

//-------------------------------------------------------------------------------------------------------------------------
{
	//--------------------------
	//
	// Cards - First Set - 2006
	//
	//--------------------------


	var i = 0;


	{
		var card = new Object();

		card.name			= 'The Cheese Board';
		card.img			= 'che_b.jpg';
		card.letter			= 'A';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Pansies';
		card.img			= 'pan_b.jpg';
		card.letter			= 'C';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
		card.offsety0		= 4.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Strawberries';
		card.img			= 'str_b.jpg';
		card.letter			= 'B';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
		card.offsety0		= 8.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Signs of Spring';
		card.img			= 'sos_b.jpg';
		card.letter			= 'D';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
		card.offsety0		= 12.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Ravello on the Amalfi Coast';
		card.img			= 'rav_b.jpg';
		card.letter			= 'E';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Portrait';

		card.width			= 4.125;
		card.height			= 5.875;

		card.offsetx0		= 8.5;	// inches
		card.offsety0		= 5.0;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'The Egyptian Pot';
		card.img			= 'pot_b.jpg';
		card.letter			= 'F';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Portrait';

		card.width			= 4.125;
		card.height			= 5.875;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 9.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Tarte Aux Fruits';
		card.img			= 'trt_b.jpg';
		card.letter			= 'I';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 5.0;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Tea And Roses';
		card.img			= 'tea_b.jpg';
		card.letter			= 'J';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Reflections In Silver';
		card.img			= 'ref_b.jpg';
		card.letter			= 'G';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 7.5;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Summer Reflections';
		card.img			= 'sum_b.jpg';
		card.letter			= 'H';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 7.5;	// inches
		card.offsety0		= 11.25;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;


		card.show			= show_card;


		card_objects_array[ i ++ ] = card;
	}



	//--------------------------
	//
	// Cards - Second Set - 2008
	//
	//--------------------------

	var i = 0;

	{
		var card = new Object();

		card.name			= 'Peaches';
		card.img			= 'Peaches.jpg';
		card.letter			= 'K';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Fishing Boats';
		card.img			= 'Boats.jpg';
		card.letter			= 'L';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
	//	card.offsety0		= 4.5;	// inches
		card.offsety0		= 4.25;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'A Good Read';
		card.img			= 'Books.jpg';
		card.letter			= 'M';
		card.index			= i;

		card.size			= 'A7';
		card.pageformat		= 'Landscape';

		card.width			= 4.125;
		card.height			= 2.875;

		card.offsetx0		= 15;	// inches
	//	card.offsety0		= 8.5;	// inches
		card.offsety0		= 7.75;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 0.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Red Grapes and Blue Cheese';
		card.img			= 'Grapes.jpg';
		card.letter			= 'N';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

	//	card.offsetx0		= 15;	// inches
	//	card.offsety0		= 12.5;	// inches

		card.offsetx0		= 14.0;		// inches
		card.offsety0		= 11.25;	// inches

		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Shades of Autumn';
		card.img			= 'Autumn.jpg';
		card.letter			= 'O';
		card.index			= i;

		card.size			= '7x5';
		card.pageformat		= 'Portrait';

		card.width			= 4.125;
		card.height			= 5.875;

		card.offsetx0		= 8.5;	// inches
		card.offsety0		= 5.0;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Tuscan Olive';
		card.img			= 'Olive.jpg';
		card.letter			= 'P';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Portrait';

		card.width			= 4.125;
		card.height			= 5.875;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 9.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Hope Chest';
		card.img			= 'Chest.jpg';
		card.letter			= 'Q';
		card.index			= i;

		card.size			= '7x5';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 5.0;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Eggs in a Basket';
		card.img			= 'Eggs.jpg';
		card.letter			= 'R';
		card.index			= i;

		card.size			= '7x5';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 0.5;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}

	{
		var card = new Object();

		card.name			= 'Wareham Quay';
		card.img			= 'Wareham.jpg';
		card.letter			= 'S';
		card.index			= i;

		card.size			= '7x5';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

		card.offsetx0		= 7.5;	// inches
		card.offsety0		= 0.5;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.75;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}


	{
		var card = new Object();

		card.name			= 'Cornish Kitchen';
		card.img			= 'Cornish.jpg';
		card.letter			= 'T';
		card.index			= i;

		card.size			= 'A6';
		card.pageformat		= 'Landscape';

		card.width			= 5.875;
		card.height			= 4.125;

	//	card.offsetx0		= 7.5;	// inches
		card.offsetx0		= 6.75;	// inches

		card.offsety0		= 11.25;	// inches
		card.z0				= 10;

		card.offsetx1		= 7;	// inches
		card.offsety1		= 4;	// inches
		card.z1				= 100;

		card.scale0			= 1;
		card.scale1			= 3;

		card.a				= 0;
		card.a_new			= 0;
		card.d				= 0;

		card.price			= 1.25;

		card.show			= show_card;

		card_objects_array2[ i ++ ] = card;
	}


	// Initialise order array

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		order_array[ i ] = 0;
	}


	// Initialise order array

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		order_array[ i + card_objects_array.length ] = 0;
	}


}


// Draws HTML for cards using initial positions and sizes.

// Call this function ONCE only as it uses document.write().

function draw_cards()
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];


		// Size of card in pixels

		var card_w_px = ( card.width  * display_width  ) / area_width;
		var card_h_px = ( card.height * display_height ) / area_height;

		// Offset of card in pixels

		var card_o_x = ( card.offsetx0 * display_width  ) / area_width;
		var card_o_y = ( card.offsety0 * display_height ) / area_height;


		// Image

		var w = Math.round( card_w_px );
		var h = Math.round( card_h_px );

		var x = Math.round( card_o_x );
		var y = Math.round( card_o_y );

		var z = card.z0;

//		var t = "\"" + card.name + "\" (" + card.size + ", " + card.pageformat + ")";


		var div_id = 'div_' + card.letter;
		var img_id = 'img_' + card.letter;


		var div = "<div id='" + div_id + "' style='cursor:pointer;cursor:hand; position:absolute; visibility:visible; top:" + y + "px; left:" + x + "px; z-index:" + z + "'>";
		document.write( div );

		var img_url = card.img;


		//var img = "<img id='" + img_id + "' src='" + img_url + "' width=" + w + " height=" + h + " border=0 title='" + t + "' onClick=\"zoom_card('" + card.letter + "')\">";

////		var img = "<img id='" + img_id + "' src='" + img_url + "' width=" + w + " height=" + h + " border=0 onClick=\"zoom_card('" + card.letter + "')\">";

//		var img = "<img class='cardborderstyle' id='" + img_id + "' src='" + img_url + "' width=" + w + " height=" + h + " onClick=\"zoom_card('" + card.letter + "')\">";
		var img = "<img class='cardborderstyle' id='" + img_id + "' src='white1x1.jpg' name='" + img_url + "' width=" + w + " height=" + h + " onClick=\"zoom_card('" + card.letter + "')\">";


		document.write( img );

		document.write( "</div>" );


		// Description for zoomed view

		var desc_id = 'desc_' + card.letter;

		var desc_div = "<div id='" + desc_id + "' style='display:none; position:absolute; visibility:visible; top:" + 425 + "px; left:" + 0 + "px; z-index:" + z + "'>";
		document.write( desc_div );

		document.write( '<table border=0 cellpadding=4 cellspacing=0 width=100% height=25%><tr><td>' );



		document.write( "<p align=center valign=middle class='pd1'><big>" + card.name + '</big></p>' );

		document.write( "<p align=center valign=middle class='pd1'>Size " + card.size + ', Format "' + card.pageformat + '"</p>' );



		document.write( "<table align=center border=0 cellpadding=0 cellspacing=0><tr>" );

		document.write( "<td align=center valign=middle>Price &#160;<big>&#163;" + card.price + '&#160;&#160;&#160;</big></td>' );

		var order_form = "<input style='font-size:20px' type='submit' name='' value='Add To Email Order' onClick=\"add_card_to_order('" + card.index + "'); update_order_tab_content(); show_tabs( 'order' )\">";

		document.write( "<td align=center valign=middle>" + order_form + "</td>" );

		document.write( "</tr></table>" );



		document.write ( "<p align=center valign=middle class='legend' style='cursor:pointer;cursor:hand' align=center valign=top onClick=\"zoom_card('" + card.letter + "')\">Click <i>Here</i> To View All The Cards</p>" );


		document.write( '</td></tr></table>' );


	//	alert( "got here - card.name = " + card.name );


		document.write( "</div>" );
	}


	{
		var div = "<div id='clickanycard' style='position:absolute; visibility:visible; top:575px; left:0px; z-index:0'>";
		document.write( div );

		document.write( "<table width=100% align=center border=0 cellpadding=0 cellspacing=0><tr>" );

		document.write ( "<td align=center valign=middle class='legend'>Click On Any Card To Find Out More</td>" );

		document.write( '</tr></table>' );

		document.write( "</div>" );
	}

}



function draw_cards2()
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];


	//	alert( "card = " + card );



		// Size of card in pixels

		var card_w_px = ( card.width  * display_width  ) / area_width;
		var card_h_px = ( card.height * display_height ) / area_height;

		// Offset of card in pixels

		var card_o_x = ( card.offsetx0 * display_width  ) / area_width;
		var card_o_y = ( card.offsety0 * display_height ) / area_height;


		// Image

		var w = Math.round( card_w_px );
		var h = Math.round( card_h_px );

		var x = Math.round( card_o_x );
		var y = Math.round( card_o_y );

		var z = card.z0;

//		var t = "\"" + card.name + "\" (" + card.size + ", " + card.pageformat + ")";


		var div_id = 'div_' + card.letter;
		var img_id = 'img_' + card.letter;


		var div = "<div id='" + div_id + "' style='cursor:pointer;cursor:hand; position:absolute; visibility:visible; top:" + y + "px; left:" + x + "px; z-index:" + z + "'>";
		document.write( div );

		var img_url = card.img;

		var img = "<img class='cardborderstyle' id='" + img_id + "' src='white1x1.jpg' name='" + img_url + "' width=" + w + " height=" + h + " onClick=\"zoom_card2('" + card.letter + "')\">";


		document.write( img );

		document.write( "</div>" );


		// Description for zoomed view

		var desc_id = 'desc_' + card.letter;

		var desc_div = "<div id='" + desc_id + "' style='display:none; position:absolute; visibility:visible; top:" + 425 + "px; left:" + 0 + "px; z-index:" + z + "'>";
		document.write( desc_div );

		document.write( '<table border=0 cellpadding=4 cellspacing=0 width=100% height=25%><tr><td>' );



		document.write( "<p align=center valign=middle class='pd1'><big>" + card.name + '</big></p>' );

		document.write( "<p align=center valign=middle class='pd1'>Size " + card.size + ', Format "' + card.pageformat + '"</p>' );



		document.write( "<table align=center border=0 cellpadding=0 cellspacing=0><tr>" );

		document.write( "<td align=center valign=middle>Price &#160;<big>&#163;" + card.price + '&#160;&#160;&#160;</big></td>' );

		var order_form = "<input style='font-size:20px' type='submit' name='' value='Add To Email Order' onClick=\"add_card_to_order2('" + card.index + "'); update_order_tab_content(); show_tabs( 'order' )\">";

		document.write( "<td align=center valign=middle>" + order_form + "</td>" );

		document.write( "</tr></table>" );



		document.write ( "<p align=center valign=middle class='legend' style='cursor:pointer;cursor:hand' align=center valign=top onClick=\"zoom_card2('" + card.letter + "')\">Click <i>Here</i> To View All The Cards</p>" );


		document.write( '</td></tr></table>' );


	//	alert( "got here - card.name = " + card.name );


		if( card.name == 'Hope Chest' )
		{
			var bgcol = tab_bc_array[2];

			document.write( "<table style='background-color:" + bgcol + "' border=0 cellpadding=0 cellspacing=0 width=752><tr><td>" );
			document.write( "<table border=0 cellpadding=4 cellspacing=4><tr><td>" );

			document.write( '<p><b>About This Card</b><br>' );
			document.write( 'The owner of "Hope Chest" was asked to write a short piece about the image.</p>' );
			document.write( "<p id='HopeChestClick'>Click <span style='cursor:pointer;cursor:hand' onclick=document.getElementById('HopeChestMore').style.display='block';document.getElementById('HopeChestClick').style.display='none'><i><b>here</b></i></span> if you would like to see what he wrote...</p>" );

			document.write( "<div id='HopeChestMore' style='display:none'>" );
			var ma = HopeChestMore; for( var mx=0; mx < ma.length; mx ++ ) { var h = ma[mx]; document.write( h ); }
			document.write( "</div>" );

			document.write( '<p>&#160;<br>&#160;<br>&#160;<br>&#160;<br></p>' );

			document.write( '</td></tr></table>' );
			document.write( '</td></tr></table>' );
		}




		document.write( "</div>" );
	}



	{
		var div = "<div id='clickanycard' style='position:absolute; visibility:visible; top:575px; left:0px; z-index:0'>";

		document.write( div );

		document.write( "<table width=100% align=center border=0 cellpadding=0 cellspacing=0><tr>" );

		document.write ( "<td align=center valign=middle class='legend'>Click On Any Card To Find Out More</td>" );

		document.write( '</tr></table>' );

		document.write( "</div>" );
	}



	//alert( "got here" );
}



// Updates position, size and other attributes of card images.

// Calls itself every so often until no further card image updates are required.

function show_cards()
{
	var still_updating = 0;

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		if( card.show )
		{
			still_updating += card.show();
		}
	}


	if( still_updating )
	{
		setTimeout( "show_cards()", zoom_timeout );
	}


	// If any cards are at alpha=1, hide the others

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		if( card.a == 1 )
		{
			hide_unzoomed_cards( card.letter );

			show_zoomed_card_description( card.letter );

			document.getElementById( 'clickanycard' ).style.visibility = 'hidden';

			break;
		}
	}
}


function show_cards2()
{
	var still_updating = 0;

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		if( card.show )
		{
			still_updating += card.show();
		}
	}


	if( still_updating )
	{
		setTimeout( "show_cards2()", zoom_timeout );
	}


	// If any cards are at alpha=1, hide the others

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		if( card.a == 1 )
		{
			hide_unzoomed_cards2( card.letter );

			show_zoomed_card2_description( card.letter );

			document.getElementById( 'clickanycard' ).style.visibility = 'hidden';

			break;
		}
	}
}





// Show AND UPDATE The Card
//
// Look at the current alpha value, the required alpha, and update the alpha.
//
// If the card still requires updating afterwards, return 1, else return 0.
//
// Alpha is used to:
//
// * SCALE the width and height.
// * INTERPOLATE between two (x, y) screen positions (in inches).


function show_card()
{
	// Alpha chaser

	if( this.a == this.a_new )
	{
		return( 0 );
	}

	else
	{
		if( this.a > this.a_new )
		{
			this.a -= zoom_increment;	if( this.a < 0 ) { this.a = 0; }
		}

		if( this.a < this.a_new )
		{
			this.a += zoom_increment;	if( this.a > 1 ) { this.a = 1; }
		}
	}


	// Alpha & Onema

	var alpha = this.a;
	var onema = 1 - alpha;


	// Size of card in pixels

	var card_width_px  = ( this.width  * display_width  ) / area_width;
	var card_height_px = ( this.height * display_height ) / area_height;

	var card_w_px0 = Math.round( this.scale0 * card_width_px );
	var card_h_px0 = Math.round( this.scale0 * card_height_px );


// trying all cards zoomed to fit a certain height - scale is no longer required

//	var card_w_px1 = Math.round( this.scale1 * card_width_px );
//	var card_h_px1 = Math.round( this.scale1 * card_height_px );

	var card_h_px1 = Math.round( 0.65 * display_height );
	var card_w_px1 = Math.round( card_h_px1 * ( this.width / this.height ) );

//	alert( 'display is ' + display_width + ' x ' + display_height );


	var card_w_px = Math.round( ( card_w_px0 * onema ) + ( card_w_px1 * alpha ) );
	var card_h_px = Math.round( ( card_h_px0 * onema ) + ( card_h_px1 * alpha ) );


	// Offset of card in pixels

	var card_o_x0 = ( this.offsetx0 * display_width  ) / area_width;
	var card_o_y0 = ( this.offsety0 * display_height ) / area_height;

// trying all cards' zoomed offsets at n inches below display top, horizontally centered

//	var card_o_x1 = ( this.offsetx1 * display_width  ) / area_width;
//	var card_o_y1 = ( this.offsety1 * display_height ) / area_height;

	var offsetx1 = Math.round( ( display_width / 2 ) - ( card_w_px1 / 2 ) );
	var offsety1 = ( 0.5 * display_height ) / area_height;

	var card_o_x1 = offsetx1;
	var card_o_y1 = offsety1;


	// Interpolate

	var card_o_x = Math.round( ( card_o_x0 * onema ) + ( card_o_x1 * alpha ) );
	var card_o_y = Math.round( ( card_o_y0 * onema ) + ( card_o_y1 * alpha ) );


	// Image Attributes

	var w = Math.round( card_w_px );
	var h = Math.round( card_h_px );

	var x = Math.round( card_o_x );
	var y = Math.round( card_o_y );

	var z = Math.round( ( this.z0 * onema ) + ( this.z1 * alpha ) );


	// ID of <div> and <img>

	var div_id = 'div_' + this.letter;
	var img_id = 'img_' + this.letter;


	// Update <div> for position

	var div = document.getElementById( div_id );

	div.style.left = x + "px";
	div.style.top  = y + "px";

	div.style.zIndex = z;


	// Update <img> for dimensions

	var img = document.getElementById( img_id );

	img.width	= w;
	img.height	= h;


	//alert( div + "\n" + img );

	return( 1 );
}


function zoom_card( id )
{
	// Find the card with the matching ID (card.letter)

	var card;

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card1 = card_objects_array[ i ];

		if( card1.letter == id )
		{
			card = card1;
		}
	}


//	alert( 'zoom card requested' );

	if( card )
	{
		if( card.a_new == 0 )
		{
			card.a_new = 1;

			// Make sure all other cards are unzooming if we are zooming
			// (the other cards are not hidden until this card reaches full zoom)

			unzoom_unzoomed_cards( id );
		}

		else
		{
			card.a_new = 0;

			// Make sure all cards are visible once we start unzooming

			show_unzoomed_cards( id );

			// Hide any descriptions

			hide_all_card_descriptions();


			// Show the "Click Any Card" message

			document.getElementById( 'clickanycard' ).style.visibility = 'visible';
		}

		show_cards();
	}

}




function zoom_card2( id )
{
	// Find the card with the matching ID (card.letter)

	var card;

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card1 = card_objects_array2[ i ];

		if( card1.letter == id )
		{
			card = card1;
		}
	}


//	alert( 'zoom card requested' );

	if( card )
	{
		if( card.a_new == 0 )
		{
			card.a_new = 1;

			// Make sure all other cards are unzooming if we are zooming
			// (the other cards are not hidden until this card reaches full zoom)

			unzoom_unzoomed_cards2( id );
		}

		else
		{
			card.a_new = 0;

			// Make sure all cards are visible once we start unzooming

			show_unzoomed_cards2( id );

			// Hide any descriptions

			hide_all_card2_descriptions();


			// Show the "Click Any Card" message

			document.getElementById( 'clickanycard' ).style.visibility = 'visible';
		}

		show_cards2();
	}

}




function unzoom_all_cards()
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];


		// Zoom to 0

//		card.a		= 0;
		card.a_new	= 0;


		// Visible

		// ID of <div>
		// Update <div> style visibility

		var div_id = 'div_' + card.letter;
		var div = document.getElementById( div_id );

		div.style.visibility = 'visible';


		// Description display: none

		// ID of <div>
		// Update <div> style display

		var desc_id = 'desc_' + card.letter;

		var desc_div = document.getElementById( desc_id );

		desc_div.style.display = 'none';
	}
}



function unzoom_all_cards2()
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];


		// Zoom to 0

//		card.a		= 0;
		card.a_new	= 0;


		// Visible

		// ID of <div>
		// Update <div> style visibility

		var div_id = 'div_' + card.letter;
		var div = document.getElementById( div_id );

		div.style.visibility = 'visible';


		// Description display: none

		// ID of <div>
		// Update <div> style display

		var desc_id = 'desc_' + card.letter;

		var desc_div = document.getElementById( desc_id );

		desc_div.style.display = 'none';
	}
}



function hide_unzoomed_cards( id )
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		// ID of <div>

		var div_id = 'div_' + card.letter;


		// Update <div> style visibility

		var div = document.getElementById( div_id );


		//alert( 'div id = ' + div_id );


		if( card.letter == id )
		{
			div.style.visibility = 'visible';
			div.title = 'Return To View The Other Cards';
		}

		else
		{
			div.style.visibility = 'hidden';
		}
	}
}




function hide_unzoomed_cards2( id )
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		// ID of <div>

		var div_id = 'div_' + card.letter;


		// Update <div> style visibility

		var div = document.getElementById( div_id );


		//alert( 'div id = ' + div_id );


		if( card.letter == id )
		{
			div.style.visibility = 'visible';
			div.title = 'Return To View The Other Cards';
		}

		else
		{
			div.style.visibility = 'hidden';
		}
	}
}




function unzoom_unzoomed_cards( id )
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];


		if( card.letter == id )
		{
			// Leave (it should be zooming)
		}

		else
		{
			card.a_new = 0;
		}
	}
}



function unzoom_unzoomed_cards2( id )
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];


		if( card.letter == id )
		{
			// Leave (it should be zooming)
		}

		else
		{
			card.a_new = 0;
		}
	}
}





function show_unzoomed_cards( id )
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		// ID of <div>

		var div_id = 'div_' + card.letter;


		// Update <div> style visibility

		var div = document.getElementById( div_id );


		//alert( 'div id = ' + div_id );


		if( card.letter == id )
		{
			div.style.visibility = 'visible';
			div.title = '';
		}

		else
		{
			div.style.visibility = 'visible';
			div.title = '';
		}
	}
}



function show_unzoomed_cards2( id )
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		// ID of <div>

		var div_id = 'div_' + card.letter;


		// Update <div> style visibility

		var div = document.getElementById( div_id );


		//alert( 'div id = ' + div_id );


		if( card.letter == id )
		{
			div.style.visibility = 'visible';
			div.title = '';
		}

		else
		{
			div.style.visibility = 'visible';
			div.title = '';
		}
	}
}







function show_zoomed_card_description( id )
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		// ID of <div>

		var desc_id = 'desc_' + card.letter;


		// Update <div> style display

		var div = document.getElementById( desc_id );


		if( card.letter == id )
		{
			div.style.display = 'block';

			break;
		}

	}
}



function show_zoomed_card2_description( id )
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		// ID of <div>

		var desc_id = 'desc_' + card.letter;


		// Update <div> style display

		var div = document.getElementById( desc_id );


		if( card.letter == id )
		{
			div.style.display = 'block';

			break;
		}

	}
}



function hide_all_card_descriptions()
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		// ID of <div>

		var desc_id = 'desc_' + card.letter;


		// Update <div> style display

		var div = document.getElementById( desc_id );

		div.style.display = 'none';
	}
}



function hide_all_card2_descriptions()
{
	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		// ID of <div>

		var desc_id = 'desc_' + card.letter;


		// Update <div> style display

		var div = document.getElementById( desc_id );

		div.style.display = 'none';
	}
}




//--------------------------------------------------------------------------
//
// This function is used by the "Welcome" page to display the range of cards
//
//--------------------------------------------------------------------------

function draw_card_range()
{
	document.write( '<table align=center valign=middle border=0 cellpadding=0 cellspacing=0></tr>' );

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		var img_url	= card.img;
		var img_w	= card.width;
		var img_h	= card.height;

		if( card.size == 'A6' )		{ img_w *= 12; img_h *= 12; }
		if( card.size == 'A7' )		{ img_w *= 17; img_h *= 17; }
		if( card.size == '7x5' )	{ img_w *= 12; img_h *= 12; }

		var img = "<img src='white1x1.jpg' name='" + img_url + "' width=" + img_w + " height=" + img_h + " border=0 onClick=\"unzoom_all_cards(); zoom_card('" + card.letter + "'); show_tabs( 'cards' )\" style='cursor:help'>";

		document.write( "<td width=70 align=center valign=middle>" + img + "</td>"  );
	}

	document.write( '</tr></table>' );
}


function draw_card_range2()
{
	document.write( '<table align=center valign=middle border=0 cellpadding=0 cellspacing=0></tr>' );

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		var img_url	= card.img;
		var img_w	= card.width;
		var img_h	= card.height;

		if( card.size == 'A6' )		{ img_w *= 12; img_h *= 12; }
		if( card.size == 'A7' )		{ img_w *= 17; img_h *= 17; }
		if( card.size == '7x5' )	{ img_w *= 12; img_h *= 12; }

		var img = "<img src='white1x1.jpg' name='" + img_url + "' width=" + img_w + " height=" + img_h + " border=0 onClick=\"unzoom_all_cards2(); zoom_card2('" + card.letter + "'); show_tabs( 'cards2' )\" style='cursor:help'>";

		var tdw = img_w * 1.25;

	//	document.write( "<td width=70 align=center valign=middle>" + img + "</td>"  );
		document.write( "<td width=" + tdw + " align=center valign=middle>" + img + "</td>"  );
	}

	document.write( '</tr></table>' );
}




// Used by the Welcome page, this function displays current card postage prices

function draw_prices_and_postage_for_welcome_page()
{
	var p_sc_txt = '&#163;' + currency_to_string( get_card_price( 'A7' ) );
	var p_mc_txt = '&#163;' + currency_to_string( get_card_price( 'A6' ) );
	var p_lc_txt = '&#163;' + currency_to_string( get_card_price( '7x5' ) );

	document.write( '<p align=center valign=top>' );
	document.write( '<i>Small (A7) Cards are just ' + p_sc_txt + ' each</i><br>' );
	document.write( '<i>Medium (A6) Cards are only ' + p_mc_txt + ' each</i><br>' );
	document.write( '<i>Large (7x5) Cards cost ' + p_lc_txt + ' each</i><br>' );
	document.write( '</p>' );

	var fppuk_txt = '&#163;' + uk_free_postage_limit;

	var ppuk_txt = '&#163;' + currency_to_string( uk_postage_rate );

	var ppos_txt = '&#163;' + currency_to_string( overseas_postage_rate );
	var ospk_txt = '&#163;' + overseas_postage_rate_for;

	document.write( '<p align=center valign=top>' );

	document.write( '<big>For UK orders of more than ' + fppuk_txt + ', postage is free</big><br>' );

	document.write( '<i>For all other UK orders, postage is ' + ppuk_txt + '</i><br>' );

	document.write( '<small><i>For international orders, postage is ' + ppos_txt + ' for every ' + ospk_txt + ' worth of cards</i></small>' );

	document.write( '</p>' );
}



function draw_prices_and_postage_for_order_page()
{
	var fppuk_txt = '&#163;' + uk_free_postage_limit;

	var ppuk_txt = '&#163;' + currency_to_string( uk_postage_rate );

	var ppos_txt = '&#163;' + currency_to_string( overseas_postage_rate );
	var ospk_txt = '&#163;' + overseas_postage_rate_for;

	document.write( '<p align=center valign=top>' );

	document.write( 'For UK orders of more than ' + fppuk_txt + ', postage is free<br>' );

	document.write( '<i>For all other UK orders, postage is ' + ppuk_txt + '</i><br>' );

	document.write( '<small><i>For international orders, postage is ' + ppos_txt + ' for every ' + ospk_txt + ' worth of cards</i></small>' );

	document.write( '</p>' );
}


// Pass a card size, e.g. 'A7' and the price of a card of this size will be returned

function get_card_price( size )
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		if( card.size == size )
		{
			return( card.price );
		}
	}

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		if( card.size == size )
		{
			return( card.price );
		}
	}

	return( 0 );
}


function draw_card_value()
{
	var a = new Array( '<', 'a hr', 'ef=','mai', 'lto:', 'in', 'fo&#64;h', 'elen', 'abro', 'ome.', 'com?subject=An%20Enquiry%20For%20Helena%20Broome', '><span style="color:blue">', 'in', 'fo&#64;h', 'elen', 'abro', 'ome.', 'com</span>', '</', 'a>' );
	var s = a.join( '' );

	document.write( "<p align=center valign=middle style='color:gray'>" );

	document.write( "<small>For all enqui" + "ries please send an em" );
	document.write( "ail to " + s + '</small>' );

	document.write( "</p>" );
}


//---------------------------
//
// Order Tab Content & Update
//
//---------------------------

// Draws HTML for order tab content

// Call this function ONCE only as it uses document.write().

function draw_order_tab_content()
{

//	var bgc = '#ffffff';

//	var bgc = '#00ffaa';
//	var bgc = '#aaffaa';
	var bgc = '#ccffbb';

	var bgcp = '#ffddcc';

	var bgc1 = '#cceeff';
	var bgc2 = '#cceeff';



	//------------
	//
	// Order Table
	//
	//------------

//	document.write( "<p align=center valign=middle><br>" );
//	document.write( "</p>" );


	document.write( '<table align=center valign=middle border=0 cellpadding=1 cellspacing=1 width=100%>' );

	document.write( "<tr height=12>"  );
	document.write( "<td height=12 style='background-color:" + bgc + "' align=left valign=middle>&#160;&#160;<b>Card</b>&#160;</td>"  );


	var a_title_js;
	{
		var title_text	= '<div style=\\\'background-color:#ffffaa\\\'><p align=center valign=middle>Click Top <span style=\\\'background-color:white;font-family:monospace;font-weight:900\\\'>&#160;+&#160;</span> To <i>Add</i> A Set Of <b>All</b> 20 Cards.</p><p align=center valign=middle>Click <span style=\\\'background-color:white;font-family:monospace;\\\'>&#160;+&#160;</span> By Each Card To Add Just <b>One</b>.</p></div>';
		a_title_js	= 'onMouseOver="set_floating_window_content(\'' + title_text + '\',128,64,-280,20+get_scroll_top()); show_floating_window()" onMouseOut="hide_floating_window()"';
	}
//	document.write( "<td " + a_title_js + " onClick=\"add_all_cards_to_order(); update_order_tab_content()\" style='background-color:white; font-family:monospace; cursor:pointer;cursor:hand' align=center valign=middle>&#160;<b><big>+</big></b>&#160;</td>" );
	document.write( "<td width=45 height=12 " + a_title_js + " onClick=\"add_all_cards_to_order(); update_order_tab_content()\" style='background-color:white; font-family:monospace; cursor:help' align=center valign=middle>&#160;<b><big>+</big></b>&#160;</td>" );

	var r_title_js;
	{
		var title_text	= '<div style=\\\'background-color:#aaffff\\\'><p align=center valign=middle>Click Top <span style=\\\'background-color:white;font-family:monospace;font-weight:900\\\'>&#160;-&#160;</span> To <i>Remove</i> A Set Of <b>All</b> 20 Cards.</p><p align=center valign=middle>Click <span style=\\\'background-color:white;font-family:monospace;\\\'>&#160;-&#160;</span> By Each Card To Remove Just <b>One</b>.</p></div>';
		r_title_js	= 'onMouseOver="set_floating_window_content(\'' + title_text + '\',128,64,-280,20+get_scroll_top()); show_floating_window()" onMouseOut="hide_floating_window()"';
	}
//	document.write( "<td " + r_title_js + " onClick=\"sub_all_cards_to_order(); update_order_tab_content()\" style='background-color:white; font-family:monospace; cursor:pointer;cursor:hand' align=center valign=middle>&#160;<b><big>-</big></b>&#160;</td>" );
	document.write( "<td width=45 height=12 " + r_title_js + " onClick=\"sub_all_cards_to_order(); update_order_tab_content()\" style='background-color:white; font-family:monospace; cursor:help' align=center valign=bottom>&#160;<b><big>-</big></b>&#160;</td>" );



	document.write( "<td height=12 style='background-color:" + bgc + "' align=right valign=middle>&#160;<b>Quantity</b>&#160;</td>"  );
	document.write( "<td height=12 style='background-color:" + bgc + "' align=right valign=middle>&#160;<b>Price (&#163;)&#160;</b></td>"  );
	document.write( "<td height=12 style='background-color:" + bgc + "' align=right valign=middle>&#160;<b>Cost (&#163;)&#160;</b></td>"  );
	document.write( "</tr>"  );

	// Vertical Padding
	document.write( "<tr><td style='font-size:6px'>&#160;</td></tr>"  );

	//---------------
	//
	// Cards 1 - 2006
	//
	//---------------

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		var card = card_objects_array[ i ];

		document.write( "<tr>"  );

		document.write( "<td style='background-color:" + bgc + "'>"  );
		document.write( '<table align=left valign=middle border=0 cellpadding=1 cellspacing=0></tr>' );

		var img_url	= card.img;
		var img_w	= card.width;
		var img_h	= card.height;

	//	if( card.size == 'A6' )		{ img_w *= 12; img_h *= 12; }
	//	if( card.size == 'A7' )		{ img_w *= 17; img_h *= 17; }
	//	if( card.size == '7x5' )	{ img_w *= 12; img_h *= 12; }

		if( card.size == 'A6' )		{ img_w *= 12 / 1.5; img_h *= 12 / 1.5; }
		if( card.size == 'A7' )		{ img_w *= 17 / 1.5; img_h *= 17 / 1.5; }
		if( card.size == '7x5' )	{ img_w *= 12 / 1.5; img_h *= 12 / 1.5; }

		var img = "<img src='white1x1.jpg' name='" + img_url + "' width=" + img_w + " height=" + img_h + " border=0 onClick=\"unzoom_all_cards(); zoom_card('" + card.letter + "'); show_tabs( 'cards' )\" style='cursor:pointer;cursor:hand'>";

		document.write( "<td width=60 align=center valign=middle>" + img + "</td>"  );
		document.write( "<td align=left valign=middle id='ordercard" + card.index + "'>" + card.name + "</td>"  );

		document.write( "</tr></table>"  );
		document.write( "</td>"  );

		document.write( "<td onClick=\"add_card_to_order('" + card.index + "'); update_order_tab_content()\" style='background-color:" + bgc + "' align=center valign=middle><span style='font-family:monospace;background-color:white;cursor:pointer;cursor:hand;'><b>&#160;+&#160;</b></span></td>"  );
		document.write( "<td onClick=\"sub_card_to_order('" + card.index + "'); update_order_tab_content()\" style='background-color:" + bgc + "' align=center valign=middle><span style='font-family:monospace;background-color:white;cursor:pointer;cursor:hand;'><b>&#160;-&#160;</b></span></td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='orderquantity" + card.index + "'>" + order_array[ card.index ] + "&#160;</td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='orderprice" + card.index + "'>" + card.price + "&#160;</td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='ordercost" + card.index + "'>" + order_array[ card.index ] * card.price + "&#160;</td>"  );

		document.write( "</tr>"  );
	}


	// Vertical Padding
	document.write( "<tr><td style='font-size:6px'>&#160;</td></tr>"  );


	//---------------
	//
	// Cards 2 - 2008
	//
	//---------------

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		var card = card_objects_array2[ i ];

		document.write( "<tr>"  );

		document.write( "<td style='background-color:" + bgc + "'>"  );
		document.write( '<table align=left valign=middle border=0 cellpadding=1 cellspacing=0></tr>' );

		var img_url	= card.img;
		var img_w	= card.width;
		var img_h	= card.height;

	//	if( card.size == 'A6' )		{ img_w *= 12; img_h *= 12; }
	//	if( card.size == 'A7' )		{ img_w *= 17; img_h *= 17; }
	//	if( card.size == '7x5' )	{ img_w *= 12; img_h *= 12; }

		if( card.size == 'A6' )		{ img_w *= 12 / 1.5; img_h *= 12 / 1.5; }
		if( card.size == 'A7' )		{ img_w *= 17 / 1.5; img_h *= 17 / 1.5; }
		if( card.size == '7x5' )	{ img_w *= 12 / 1.5; img_h *= 12 / 1.5; }

		var img = "<img src='white1x1.jpg' name='" + img_url + "' width=" + img_w + " height=" + img_h + " border=0 onClick=\"unzoom_all_cards2(); zoom_card2('" + card.letter + "'); show_tabs( 'cards2' )\" style='cursor:pointer;cursor:hand'>";

		var card_index = card.index + card_objects_array.length;

		document.write( "<td width=60 align=center valign=middle>" + img + "</td>"  );
		document.write( "<td align=left valign=middle id='ordercard" + card_index + "'>" + card.name + "</td>"  );

		document.write( "</tr></table>"  );
		document.write( "</td>"  );

		document.write( "<td onClick=\"add_card_to_order2('" + card.index + "'); update_order_tab_content()\" style='background-color:" + bgc + "' align=center valign=middle><span style='font-family:monospace;background-color:white;cursor:pointer;cursor:hand;'><b>&#160;+&#160;</b></span></td>"  );
		document.write( "<td onClick=\"sub_card_to_order2('" + card.index + "'); update_order_tab_content()\" style='background-color:" + bgc + "' align=center valign=middle><span style='font-family:monospace;background-color:white;cursor:pointer;cursor:hand;'><b>&#160;-&#160;</b></span></td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='orderquantity" + card_index + "'>" + order_array[ card_index ] + "&#160;</td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='orderprice" + card_index + "'>" + card.price + "&#160;</td>"  );

		document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='ordercost" + card_index + "'>" + order_array[ card_index ] * card.price + "&#160;</td>"  );

		document.write( "</tr>"  );
	}



	// Vertical Padding
	document.write( "<tr><td style='font-size:6px'>&#160;</td></tr>"  );


	document.write( "<tr>"  );

	document.write( "<td style='font-size:20px;font-weight:900' align=right valign=middle><i>My Delivery Address Is...</i>&#160;</td>"  );

	document.write( "<td colspan=3 align=left valign=middle>"  );

	document.write( "<form style='margin-bottom:0' id='deliveryaddressform'>" );
	document.write( "<select id='deliveryaddressoptions' style='font-size:20px;font-weight:900' onChange='delivery_address=this.options[selectedIndex].value;preserve( \"delivery_address\", delivery_address );update_order_tab_content()'>" );

	if( delivery_address == 'uk' )
		document.write( "<option selected value='uk'>Inside The UK</option>"  );
	else
		document.write( "<option value='uk'>Inside The UK</option>"  );

	if( delivery_address == 'overseas' )
		document.write( "<option selected value='overseas'>International</option>"  );
	else
		document.write( "<option value='overseas'>International</option>"  );

	document.write( "</select>"  );
	document.write( "</form>"  );

//	alert( delivery_address );

	document.write( "</td>"  );


	document.write( "<td style='background-color:" + bgc1 + "' align=right valign=middle>Postage Cost&#160;</td>" );
	document.write( "<td style='background-color:" + bgc1 + "' align=right valign=middle id='orderpostagetotal'>0.00&#160;</td>" );


	document.write( "</tr>"  );



	document.write( "<tr>"  );

	document.write( "<td colspan=4>&#160;</td>"  );
	document.write( "<td style='background-color:" + bgc + "' align=right valign=middle><b>Total Cost</b>&#160;</td>" );
	document.write( "<td style='background-color:" + bgc + "' align=right valign=middle id='orderpricetotal'><big><b>&#163;0.00</b></big></td>" );

	document.write( "</tr>"  );


	document.write( '</table>' );



	//--------------
	//
	// About Postage
	//
	//--------------

	draw_prices_and_postage_for_order_page();



	//----------------------
	//
	// Textarea & Email Form
	//
	//----------------------

	document.write( '<p></p>' );

	document.write( '<table align=center valign=middle border=0 cellpadding=4 cellspacing=4 width=100%>' );


//	document.write( "<tr>" );
//	document.write( "<td>" );
//	document.write( "<span style='font-size:6px'>&#160;</span>" );
//	document.write( "</td>" );
//	document.write( "</tr>" );


	//----------------------
	// How To Order By Email
	//----------------------

	document.write( "<tr>" );
	document.write( "<td style='padding:7px;background-color:" + bgc + "' align=center valign=middle>" );

	document.write( "<b>How To Order By Email</b>" );

	document.write( "<p align=left>" );
	document.write( "This Web site is <b>not</b> able to offer you" );
//	document.write( " the option of buying Helena's cards online in the same way that many other sites do." );
	document.write( " the option of buying Helena's cards online.<br>" );

//	document.write( "</p>" );
//	document.write( "<p align=left>" );

	document.write( " <i>You <b>can</b> order by email, however, and below there are two options for doing this:</i>" );
	document.write( "</p>" );

	document.write( "</td>" );
	document.write( "</tr>" );


	document.write( "<tr>" );
	document.write( "<td>" );
	document.write( "<span style='font-size:6px'>&#160;</span>" );
	document.write( "</td>" );
	document.write( "</tr>" );

	//---------
	//
	// Textarea
	//
	//---------

	document.write( "<tr>" );
	document.write( "<td style='padding:8px;background-color:" + bgc1 + "' align=center valign=middle>" );

	document.write( "<p align=left valign=middle>" );
	document.write( "<b>Option 1</b>&#160;<br> When you have finished making your selection, check the order table above to make sure you have added everything you require, then copy the text in the white box below into your email program." );
	document.write( " <i>The text in this box is updated every time you change your order, and will contain an exact copy of the table above.</i>" );
	document.write( "</p>" );

	document.write( "</td>" );
	document.write( "</tr>" );

	document.write( "<tr>" );
	document.write( "<td id='orderemailtextareatablecell' align=center valign=middle>" );
	document.write( "</td>" );
	document.write( "</tr>" );

	//-----------
	// Email Form
	//-----------

	document.write( "<tr>" );
	document.write( "<td style='padding:8px;background-color:" + bgc2 + "' align=left valign=middle>" );

	document.write( "<p align=left valign=middle>" );
	document.write( "<b>Option 2</b>&#160; <br>Click on the button below. If your email program is configured" );
	document.write( " to respond to 'mailto' tags, this should work (and save you a little time)." );
	document.write( "</p>" );

	document.write( "<p align=left valign=middle>" );
	document.write( " <i>However, please note the following:</i>" );
	document.write( "<ul>" );
	document.write( "<li>Not all Web browsers are set up to work with this option. <i>If the button does not work, try <b>Option 1</b>, above</i>.</li><br><br>" );
	document.write( "<li>The Web browser may warn you about \"your email address being revealed to the recipient\". Do not be alarmed! It is <b><i>our</i></b> email address being revealed, <b>not</b> yours <i>(and we don't mind you sending us an email with your order!)</i></li><br><br>" );
	document.write( "<li>The email launched by your browser may not use <span style='font-family:courier;font-weight:900'>\"plain text\"</span>, and so may look a little jumbled. <i>This will <b>not</b> cause a problem.</i></li>" );
	document.write( "</ul>" );
	document.write( "</p>" );

	document.write( "</td>" );
	document.write( "</tr>" );

	document.write( "<tr><td align=center valign=middle id='orderemailform'>" );
	document.write( "</td></tr>" );




	document.write( "<tr>" );
	document.write( "<td>" );
	document.write( "<span style='font-size:6px'>&#160;</span>" );
	document.write( "</td>" );
	document.write( "</tr>" );




	//-----------
	// How To Pay
	//-----------

	document.write( "<tr>" );
	document.write( "<td style='padding:7px;background-color:" + bgcp + "' align=left valign=middle>" );

	document.write( "<p align=center>" );
	document.write( "<b>How To Pay</b>" );
	document.write( "</p>" );

	var ppe_array = new Array( 'paym', 'ents&#64;h', 'elen', 'abro', 'ome.', 'com' );
	var ppe_string = '<input style=\'font-size:20px;text-align:center\' readonly size=28 value="' + ppe_array.join( '' ) + '">';

	var cpa_array = new Array( 'He', 'lena B', 'ro', 'ome<br>1', ' Sch', 'ool', ' Lan', 'e <br>Win', 'fri', 'th N', 'ewbur', 'gh<br>D', 'ORS', 'ET<br>D', 'T2 8', 'JT<br>En', 'gla', 'nd, U', 'K' );
	var cpa_string = cpa_array.join( '' );


	document.write( "<p align=left>" );
	document.write( "<i>There are two accepted methods of payment:</i>" );
	document.write( "<ul>" );
	document.write( "<li><b>By Cheque</b> (Sterling Only)<br>Please make a cheque out to \"Helena Broome\" for <span id='amount4cheque'>&#163;0.00</span> and send it to:<br><br><span style='color:purple'>" + cpa_string + "</span><br><br><i>If ordering by email, please write the name and address on the back of the cheque so that we can link your cheque with your order. Otherwise we are happy to receive your order on paper, with your cheque, in the post.</i></li>" );
	document.write( "<p style='padding:2px'></p>" );
	document.write( "<li><b>By PayPal</b><br>Please use PayPal to make a payment of <span id='amount4paypal'>&#163;0.00</span> to:<br><br><b style='color:blue'>" + ppe_string + "</b><br><br><i>Make sure that <b>your</b> PayPal email address appears <b>clearly</b> in your email.</i></li>" );
	document.write( "</ul>" );
	document.write( "</p>" );

	draw_card_value();


	document.write( "</td>" );
	document.write( "</tr>" );




	document.write( '</table>' );


}


function add_card_to_order( i )
{

//	alert( 'add_card_to_order: ' + i );

	if( i < 0 || i > card_objects_array.length )
	{
		return;
	}


	var card = card_objects_array[ i ];

	if( card )
	{
		order_array[ i ] ++;
	}


	preserve_order_array();
}

function add_card_to_order2( i )
{

	//alert( 'add_card_to_order2: i = ' + i );


	if( i < 0 || i > card_objects_array2.length )
	{
		return;
	}


	var card = card_objects_array2[ i ];

	var card_index = parseInt(i) + parseInt(card_objects_array.length);


	//alert( 'add_card_to_order2: card_index = ' + card_index );


	if( card )
	{
		order_array[ card_index ] ++;
	}


	preserve_order_array();
}





// Add one each of ALL cards to order

function add_all_cards_to_order()
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		// Card

		var card = card_objects_array[ i ];

		order_array[ i ] ++;
	}

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		// Card

		var card = card_objects_array[ i ];

		var card_index = parseInt(i) + parseInt(card_objects_array.length);

		order_array[ card_index ] ++;
	}

	preserve_order_array();
}


function sub_card_to_order( i )
{

//	alert( 'sub_card_to_order: ' + i );

	if( i < 0 || i > card_objects_array.length )
	{
		return;
	}

	var card = card_objects_array[ i ];

	if( card )
	{
		order_array[ i ] --;

		if( order_array[ i ] < 0 )
		{
			order_array[ i ] = 0;
		}
	}

	preserve_order_array();
}

function sub_card_to_order2( i )
{

//	alert( 'sub_card_to_order2: ' + i );

	if( i < 0 || i > card_objects_array2.length )
	{
		return;
	}

	var card = card_objects_array2[ i ];

	var card_index = parseInt(i) + parseInt(card_objects_array.length);

	if( card )
	{
		order_array[ card_index ] --;

		if( order_array[ card_index ] < 0 )
		{
			order_array[ card_index ] = 0;
		}
	}

	preserve_order_array();
}


// Sub one each of ALL cards to order

function sub_all_cards_to_order()
{
	for( var i=0; i < card_objects_array.length; i ++ )
	{
		// Card

		var card = card_objects_array[ i ];

		order_array[ i ] --;

		if( order_array[ i ] < 0 )
		{
			order_array[ i ] = 0;
		}
	}

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		// Card

		var card = card_objects_array2[ i ];

		var card_index = parseInt(i) + parseInt(card_objects_array.length);

		order_array[ card_index ] --;

		if( order_array[ card_index ] < 0 )
		{
			order_array[ card_index ] = 0;
		}
	}

	preserve_order_array();
}




// Note the use of innerHTML to set the content within the table elements

function update_order_tab_content()
{

	//-------------
	//
	// Order Table
	//
	//-------------

	var total = 0;

	//---------------
	// Cards 1 - 2006
	//---------------

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		// Card

		var card = card_objects_array[ i ];

		// Fields to update

		var quantity_id	= 'orderquantity'	+ card.index;
		var cost_id		= 'ordercost'		+ card.index;

		var q = order_array[ card.index ];
		var c = q * card.price;

		var qtxt = q.toString();

		var ctxt = currency_to_string( c );


		// Bold for non-zero quantities

		if( q > 0 )
		{
			ctxt = '<b>' + ctxt + '</b>';
			qtxt = '<b>' + qtxt + '</b>';
		}

		ctxt += '&#160;';
		qtxt += '&#160;';


		document.getElementById( quantity_id ).innerHTML	= qtxt;
		document.getElementById( cost_id ).innerHTML		= ctxt;

		total += c;
	}

	//---------------
	// Cards 2 - 2008
	//---------------

	for( var i=0; i < card_objects_array2.length; i ++ )
	{
		// Card

		var card = card_objects_array2[ i ];

		var card_index = parseInt(i) + parseInt(card_objects_array.length);

		// Fields to update

		var quantity_id	= 'orderquantity'	+ card_index;
		var cost_id		= 'ordercost'		+ card_index;

		var q = order_array[ card_index ];
		var c = q * card.price;

		var qtxt = q.toString();

		var ctxt = currency_to_string( c );


		// Bold for non-zero quantities

		if( q > 0 )
		{
			ctxt = '<b>' + ctxt + '</b>';
			qtxt = '<b>' + qtxt + '</b>';
		}

		ctxt += '&#160;';
		qtxt += '&#160;';


		document.getElementById( quantity_id ).innerHTML	= qtxt;
		document.getElementById( cost_id ).innerHTML		= ctxt;

		total += c;
	}




	//-------------
	// Postage Cost
	//-------------

	var postage = get_postage( total );


	// Then add the cost of postage

	total += postage;


	// As String

	var ptxt = currency_to_string( postage );


	// Update HTML

	document.getElementById( 'orderpostagetotal' ).innerHTML = ptxt + '&#160;';




	//-----------
	// Total Cost
	//-----------

	var ttxt = currency_to_string( total );

	// Update HTML

	document.getElementById( 'orderpricetotal' ).innerHTML	= '<big><b>&#163;' + ttxt + '</b></big>&#160;';

	document.getElementById( 'amount4cheque' ).innerHTML	= '<b>&#163;' + ttxt + '</b>';
	document.getElementById( 'amount4paypal' ).innerHTML	= '<b>&#163;' + ttxt + '</b>';





	//------------
	//
	// Email Order
	//
	//------------

	var cr = '\n';
	var pr = '\n\n';
	var tb = String.fromCharCode( 9 );

	var sterling = '&#163;';


	var ecr = '%0d%0a';
	var epr = ecr + ecr;
	var etb = '%09';


	//---------------
	// Subject & Body
	//---------------

	var subject = 'An Order For Cards';

	var order_rows_textarea;
	var order_rows_email;

	{
		var rows = new Array();
		var erows = new Array();

		var rows_ix = 0;
		var erows_ix = 0;


		// Max. card name length

		var card_name_maxlen = 0;


		// Cards 1 - 2006

		for( var i=0; i < card_objects_array.length; i ++ )
		{
			var card = card_objects_array[ i ];

			var cn = card.name;

			var nl = cn.length;

			if( nl > card_name_maxlen )
			{
				card_name_maxlen = nl;
			}
		}


		// Cards 2 - 2008

		for( var i=0; i < card_objects_array2.length; i ++ )
		{
			var card = card_objects_array2[ i ];

			var cn = card.name;

			var nl = cn.length;

			if( nl > card_name_maxlen )
			{
				card_name_maxlen = nl;
			}
		}



//		alert( card_name_maxlen );


		// Order Table Titles

		var titles = 'Card' + tb + tb + tb + tb + tb + 'Quantity' + tb + 'Price(' + sterling + ')' + tb + 'Cost(' + sterling + ')';
		rows[ rows_ix ++ ] = titles;

		var etitles = 'Card' + etb + etb + etb + etb + 'Quantity' + etb + etb + 'Price' + etb + etb + 'Cost';
		erows[ erows_ix ++ ] = etitles;


		rows[ rows_ix ++ ]		= '----------------------------------------------------------';
		erows[ erows_ix ++ ]	= '------------------------------------------------------------------------';


		//-----------------
		// Order Table Rows
		//-----------------

		var total = 0;


		// Cards 1 - 2006

		for( var i=0; i < card_objects_array.length; i ++ )
		{
			var card = card_objects_array[ i ];

			var p = card.price;

			var q = order_array[ card.index ];
			var c = q * p;

			total += c;

			var qtxt = q.toString();

			var ctxt = currency_to_string( c );
			var ptxt = currency_to_string( p );


			// Card Name (padded to fixed length)

			var card_name = card.name;

			var num_padding_spaces = card_name_maxlen - card_name.length;

			if( num_padding_spaces )
			{
				for( var s=0; s < num_padding_spaces; s ++ )
				{
					card_name += ' ';
				}
			}


			// The row			

			var row = card_name + tb + qtxt + tb + tb + ptxt + tb + tb + ctxt;
			rows[ rows_ix ++ ] = row;

			var erow = card_name + etb + qtxt + etb + etb + ptxt + etb + etb + ctxt;
			erows[ erows_ix ++ ] = erow;
		}


		// Cards 2 - 2008

		for( var i=0; i < card_objects_array2.length; i ++ )
		{
			var card = card_objects_array2[ i ];

			var p = card.price;


			var card_index = card.index + card_objects_array.length;
			
			var q = order_array[ card_index ];


			var c = q * p;

			total += c;

			var qtxt = q.toString();

			var ctxt = currency_to_string( c );
			var ptxt = currency_to_string( p );


			// Card Name (padded to fixed length)

			var card_name = card.name;

			var num_padding_spaces = card_name_maxlen - card_name.length;

			if( num_padding_spaces )
			{
				for( var s=0; s < num_padding_spaces; s ++ )
				{
					card_name += ' ';
				}
			}


			// The row			

			var row = card_name + tb + qtxt + tb + tb + ptxt + tb + tb + ctxt;
			rows[ rows_ix ++ ] = row;

			var erow = card_name + etb + qtxt + etb + etb + ptxt + etb + etb + ctxt;
			erows[ erows_ix ++ ] = erow;
		}


		//-------------
		// Postage Cost
		//-------------

		var postage = get_postage( total );


		// Postage as STRING

		var dtxt = currency_to_string( postage );


		// Then add the cost of postage

		total += postage;


		//-----------
		// Total Cost
		//-----------

		var ttxt = currency_to_string( total );


		rows[ rows_ix ++ ] = '';
		erows[ erows_ix ++ ] = '';

		rows[ rows_ix ++ ]		= tb + tb + 'Total Cost (inc. postage ' + sterling + dtxt + '): ' + tb + sterling + ttxt;
		erows[ erows_ix ++ ]	= etb + etb + etb + 'Total Cost (inc. postage ' + dtxt + '):' + etb + ttxt + ' Pounds Sterling';


		order_rows_textarea	= rows.join( cr );
		order_rows_email	= erows.join( ecr );
	}


	var ba_textarea	= new Array();
	{
		var ba_ix = 0;

		ba_textarea[ ba_ix ++ ] = '*** COPY AND PASTE THE FOLLOWING TEXT INTO YOUR EMAIL ***';
		ba_textarea[ ba_ix ++ ] = pr;
		ba_textarea[ ba_ix ++ ] = "Dear Helena," + pr;
		ba_textarea[ ba_ix ++ ] = "Please send me the following order:" + pr;
		ba_textarea[ ba_ix ++ ] = order_rows_textarea;
		ba_textarea[ ba_ix ++ ] = pr;
		ba_textarea[ ba_ix ++ ] = 'The address to send the order to is:';
		ba_textarea[ ba_ix ++ ] = pr;
		ba_textarea[ ba_ix ++ ] = '*** INSERT THE DELIVERY ADDRESS HERE ***';
		ba_textarea[ ba_ix ++ ] = pr;
		ba_textarea[ ba_ix ++ ] = '*** IF REQUIRED, WRITE YOUR PAYPAL EMAIL ADDRESS HERE ***';
		ba_textarea[ ba_ix ++ ] = pr;
		ba_textarea[ ba_ix ++ ] = 'Remember that if you are paying with PayPal,' + cr;
		ba_textarea[ ba_ix ++ ] = 'we cannot know that you have paid' + cr;
		ba_textarea[ ba_ix ++ ] = 'unless we know your PayPal email address.';
		ba_textarea[ ba_ix ++ ] = pr;

		var e_array = new Array( 'orde', 'rs&#64;h', 'elen', 'abro', 'ome.', 'com' );
		var e_string = e_array.join( '' );

		ba_textarea[ ba_ix ++ ] = '*** SEND THE EMAIL TO: ' + e_string + ' ***';


	}
	var body_textarea = ba_textarea.join( '' );


	var ba_email	= new Array();
	{
		var ba_ix = 0;

		ba_email[ ba_ix ++ ] = "Dear Helena," + epr;
		ba_email[ ba_ix ++ ] = "Please send me the following order:" + epr;
		ba_email[ ba_ix ++ ] = order_rows_email;
		ba_email[ ba_ix ++ ] = epr;
		ba_email[ ba_ix ++ ] = 'The address to send the order to is:';
		ba_email[ ba_ix ++ ] = epr;
		ba_email[ ba_ix ++ ] = '*** INSERT THE DELIVERY ADDRESS HERE ***';
		ba_email[ ba_ix ++ ] = epr;
		ba_email[ ba_ix ++ ] = '*** IF REQUIRED, WRITE YOUR PAYPAL EMAIL ADDRESS HERE ***';
		ba_email[ ba_ix ++ ] = epr;
		ba_email[ ba_ix ++ ] = 'Remember that if you are paying with PayPal,' + ecr;
		ba_email[ ba_ix ++ ] = 'we cannot know that you have paid' + ecr;
		ba_email[ ba_ix ++ ] = 'unless we know your PayPal email address.';
		ba_email[ ba_ix ++ ] = epr;
	}
	var body_email = ba_email.join( '' );




//	alert( body );


	//-----------
	// <textarea>
	//-----------

	// We must write out the whole <textarea></textarea> tag because otherwise the carriage returns are ignored (???)

//	var body_table_cell = "<textarea readonly style='font-size:18px;font-weight:900' name='' cols='64' rows='33' id='orderemailtextarea'>" + body_textarea + "</textarea>";
	var body_table_cell = "<textarea readonly style='font-size:18px;font-weight:900' name='' cols='64' rows='43' id='orderemailtextarea'>" + body_textarea + "</textarea>";

	document.getElementById( 'orderemailtextareatablecell' ).innerHTML = body_table_cell;


	//-----------
	// Email Form
	//-----------

	// NOTE: this may not work!!!

	{
		var e_array = new Array( 'mai', 'lto:', 'orde', 'rs&#64;h', 'elen', 'abro', 'ome.', 'com' );
		var e_string = e_array.join( '' );
		var email_form0 = "<form style='margin-bottom:0' action='" + e_string + "?subject=" + subject + "&body=" + body_email + "&a=b' method='post' enctype='text/plain'>";


		var input = "<input name='' value='Send Me An Email Containing This Order' type='submit' style='font-size:24px'>";


		var email_form1 = '</form>';

		var email_table_cell = email_form0 + input + email_form1;

		document.getElementById( 'orderemailform' ).innerHTML = email_table_cell;
	}


}


// The order array is preserved between refreshes, but require preprocessing prior to preservation and retrieval

function preserve_order_array()
{
	var oa_string = order_array.join( ',' );

	preserve( 'order_array', oa_string );
}

function retrieve_order_array()
{
	// Is there a string stored for the order_array?

	var oa_string = retrieve( 'order_array' );


//	alert( 'retrieving order_array, string: ' + oa_string );


	// If there is, convert it back into an array

	if( oa_string )
	{
		order_array = oa_string.split( ',' );
	}
}




// Returns the total cost of cards and postage

function get_total_cost()
{
	//--------------------
	// Total Cost of Cards
	//--------------------

	var total = 0;

	for( var i=0; i < card_objects_array.length; i ++ )
	{
		// Card

		var card = card_objects_array[ i ];

		var q = order_array[ card.index ];
		var c = q * card.price;

		total += c;
	}

	//-------------
	// Postage Cost
	//-------------

	var postage = get_postage( total );


	// Then add the cost of postage

	total += postage;


	return( total );
}






// Returns the cost of postage based on the total cost of cards

function get_postage( total )
{
	// First ask if there any cards in the order!

	var postage = 0;

	if( total )
	{
		if( delivery_address == 'uk' )
		{
			if( total < uk_free_postage_limit )
			{
				postage = uk_postage_rate;
			}
		}

		else
		{
			var packs;
//			var p0 = Math.floor( ( total / overseas_postage_rate_for ) );
			var p1 = Math.floor( ( total / overseas_postage_rate_for ) + 0.99 );

//			if( p0 < p1 )	{ packs = p0; }
//			else			{ packs = p1; }

			packs = p1;

			if( packs < 1 ) { packs = 1; }

//			alert( total + ', ' + overseas_postage_rate_for + ', ' + packs + ', ' + p0 + ', ' + p1 )
//			alert( total + ', ' + overseas_postage_rate_for + ', ' + packs + ', ' + p1 )


			postage = overseas_postage_rate * packs;
		}
	}

	return( postage );
}




//----------------
//
// Floating Window
//
//----------------

// Requires: HTML, Width, Height (of HTML content), Offset X, Offset Y (from mouse position)

function set_floating_window_content( html, w, h, ox, oy )
{
	document.getElementById( 'floatingwindowcontent' ).innerHTML = html;

	if( w == 0 || w == null ) { w = ScreenWidth  / 2; }
	if( h == 0 || h == null ) { h = ScreenHeight / 2; }

	floating_window_width	= w;
	floating_window_height	= h;

	if( ox == 0 || ox == null ) { ox = 16; }
	if( oy == 0 || oy == null ) { oy = 16; }

	floating_window_ox = ox;
	floating_window_oy = oy;
}

function update_floating_window()
{
	// Desired offset

	var x = gMouseX + floating_window_ox;
	var y = gMouseY + floating_window_oy;

	var ww = get_window_width();
	var wh = get_window_height();

//	alert( x + ', ' + y + ', ' + ww + ', ' + wh + ', ' + floating_window_width + ', ' + floating_window_height );


	// Nudged onto the screen

	if( ( x + floating_window_width ) > ww )
	{
		x = ww - floating_window_width;

		if( x < 0 ) { x = 0; }
	}

	if( ( y + floating_window_height ) > wh )
	{
		y = wh - floating_window_height;

		if( y < 0 ) { y = 0; }
	}


	document.getElementById( 'floatingwindow' ).style.left	= x;
	document.getElementById( 'floatingwindow' ).style.top	= y;

	if( use_floating_window )
	{
		setTimeout( "update_floating_window()", floating_window_timeout );
	}
}

function show_floating_window()
{
	update_floating_window();

	document.getElementById( 'floatingwindow' ).style.visibility = 'visible';

	use_floating_window = 1;

	setTimeout( "update_floating_window()", floating_window_timeout );
}

function hide_floating_window()
{
	document.getElementById( 'floatingwindow' ).style.visibility = 'hidden';

	use_floating_window = 0;
}



//--------------
//
// Pop-Up Window
//
//--------------

// Requires: HTML, Width, Height (of HTML content), Offset X, Offset Y (from mouse position)

function set_popup_window_content( html, w, h, ox, oy )
{
	document.getElementById( 'popupwindowcontent' ).innerHTML = html;

	if( w == 0 || w == null ) { w = ScreenWidth  / 2; }
	if( h == 0 || h == null ) { h = ScreenHeight / 2; }

	popup_window_width	= w;
	popup_window_height	= h;

	if( ox == 0 || ox == null ) { ox = 16; }
	if( oy == 0 || oy == null ) { oy = 16; }

	popup_window_ox = ox;
	popup_window_oy = oy;


	// Desired offset

//var x = mouse_x + floating_window_ox;
//var y = mouse_y + floating_window_oy;

	var x = popup_window_ox;
	var y = popup_window_oy;

	var ww = get_window_width();
	var wh = get_window_height();

//	alert( x + ', ' + y + ', ' + ww + ', ' + wh + ', ' + popup_window_width + ', ' + popup_window_height );


	// Nudged onto the screen

	if( ( x + popup_window_width ) > ww )
	{
		x = ww - popup_window_width;

		if( x < 0 ) { x = 0; }
	}

	if( ( y + popup_window_height ) > wh )
	{
		y = wh - popup_window_height;

		if( y < 0 ) { y = 0; }
	}


	var st = get_scroll_top();

//	alert( st );

	y += st;



	document.getElementById( 'popupwindow' ).style.left	= x;
	document.getElementById( 'popupwindow' ).style.top	= y;
}

function show_popup_window()
{
	document.getElementById( 'popupwindow' ).style.visibility = 'visible';

	use_popup_window = 1;
}

function hide_popup_window()
{
	document.getElementById( 'popupwindow' ).style.visibility = 'hidden';

	use_popup_window = 0;
}

//---------------------------------
//
// Mouse Position, Window Size Etc.
//
//---------------------------------

var gMouseX = 0;
var gMouseY = 0;

//-------------------------------------------------------------------------------------------------------------------------

function getMouseXY(e)
{
	var tempX = 0;
	var tempY = 0;

	// grab the x-y pos.s if browser is IE

	if( browser == "IE" )
	{
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	}

	// grab the x-y pos.s if browser is NS

	else
	{
		tempX = e.pageX;
		tempY = e.pageY;
	}  

	if( tempX < 0 ) {tempX = 0; }
	if( tempY < 0 ) {tempY = 0; }  

	gMouseX = tempX;
	gMouseY = tempY;

	return true;
}
//-------------------------------------------------------------------------------------------------------------------------


/*

function record_mouse_xy()
{
	mouse_x = window.event.x;
	mouse_y = window.event.y;
}

*/


function get_window_width()
{
//	alert( 'document.body.clientWidth = ' + document.body.clientWidth );

	if( document.body.clientWidth )
	{
		return( document.body.clientWidth );
	}

	if( window.innerWidth )
	{
		return( window.innerWidth );
	}
}

// HACK

function get_window_height()
{
//	alert( 'window.screen.availHeight = ' + window.screen.availHeight );

//	if( document.body.clientHeight )
	if( window.screen.availHeight )
	{
//		return( document.body.clientHeight );
		return( window.screen.availHeight - 128 );
	}

//	alert( 'window.innerHeight = ' + window.innerHeight );

	if( window.innerHeight )
	{
		return( window.innerHeight );
	}
}


function get_scroll_top()
{
	var ScrollTop = document.body.scrollTop;

 	if (ScrollTop == 0)
	{
	    if (window.pageYOffset)
	        ScrollTop = window.pageYOffset;
    	else
	        ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
	}

	return( ScrollTop );
}




// Convert Currency to STRING

function currency_to_string( amt )
{
	var txt = amt.toString();

	// If string has penultimate point, add '0'

	if( txt.substr( txt.length - 2, 1 ) == '.' )
	{
		txt += '0';
	}

	// If string does not have a point, add '.00'

	if( txt.indexOf( '.' ) == -1 )
	{
		txt += '.00';
	}

	return( txt );
}


//---------------------------------------
//
// Preservation Of Data Between Refreshes
//
//---------------------------------------

// Call this function to preserve a value between refreshes.
//
// The name AND value MUST be ASCII strings.


function preserve( name, value )
{
	// Retrieve the stored string that persists between refreshes

	var stored_string = window.name;


//	alert( 'stored_string: ' + stored_string );


	var names  = new Array();
	var values = new Array();

	var found_name = 0;
	var name_index = 0;

	var i = 0;


	// If we have a stored string, search for the name

	if( stored_string )
	{
		// Split the stored string into name-value strings

		var nvs_array = stored_string.split( '&' );


//		alert( 'nvs_array length: ' + nvs_array.length );


		for( i=0; i < nvs_array.length; i ++ )
		{
			// Split the name-value string into a name string and a value string

			var nv_string = nvs_array[ i ];


//			alert( 'CURRENT ENTRY: nv_string: ' + nv_string );


			var nv_array = nv_string.split( '=' );


			// Save for rebuilding string

			names[  i ] = nv_array[ 0 ];
			values[ i ] = nv_array[ 1 ];


//			alert( 'CURRENT ENTRY: names[  ' + i + ' ] = ' + names[  i ] + ', values[ ' + i + ' ] = ' + values[ i ] );


			// Did we find our name? If so, flag this and save the index

			if( name == names[ i ] )
			{
				found_name = 1;
				name_index = i;
			}
		}
	}


	// If we found our name, add a new value for it, else add a new entry

	if( found_name )
	{
//		alert( 'found name: ' + name + ', name_index: ' + name_index );

		values[ name_index ] = value;
	}

	else
	{
		names[  i ] = name;
		values[ i ] = value;

//		alert( 'NEW ENTRY: names[  ' + i + ' ] = ' + names[  i ] + ', values[ ' + i + ' ] = ' + values[ i ] );

		i ++;
	}


	// Rebuild the string

	var nvs_array_new = new Array();

	for( var j = 0; j < i; j ++ )
	{
		var nv_string = names[ j ] + '=' + values[ j ];

		nvs_array_new[ j ] = nv_string;
	}

	var stored_string_new = nvs_array_new.join( '&' );


	// Save the stored string that persists between refreshes

	window.name = stored_string_new;


//	alert( 'window.name is:\n\n' + window.name );
}


function retrieve( name )
{
	// Retrieve the stored string that persists between refreshes

	var stored_string = window.name;


	// If we have a stored string, search for the name

	if( stored_string )
	{
		// Split the stored string into name-value strings

		var nvs_array = stored_string.split( '&' );

		for( var i=0; i < nvs_array.length; i ++ )
		{
			// Split the name-value string into a name string and a value string

			var nv_string = nvs_array[ i ];

			var nv_array = nv_string.split( '=' );


			// Did we find our name? If so, return the value

			if( name == nv_array[ 0 ] )
			{
				return( nv_array[ 1 ] );
			}
		}
	}


	// Return empty string when name not found

	return( '' );
}
//-------------------------------------------------------------------------------------------------------------------------

function which_browser()

//-------------------------------------------------------------------------------------------------------------------------
{
	browser = "";

	if( navigator.userAgent.indexOf("Firefox") != -1 )
	{
		browser = "FF";
	}

	if( navigator.userAgent.indexOf("MSIE") != -1 )
	{
		browser = "IE";
	}
}
//-------------------------------------------------------------------------------------------------------------------------
// html2js 'HopeChest.htm' to 'HopeChest.js'
var HopeChestMore = new Array();
var t=HopeChestMore;
t.push("<p><b><big>Hope Chest</big></b></p>");
t.push("");
t.push("<p>");
t.push("A Hope Chest is a New World name for the chest young girls would fill with precious objects in preparation for marriage.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("The chest is old, strong and well-made, probably of oak.  It has been cared for and polished for generations.  It is the sort of chest that valuables would have been kept in, or in which linen could be stored in safety.");
t.push("");
t.push("<p>");
t.push("It is sealed by an iron, hand-wrought hasp, but not locked.  Upon the chest is a candlestick, probably of pewter.  It has a little carrying handle and would have guided the householder to bed.  The candlestick holds a usable length of plain white candle.  It has clearly not burnt for very long and has just been extinguished, leaving a faint trail of smoke above it.   There are three bright red apples surrounding the candle, tempting and ripe.  In the foreground is a small knife, presumably for paring the fruit.  Behind and to the left is a small jug.  It is empty and of hand-thrown earthenware, possible a small wine pitcher.  To the right is a rumpled Turkish/Persian rug of a faded but still vibrant red, chased with a darker pattern of intricate design.  It carries a sense of value, age, practicality and beauty.");
t.push("");
t.push("");
t.push("<p>");
t.push("The background wall is of a sombre ochre, as if painted long ago, and reminiscent of ancient Italian townscapes.  Although the candle has just gone out, it is not night time.  The scene is bathed in the watery light of early morning.  The candle has been lit before dawn rather than before dusk.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("The feeling is almost medieval, the objects functional except for the apples, which attract the eye by their bright colour.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("What does the picture represent?  It is not simply a technical study.  The work is refined, beautifully detailed and understated.  Although the objects are strong and masculine, there is a sense of feminine ownership.  The rug is amazingly revealed and the drift of smoke from the candle almost imperceptible.  The scene is part of an affluent, comfortable household.  Nearby, there will be an enormous ancient four-poster bed with brocade curtains.  The floors will be of old oak plank, the ceiling criss-crossed with beams.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("The theme, for me, is love.  Not so much unrequited as un-fulfilled and aspirational.   The three apples are a recognisable image of love; not one but three, one separated from the others.  Perhaps there is a choice to be made.  Which lover?  Perhaps none.  Whatever the case, the apples are temptingly ripe.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("The candle is a potent symbol of smouldering male sexuality, its flame extinguished before the light of day.  The jug, on the other hand, is plain and straightforward, but, alas, empty, waiting to be filled.  The knife sits threateningly.  At a stroke it can destroy the carefully laid-out scene.  The rug, sumptuous in itself, is rumpled and untidy as if it has covered the chest and been pulled off while the chest has been opened, and then carelessly thrown back on.  Perhaps it is representative of the age and respectability of the family.  The box is the main thing.  It is strong, secure and closed.  Its hasp is functional but not permanently locked.  In the box lie all the hopes and dreams of a young woman.  Over the years, she has filled it with carefully stitched linen, table cloths, sheets and clothes, in preparation for her marriage.  It does not have the threat of a Pandora's Box; the contents are measured and orderly.  The girl is practical, sensible, pragmatic and yet romantic.  Which of the apples to take?");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("Before first light, she has been through her little hope chest, thinking through her future, weighing things up.  Finally, she has put out the candle and retreated to her bed to sleep a little longer.  She is full of longing; thoughtful and dutiful.  The man who wins her will have found a treasure for life.");
t.push("</p>");
t.push("");
t.push("<p>");
t.push("<b>Robert Eshelby</b><br>");
t.push("5th March, 2008");
t.push("</p>");
//-------------------------------------------------------------------------------------------------------------------------


