// FRAME VARS
var framePricePerFoot;  // Catologue price of the frame per foot	for under 16ft
var framePricePerFoot16;  // Catologue price of the frame per foot for 16ft and over
var frameBeveledPricePerFoot;  // Additional Catologue price of the frame per foot with beveled
var frameId;
var frameName;
var framePosition;
var frameDescription;
var frameSamplePrice;	// price for a sample of the frame
var polishedEdgePrice;	// price for a polished edge on a PLAIN mirror only
var frameInternalSize;
var frameExternalSize;
var p1;			// These contain the info to the extra pictures for the frame
var p2;
var p3;
var c1 = "";			// These contain the info on colours
var c2 = "";
var c3 = "";
var c4 = "";

var MAX_PLAIN_SIZE1		= 2000;	// Maximum sizes for the plain mirrors.  2000mm X 2500
var MAX_PLAIN_SIZE2		= 2500;

var pricesArray			= new Array();

var numberOfPrices;




// GLOBAL VARS
var totalNoContFrames = 7;  // Used in the next/prev page settings for Contemporary frames
var totalNoTradFrames = 8;  // Used in the next/prev page settings for Traditional frames
var specifingExact = 0;  // This is a flag used to set if user is specifying the exact size of the frame
var increaseForExact = 1; // This is amount in pounds increase of the frame if user specifies the exact size of the frame
var percentForExact = 1.25; // This is the % increase for specifying extact (replaces is increaseForExact);
var percentForExactText = "25%";

var SHORT_MAX_SIZE 	= 48; 	// Maximum short size (this is used for the custom size drop-downs)
var LONG_MAX_SIZE	= 72;	// Maximum long size (this is used for the custom size drop-downs)

var LENGTH1_CONST 		= 0;
var LENGTH2_CONST 		= 1;
var NONBEVELLED_CONST 	= 2;
var BEVELLED_CONST 		= 3;

// HIB BATHROOM MIRROR GLOBAL VARS


var HARRIET 	= 1;
var JORDAN		= 2;
var ALDOUS		= 3;
var ALBINA		= 4;
var ASTIA		= 5;
var MELBOURNE	= 6;
var SCALA		= 7;
var JAMBA		= 8;
var HALIFAX		= 9;
var GALAXY		= 10;
var COSMOS		= 11;
var DENIE		= 12;
var DORCAS		= 13;

var 	ZOOMROUND	 = 	20	;	
var 	ZOOMSQUARE	 = 	21	;	
var 	ZOOMRECTANGULAR	 = 	22	;	
var 	BEAN	 = 	23	;	
var 	STONE	 = 	24	;	
var 	XARXA	 = 	25	;	
var 	CLOF	 = 	26	;	
var 	GLOBECROMO	 = 	27	;	
var 	GLUP	 = 	28	;
var 	SCOTBLACK	 = 	29	;
var 	TEKNIK	 = 	30	;
var 	ACCIDSQUARE	 = 	31	;
var 	CAPSULE	 = 	32	;
var 	AIGUA	 = 	33	;
var 	ACCIDRECTANGULAR	 = 	34	;

//								price,		price + VAT,   retail price			// HIB	
pricesArray[ HARRIET	] 	= [	89.50	,2	, 175.50	];
pricesArray[ JORDAN	] 		= [	135.00	,2	, 264.60	];
pricesArray[ ALDOUS	] 		= [	45.20	,2	, 88.70	];
pricesArray[ ALBINA	] 		= [ 20.30	,2	, 39.70	];
pricesArray[ ASTIA	] 		= [ 23.80	,2	, 46.70	];
pricesArray[ MELBOURNE ] 	= [ 110.00	,2	, 215.60 	];
pricesArray[ SCALA	] 		= [ 134.20	,2	, 263.00	];
pricesArray[ JAMBA	] 		= [ 32.20	,2	, 63.20	];
pricesArray[ HALIFAX ] 		= [ 130	,2	, 254.80	];
pricesArray[ GALAXY	] 		= [ 150.80	,2	, 295.60	];
pricesArray[ COSMOS	] 		= [ 85.70	,2	, 168.00	];
pricesArray[ DENIE	] 		= [ 96.50	,2	, 189.20	];
pricesArray[ DORCAS	] 		= [ 127.40	,2	, 249.70	];


// VASIO
pricesArray[	ZOOMROUND	] = [ 	45.45	,	53.40	,	107	];
pricesArray[	ZOOMSQUARE	] = [ 	45.45	,	53.40	,	107	];
pricesArray[	ZOOMRECTANGULAR	] = [ 	50.55	,	59.40	,	119	];		
pricesArray[	BEAN	] = [ 	50.55	,	59.40	,	119	];
pricesArray[	STONE	] = [ 	50.55	,	59.40	,	119	];
pricesArray[	XARXA	] = [ 	58.72	,	69.00	,	138	];
pricesArray[	CLOF	] = [ 	48.57	,	57.07	,	114	];
pricesArray[	GLOBECROMO	] = [ 	60.77	,	71.40	,	143	];
pricesArray[	GLUP	] = [ 	48.51	,	57.00	,	114	];
pricesArray[	SCOTBLACK	] = [ 	74.04	,	87.00	,	174	];
pricesArray[	TEKNIK	] = [ 	50.55	,	59.40	,	119	];
pricesArray[	ACCIDSQUARE	] = [ 	40.34	,	47.40	,	95	];
pricesArray[	CAPSULE	] = [ 	45.45	,	53.40	,	107	];
pricesArray[	AIGUA	] = [ 	58.72	,	69.00	,	138	];
pricesArray[	ACCIDRECTANGULAR	] = [ 	43.40	,	51.00	,	102	];



var bathroomMirrorPriceBuy		= 0; // Used to store the price of the HIB mirrors
var bathroomMirrorPriceRetail	= 0; // Used to store the price of the HIB mirrors

var fixingSetPriceBuy_1 	= 2.20;  // Price HIB charges us for fixings
var fixingSetPriceBuy_2 	= 2; 
var fixingSetPriceRetail_1 	= 4.30;	// Price we charge customer
var fixingSetPriceRetail_2 	= 3.90;

var fixingSetNo_1		 	= "72.0030";  //  Normal fixing set
var fixingSetNo_2		 	= "72.0040";  // Illuminated mirrors fixing set
// The following are empty but are set in the next section when the mirror(frame) type is set
var fixingSetPriceBuy 		= 0;  // Price HIB charges us for fixings
var fixingSetPriceRetail 	= 0;	// Price we charge customer
var fixingSetNo		 		= "";
var isBathroomMirror		= "";


var frameNamesArray = [	"leather black",
			"leather green", 
			"Nottingham"
			];


function setVars( frame )
{


	if ( frame == "leather" )
	{
		framePricePerFoot = 13.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 12.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "leather";
		frameName = "leather";	
		frameTitle = "leather";
		framePosition = 1;
		frameSamplePrice = 3.50;
		frameDescription = "All of our leather mirrors are manufactured and hand finished to the highest standards and use only the finest full-grade hide.";
		
		
		frameDescription += " Click <a href=# onClick=\"window.open('../images/frames/leather/swatch.jpg', 'MirrorPic','width=600,height=400,location=no,menubar=yes,scrollbar=yes,titlebar=no'); return false;\">here</a> for pictures of our colours."
		frameDescription += " Click <a href=# onClick=\"window.open('../images/frames/leather/profiles.gif', 'MirrorPic','width=425,height=400,location=no,menubar=yes,scrollbar=yes,titlebar=no'); return false;\">here</a> for pictures of our frame profiles."		
		
		
		frameDescription += " Sizes shown are the total FRAME size.";
		p1 = "leather/profiles.gif";
		p2 = "leather/main.jpg";
		p3 = "leather/swatch.jpg";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 4;
		frameExternalSize = 4;
		
		pricesArray[	1	] = [	24	,	48	,	262.00	,	288.20	];
		pricesArray[	2	] = [	24	,	60	,	274.00	,	301.40	];
		pricesArray[	3	] = [	24	,	72	,	284.00	,	312.40	];
		pricesArray[	4	] = [	30	,	50	,	270.00	,	297.00	];
		pricesArray[	5	] = [	36	,	48	,	278.00	,	305.80	];
		pricesArray[	6	] = [	36	,	60	,	298.00	,	327.80	];
		pricesArray[	7	] = [	36	,	72	,	306.00	,	336.60	];
		pricesArray[	8	] = [	48	,	48	,	302.00	,	332.20	];
		pricesArray[	9	] = [	48	,	60	,	332.00	,	365.20	];
		pricesArray[	10	] = [	48	,	72	,	410.00	,	451.00	];
		
		numberOfPrices = 10;						
									
	}




	if ( frame == "Nottingham" )
	{
		framePricePerFoot = 13.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 12.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "MD015Gold";
		frameName = "Nottingham Frame";	
		frameTitle = "nottingham";
		framePosition = 1;
		frameSamplePrice = 3.50;
		frameDescription = "The solid, clean & crisp lines of this mirror are enhanced and accentuated by the sloped gold 3\" frame.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "MD015Gold_cornerZoom.jpg";
		p2 = "MD015Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 2.75;
		frameExternalSize = 3;
		
		pricesArray[ 	1	] = [	16	,	20	,	51.00	,	56.00	];
		pricesArray[ 	3	] = [	20	,	24	,	68.00	,	75.00	];
		pricesArray[ 	2	] = [	17	,	26	,	68.00	,	75.00	];
		pricesArray[ 	4	] = [	20	,	30	,	91.00	,	100.00	];
		pricesArray[ 	10	] = [	30	,	40	,	127.00	,	140.00	];
		pricesArray[ 	5	] = [	24	,	24	,	88.00	,	97.00	];
		pricesArray[ 	6	] = [	24	,	36	,	111.00	,	122.00	];
		pricesArray[ 	7	] = [	24	,	48	,	147.00	,	161.00	];
		pricesArray[ 	8	] = [	24	,	60	,	172.00	,	189.00	];
		pricesArray[ 	9	] = [	24	,	72	,	211.00	,	233.00	];
		pricesArray[ 	11	] = [	36	,	36	,	169.00	,	185.00	];
		pricesArray[ 	12	] = [	36	,	48	,	190.00	,	209.00	];
		pricesArray[ 	13	] = [	36	,	60	,	215.00	,	236.00	];
		pricesArray[ 	14	] = [	36	,	72	,	240.00	,	264.00	];
		pricesArray[ 	15	] = [	48	,	48	,	213.00	,	234.00	];
		pricesArray[ 	16	] = [	48	,	60	,	273.00	,	300.00	];
		pricesArray[ 	17	] = [	48	,	72	,	355.00	,	390.00	];
		numberOfPrices = 16;										
									
									
									
										

				


		
	}

	
	if ( frame == "Milano" )
	{
		framePricePerFoot = 13.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 12.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "MD015BrushedAli";
		frameName = "Milano Frame";	
		frameTitle = "milano";
		framePosition = 2;
		frameSamplePrice =  3.50;
		frameDescription = "The solid, clean & crisp lines of this mirror are enhanced and accentuated by the sloped silver 3\" frame.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "MD015BrushedAli_cornerZoom.jpg";
		p2 = "MD015BrushedAli_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 2.75;
		frameExternalSize = 3;		
		
		pricesArray[ 	1	] = [	16	,	20	,	51.00	,	56.00	];
		pricesArray[ 	3	] = [	20	,	24	,	68.00	,	75.00	];
		pricesArray[ 	2	] = [	17	,	26	,	68.00	,	75.00	];
		pricesArray[ 	4	] = [	20	,	30	,	91.00	,	100.00	];
		pricesArray[ 	10	] = [	30	,	40	,	127.00	,	140.00	];
		pricesArray[ 	5	] = [	24	,	24	,	88.00	,	97.00	];
		pricesArray[ 	6	] = [	24	,	36	,	111.00	,	122.00	];
		pricesArray[ 	7	] = [	24	,	48	,	147.00	,	161.00	];
		pricesArray[ 	8	] = [	24	,	60	,	172.00	,	189.00	];
		pricesArray[ 	9	] = [	24	,	72	,	211.00	,	233.00	];
		pricesArray[ 	11	] = [	36	,	36	,	169.00	,	185.00	];
		pricesArray[ 	12	] = [	36	,	48	,	190.00	,	209.00	];
		pricesArray[ 	13	] = [	36	,	60	,	215.00	,	236.00	];
		pricesArray[ 	14	] = [	36	,	72	,	240.00	,	264.00	];
		pricesArray[ 	15	] = [	48	,	48	,	213.00	,	234.00	];
		pricesArray[ 	16	] = [	48	,	60	,	273.00	,	300.00	];
		pricesArray[ 	17	] = [	48	,	72	,	355.00	,	390.00	];
		numberOfPrices = 16;										
								
									
				

			
		
	}

	if ( frame == "Madrid" )
	{
		framePricePerFoot = 11;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 10;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H381Gold";
		frameName = "Madrid Frame";	
		frameTitle = "madrid";
		framePosition = 3;
		frameSamplePrice =  3.50;
		frameDescription = "Combining the broad and clean lines with a roped edging, this 3 1/2\" gold gilted frame looks wonderful in larger mirrors.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H381Gold_cornerZoom.jpg";
		p2 = "H381Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.25;
		frameExternalSize = 3.5;		

		pricesArray[ 	1	] = [	16	,	20	,	51.00	,	56.00	];
		pricesArray[ 	3	] = [	20	,	24	,	68.00	,	75.00	];
		pricesArray[ 	2	] = [	17	,	26	,	68.00	,	75.00	];
		pricesArray[ 	4	] = [	20	,	30	,	91.00	,	100.00	];
		pricesArray[ 	10	] = [	30	,	40	,	127.00	,	140.00	];
		pricesArray[ 	5	] = [	24	,	24	,	88.00	,	97.00	];
		pricesArray[ 	6	] = [	24	,	36	,	111.00	,	122.00	];
		pricesArray[ 	7	] = [	24	,	48	,	147.00	,	161.00	];
		pricesArray[ 	8	] = [	24	,	60	,	172.00	,	189.00	];
		pricesArray[ 	9	] = [	24	,	72	,	211.00	,	233.00	];
		pricesArray[ 	11	] = [	36	,	36	,	169.00	,	185.00	];
		pricesArray[ 	12	] = [	36	,	48	,	190.00	,	209.00	];
		pricesArray[ 	13	] = [	36	,	60	,	215.00	,	236.00	];
		pricesArray[ 	14	] = [	36	,	72	,	240.00	,	264.00	];
		pricesArray[ 	15	] = [	48	,	48	,	213.00	,	234.00	];
		pricesArray[ 	16	] = [	48	,	60	,	273.00	,	300.00	];
		pricesArray[ 	17	] = [	48	,	72	,	355.00	,	390.00	];
		numberOfPrices = 16;										
									
									
			

			
		
	}


	if ( frame == "Paris" )
	{
		framePricePerFoot = 7.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 6.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H2006Silver";
		frameName = "Paris Frame";	
		frameTitle = "paris";
		framePosition = 4;
		frameSamplePrice =  3.50;
		frameDescription = "Striking 4\" contemporary frame combining the beautiful silver effect with a bronze tint.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H2006Silver_cornerZoom.jpg";
		p2 = "H2006Silver_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.75;
		frameExternalSize = 4;		

		pricesArray[ 	1	] = [	16	,	20	,	66.00	,	73.00	];
		pricesArray[ 	3	] = [	20	,	24	,	86.00	,	95.00	];
		pricesArray[ 	2	] = [	17	,	26	,	86.00	,	95.00	];
		pricesArray[ 	4	] = [	20	,	30	,	107.00	,	117.00	];
		pricesArray[ 	10	] = [	30	,	40	,	149.00	,	164.00	];
		pricesArray[ 	5	] = [	24	,	24	,	104.00	,	114.00	];
		pricesArray[ 	6	] = [	24	,	36	,	129.00	,	142.00	];
		pricesArray[ 	7	] = [	24	,	48	,	165.00	,	181.00	];
		pricesArray[ 	8	] = [	24	,	60	,	202.00	,	222.00	];
		pricesArray[ 	9	] = [	24	,	72	,	246.00	,	270.00	];
		pricesArray[ 	11	] = [	36	,	36	,	194.00	,	214.00	];
		pricesArray[ 	12	] = [	36	,	48	,	220.00	,	242.00	];
		pricesArray[ 	13	] = [	36	,	60	,	249.00	,	274.00	];
		pricesArray[ 	14	] = [	36	,	72	,	278.00	,	306.00	];
		pricesArray[ 	15	] = [	48	,	48	,	242.00	,	266.00	];
		pricesArray[ 	16	] = [	48	,	60	,	311.00	,	343.00	];
		pricesArray[ 	17	] = [	48	,	72	,	405.00	,	445.00	];
		numberOfPrices = 16;										
									
									
			
										

	}


	if ( frame == "Casablanca" )
	{
		framePricePerFoot = 18;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 17;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "MD103Crowsfoot";
		frameName = "Casablanca Frame";	
		frameTitle = "casablanca";
		framePosition = 5;
		frameSamplePrice =  3.50;
		frameDescription = "Contemporary, crisp and gold with dashes of red makes this ideal for a minimalist design.  Approximately 3 1/2\" frame.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "MD103Crowsfoot_cornerZoom.jpg";
		p2 = "MD103Crowsfoot_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.25;
		frameExternalSize = 3.5;
		
		pricesArray[ 	1	] = [	16	,	20	,	28.00	,	31.00	];
		pricesArray[ 	3	] = [	20	,	24	,	42.00	,	46.00	];
		pricesArray[ 	2	] = [	17	,	26	,	42.00	,	46.00	];
		pricesArray[ 	4	] = [	20	,	30	,	57.00	,	63.00	];
		pricesArray[ 	10	] = [	30	,	40	,	84.00	,	93.00	];
		pricesArray[ 	5	] = [	24	,	24	,	57.00	,	62.00	];
		pricesArray[ 	6	] = [	24	,	36	,	72.00	,	79.00	];
		pricesArray[ 	7	] = [	24	,	48	,	88.00	,	97.00	];
		pricesArray[ 	8	] = [	24	,	60	,	114.00	,	126.00	];
		pricesArray[ 	9	] = [	24	,	72	,	147.00	,	162.00	];
		pricesArray[ 	11	] = [	36	,	36	,	117.00	,	129.00	];
		pricesArray[ 	12	] = [	36	,	48	,	132.00	,	145.00	];
		pricesArray[ 	13	] = [	36	,	60	,	148.00	,	163.00	];
		pricesArray[ 	14	] = [	36	,	72	,	169.00	,	185.00	];
		pricesArray[ 	15	] = [	48	,	48	,	147.00	,	161.00	];
		pricesArray[ 	16	] = [	48	,	60	,	202.00	,	222.00	];
		pricesArray[ 	17	] = [	48	,	72	,	262.00	,	288.00	];
		numberOfPrices = 16;										
									
										


				
	}


	if ( frame == "Panama" )
	{
		framePricePerFoot = 8;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 7;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "MD104Beech";
		frameName = "Panama Frame";	
		frameTitle = "panama";
		framePosition = 6;
		frameSamplePrice =  3.50;
		frameDescription = "Understated and yet typically elegant, this 3 3/4\" beech effect frame adds simple beauty to any sized room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "MD104Beech_cornerZoom.jpg";
		p2 = "MD104Beech_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.5;
		frameExternalSize = 3.75;	
		
		pricesArray[ 	1	] = [	16	,	20	,	28.00	,	31.00	];
		pricesArray[ 	3	] = [	20	,	24	,	42.00	,	46.00	];
		pricesArray[ 	2	] = [	17	,	26	,	42.00	,	46.00	];
		pricesArray[ 	4	] = [	20	,	30	,	57.00	,	63.00	];
		pricesArray[ 	10	] = [	30	,	40	,	84.00	,	93.00	];
		pricesArray[ 	5	] = [	24	,	24	,	57.00	,	62.00	];
		pricesArray[ 	6	] = [	24	,	36	,	72.00	,	79.00	];
		pricesArray[ 	7	] = [	24	,	48	,	88.00	,	97.00	];
		pricesArray[ 	8	] = [	24	,	60	,	114.00	,	126.00	];
		pricesArray[ 	9	] = [	24	,	72	,	147.00	,	162.00	];
		pricesArray[ 	11	] = [	36	,	36	,	117.00	,	129.00	];
		pricesArray[ 	12	] = [	36	,	48	,	132.00	,	145.00	];
		pricesArray[ 	13	] = [	36	,	60	,	148.00	,	163.00	];
		pricesArray[ 	14	] = [	36	,	72	,	169.00	,	185.00	];
		pricesArray[ 	15	] = [	48	,	48	,	147.00	,	161.00	];
		pricesArray[ 	16	] = [	48	,	60	,	202.00	,	222.00	];
		pricesArray[ 	17	] = [	48	,	72	,	262.00	,	288.00	];
		numberOfPrices = 16;										
									
										

			
	}


	if ( frame == "Medellin" )
	{
		framePricePerFoot = 7;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 6;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "MD104Maple";
		frameName = "Medellin Frame";	
		frameTitle = "medellin";
		framePosition = 7;
		frameSamplePrice =  3.50;
		frameDescription = "Understated and yet typically elegant, this 3 3/4\" maple effect frame adds simple beauty to any sized room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "MD104Maple_cornerZoom.jpg";
		p2 = "MD104Maple_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.5;
		frameExternalSize = 3.75;	
		
		pricesArray[ 	1	] = [	16	,	20	,	28.00	,	31.00	];
		pricesArray[ 	3	] = [	20	,	24	,	42.00	,	46.00	];
		pricesArray[ 	2	] = [	17	,	26	,	42.00	,	46.00	];
		pricesArray[ 	4	] = [	20	,	30	,	57.00	,	63.00	];
		pricesArray[ 	10	] = [	30	,	40	,	84.00	,	93.00	];
		pricesArray[ 	5	] = [	24	,	24	,	57.00	,	62.00	];
		pricesArray[ 	6	] = [	24	,	36	,	72.00	,	79.00	];
		pricesArray[ 	7	] = [	24	,	48	,	88.00	,	97.00	];
		pricesArray[ 	8	] = [	24	,	60	,	114.00	,	126.00	];
		pricesArray[ 	9	] = [	24	,	72	,	147.00	,	162.00	];
		pricesArray[ 	11	] = [	36	,	36	,	117.00	,	129.00	];
		pricesArray[ 	12	] = [	36	,	48	,	132.00	,	145.00	];
		pricesArray[ 	13	] = [	36	,	60	,	148.00	,	163.00	];
		pricesArray[ 	14	] = [	36	,	72	,	169.00	,	185.00	];
		pricesArray[ 	15	] = [	48	,	48	,	147.00	,	161.00	];
		pricesArray[ 	16	] = [	48	,	60	,	202.00	,	222.00	];
		pricesArray[ 	17	] = [	48	,	72	,	262.00	,	288.00	];
		numberOfPrices = 16;										
									
							
										
					
	}


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/*

	if ( frame == "California" )
	{
		framePricePerFoot = 9;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 8;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H214";
		frameName = "California Frame";	
		frameTitle = "california";
		framePosition = 8;
		frameSamplePrice =  3.50;
		frameDescription = "Contempoary and crisp gold patina wooden frame ideal for a minamilistic design.  Approximately 3\" frame.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}


	if ( frame == "Manhattan" )
	{
		framePricePerFoot = 9;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 8;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H400";
		frameName = "Manhattan Frame";	
		frameTitle = "manhattan";
		framePosition = 9;
		frameSamplePrice =  3.50;
		frameDescription = "This mirror combines luxurious gold and silver gilts with an elegant yet contemporary design.  Approximatley 3\" frame.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}


	if ( frame == "Melbourne" )
	{
		framePricePerFoot = 8;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 7;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H270";
		frameName = "Melbourne Frame";	
		frameTitle = "melbourne";
		framePosition = 10;
		frameSamplePrice =  3.50;
		frameDescription = "The solid wooden 3 1/2\" frame makes this ideal for the large mirror.  This natural antique pine effect frame is one of our most popular mirrors as it compliments any existing pine furtiture.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}

	if ( frame == "London" )
	{
		framePricePerFoot = 9.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 8.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H407";
		frameName = "London Frame";	
		frameTitle = "london";
		framePosition = 11;
		frameSamplePrice =  3.50;
		frameDescription = "The flat floral motif, clean crisp edges and its 4\" width combine to give this frame a classic but very contemporary feel.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}
*/
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////


	////////////////////////////////////////////////
	//TRADITIONAL
	////////////////////////////////////////////////

	if ( frame == "Moskva" )
	{
		framePricePerFoot =9 ;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 =8 ;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "715Gold";
		frameName = "Moskva Frame";	
		frameTitle = "moskva";
		framePosition = 1;
		frameSamplePrice =  3.50;
		frameDescription = "The full and wide waved motif work wonderfully to provide real depth to its golden bronze gilted 3\" frame.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "715Gold_cornerZoom.jpg";
		p2 = "715Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 2.75;
		frameExternalSize = 3;	
		
		pricesArray[ 	1	] = [	16	,	20	,	31.00	,	34.00	];
		pricesArray[ 	3	] = [	20	,	24	,	44.00	,	49.00	];
		pricesArray[ 	2	] = [	17	,	26	,	44.00	,	49.00	];
		pricesArray[ 	4	] = [	20	,	30	,	61.00	,	67.00	];
		pricesArray[ 	10	] = [	30	,	40	,	88.00	,	96.00	];
		pricesArray[ 	5	] = [	24	,	24	,	62.00	,	68.00	];
		pricesArray[ 	6	] = [	24	,	36	,	82.00	,	90.00	];
		pricesArray[ 	7	] = [	24	,	48	,	103.00	,	113.00	];
		pricesArray[ 	8	] = [	24	,	60	,	128.00	,	141.00	];
		pricesArray[ 	9	] = [	24	,	72	,	161.00	,	177.00	];
		pricesArray[ 	11	] = [	36	,	36	,	126.00	,	138.00	];
		pricesArray[ 	12	] = [	36	,	48	,	143.00	,	157.00	];
		pricesArray[ 	13	] = [	36	,	60	,	165.00	,	181.00	];
		pricesArray[ 	14	] = [	36	,	72	,	180.00	,	198.00	];
		pricesArray[ 	15	] = [	48	,	48	,	158.00	,	173.00	];
		pricesArray[ 	16	] = [	48	,	60	,	220.00	,	242.00	];
		pricesArray[ 	17	] = [	48	,	72	,	286.00	,	314.00	];
		numberOfPrices = 16;										
									
							
							
			
			

	}

	if ( frame == "Roma" )
	{
		framePricePerFoot = 9;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 =8;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "715Silver";
		frameName = "Roma Frame";	
		frameTitle = "roma";
		framePosition = 2;
		frameSamplePrice =  3.50;
		frameDescription = "The full and wide waved motif work wonderfully to provide real depth to its silvery bronze gilted 3\" frame.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "715Silver_cornerZoom.jpg";
		p2 = "715Silver_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 2.75;
		frameExternalSize = 3;				
		
		pricesArray[ 	1	] = [	16	,	20	,	31.00	,	34.00	];
		pricesArray[ 	3	] = [	20	,	24	,	44.00	,	49.00	];
		pricesArray[ 	2	] = [	17	,	26	,	44.00	,	49.00	];
		pricesArray[ 	4	] = [	20	,	30	,	61.00	,	67.00	];
		pricesArray[ 	10	] = [	30	,	40	,	88.00	,	96.00	];
		pricesArray[ 	5	] = [	24	,	24	,	62.00	,	68.00	];
		pricesArray[ 	6	] = [	24	,	36	,	82.00	,	90.00	];
		pricesArray[ 	7	] = [	24	,	48	,	103.00	,	113.00	];
		pricesArray[ 	8	] = [	24	,	60	,	128.00	,	141.00	];
		pricesArray[ 	9	] = [	24	,	72	,	161.00	,	177.00	];
		pricesArray[ 	11	] = [	36	,	36	,	126.00	,	138.00	];
		pricesArray[ 	12	] = [	36	,	48	,	143.00	,	157.00	];
		pricesArray[ 	13	] = [	36	,	60	,	165.00	,	181.00	];
		pricesArray[ 	14	] = [	36	,	72	,	180.00	,	198.00	];
		pricesArray[ 	15	] = [	48	,	48	,	158.00	,	173.00	];
		pricesArray[ 	16	] = [	48	,	60	,	220.00	,	242.00	];
		pricesArray[ 	17	] = [	48	,	72	,	286.00	,	314.00	];
		numberOfPrices = 16;										
									
			

		
	}

	if ( frame == "Lisboa" )
	{
		framePricePerFoot =9 ;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 =8 ;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H204Gold";
		frameName = "Lisboa Frame";	
		frameTitle = "lisboa";
		framePosition =3 ;
		frameSamplePrice =  3.50;
		frameDescription = "The copious swirl motif and heavily textured finish are offset with a clean and crisp inner edge to provide one of the most elegant mirrors in our traditional collection.  This 4\" gold frame is sure to be a focal point in any room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H204Gold_cornerZoom.jpg";
		p2 = "H204Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.75;
		frameExternalSize = 4;
		
		pricesArray[ 	1	] = [	16	,	20	,	66.00	,	73.00	];
		pricesArray[ 	3	] = [	20	,	24	,	86.00	,	95.00	];
		pricesArray[ 	2	] = [	17	,	26	,	86.00	,	95.00	];
		pricesArray[ 	4	] = [	20	,	30	,	107.00	,	117.00	];
		pricesArray[ 	10	] = [	30	,	40	,	149.00	,	164.00	];
		pricesArray[ 	5	] = [	24	,	24	,	104.00	,	114.00	];
		pricesArray[ 	6	] = [	24	,	36	,	129.00	,	142.00	];
		pricesArray[ 	7	] = [	24	,	48	,	165.00	,	181.00	];
		pricesArray[ 	8	] = [	24	,	60	,	202.00	,	222.00	];
		pricesArray[ 	9	] = [	24	,	72	,	246.00	,	270.00	];
		pricesArray[ 	11	] = [	36	,	36	,	194.00	,	214.00	];
		pricesArray[ 	12	] = [	36	,	48	,	220.00	,	242.00	];
		pricesArray[ 	13	] = [	36	,	60	,	249.00	,	274.00	];
		pricesArray[ 	14	] = [	36	,	72	,	278.00	,	306.00	];
		pricesArray[ 	15	] = [	48	,	48	,	242.00	,	266.00	];
		pricesArray[ 	16	] = [	48	,	60	,	311.00	,	343.00	];
		pricesArray[ 	17	] = [	48	,	72	,	405.00	,	445.00	];
		numberOfPrices = 16;										
									
				
		
	}

	if ( frame == "Soul" )
	{
		framePricePerFoot =9.50 ;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 =8.50 ;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H204Silver";
		frameName = "Soul Frame";	
		frameTitle = "soul";
		framePosition =4 ;
		frameSamplePrice =  3.50;
		frameDescription = "The copious swirl motif and heavily textured finish are offset with a clean and crisp inner edge to provide one of the most elegant mirrors in our traditional collection.  This 4\" silver frame is sure to be a focal point in any room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H204Silver_cornerZoom.jpg";
		p2 = "H204Silver_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.75;
		frameExternalSize = 4;

		pricesArray[ 	1	] = [	16	,	20	,	66.00	,	73.00	];
		pricesArray[ 	3	] = [	20	,	24	,	86.00	,	95.00	];
		pricesArray[ 	2	] = [	17	,	26	,	86.00	,	95.00	];
		pricesArray[ 	4	] = [	20	,	30	,	107.00	,	117.00	];
		pricesArray[ 	10	] = [	30	,	40	,	149.00	,	164.00	];
		pricesArray[ 	5	] = [	24	,	24	,	104.00	,	114.00	];
		pricesArray[ 	6	] = [	24	,	36	,	129.00	,	142.00	];
		pricesArray[ 	7	] = [	24	,	48	,	165.00	,	181.00	];
		pricesArray[ 	8	] = [	24	,	60	,	202.00	,	222.00	];
		pricesArray[ 	9	] = [	24	,	72	,	246.00	,	270.00	];
		pricesArray[ 	11	] = [	36	,	36	,	194.00	,	214.00	];
		pricesArray[ 	12	] = [	36	,	48	,	220.00	,	242.00	];
		pricesArray[ 	13	] = [	36	,	60	,	249.00	,	274.00	];
		pricesArray[ 	14	] = [	36	,	72	,	278.00	,	306.00	];
		pricesArray[ 	15	] = [	48	,	48	,	242.00	,	266.00	];
		pricesArray[ 	16	] = [	48	,	60	,	311.00	,	343.00	];
		pricesArray[ 	17	] = [	48	,	72	,	405.00	,	445.00	];
		numberOfPrices = 16;										

			
						
	}

	if ( frame == "Bermuda" )
	{
		framePricePerFoot = 8.5;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 7.5 ;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H362Gold";
		frameName = "Bermuda Frame";	
		frameTitle = "bermuda";
		framePosition = 5;
		frameSamplePrice =  3.50;
		frameDescription = "The abundance of texture in this frame emphasises its unique character which changes as the focus of natural light moves throughout the day.  The 4\" gold frame is sure to add texture and depth to any room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H362Gold_cornerZoom.jpg";
		p2 = "H362Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.75;
		frameExternalSize = 4;	
		
		pricesArray[ 	1	] = [	16	,	20	,	73.00	,	81.00	];
		pricesArray[ 	3	] = [	20	,	24	,	96.00	,	106.00	];
		pricesArray[ 	2	] = [	17	,	26	,	96.00	,	106.00	];
		pricesArray[ 	4	] = [	20	,	30	,	119.00	,	131.00	];
		pricesArray[ 	10	] = [	30	,	40	,	166.00	,	182.00	];
		pricesArray[ 	5	] = [	24	,	24	,	115.00	,	127.00	];
		pricesArray[ 	6	] = [	24	,	36	,	143.00	,	157.00	];
		pricesArray[ 	7	] = [	24	,	48	,	183.00	,	202.00	];
		pricesArray[ 	8	] = [	24	,	60	,	225.00	,	247.00	];
		pricesArray[ 	9	] = [	24	,	72	,	273.00	,	301.00	];
		pricesArray[ 	11	] = [	36	,	36	,	216.00	,	237.00	];
		pricesArray[ 	12	] = [	36	,	48	,	244.00	,	269.00	];
		pricesArray[ 	13	] = [	36	,	60	,	277.00	,	305.00	];
		pricesArray[ 	14	] = [	36	,	72	,	309.00	,	340.00	];
		pricesArray[ 	15	] = [	48	,	48	,	269.00	,	296.00	];
		pricesArray[ 	16	] = [	48	,	60	,	346.00	,	381.00	];
		pricesArray[ 	17	] = [	48	,	72	,	450.00	,	495.00	];
		numberOfPrices = 16;										
									
				
			
		
		
	}

	if ( frame == "Philadelphia" )
	{
		framePricePerFoot =9 ;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 =8 ;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H362Silver";
		frameName = "Philadelphia Frame";	
		frameTitle = "philadelphia";
		framePosition = 6;
		frameSamplePrice = 3.50;
		frameDescription = "The abundance of texture in this frame emphasises its unique character which changes as the focus of natural light moves throughout the day.  The 4\" silver frame is sure to add texture and depth to any room.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H362Silver_cornerZoom.jpg";
		p2 = "H362Silver_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 3.75;
		frameExternalSize = 4;		
		
		pricesArray[ 	1	] = [	16	,	20	,	73.00	,	81.00	];
		pricesArray[ 	3	] = [	20	,	24	,	96.00	,	106.00	];
		pricesArray[ 	2	] = [	17	,	26	,	96.00	,	106.00	];
		pricesArray[ 	4	] = [	20	,	30	,	119.00	,	131.00	];
		pricesArray[ 	10	] = [	30	,	40	,	166.00	,	182.00	];
		pricesArray[ 	5	] = [	24	,	24	,	115.00	,	127.00	];
		pricesArray[ 	6	] = [	24	,	36	,	143.00	,	157.00	];
		pricesArray[ 	7	] = [	24	,	48	,	183.00	,	202.00	];
		pricesArray[ 	8	] = [	24	,	60	,	225.00	,	247.00	];
		pricesArray[ 	9	] = [	24	,	72	,	273.00	,	301.00	];
		pricesArray[ 	11	] = [	36	,	36	,	216.00	,	237.00	];
		pricesArray[ 	12	] = [	36	,	48	,	244.00	,	269.00	];
		pricesArray[ 	13	] = [	36	,	60	,	277.00	,	305.00	];
		pricesArray[ 	14	] = [	36	,	72	,	309.00	,	340.00	];
		pricesArray[ 	15	] = [	48	,	48	,	269.00	,	296.00	];
		pricesArray[ 	16	] = [	48	,	60	,	346.00	,	381.00	];
		pricesArray[ 	17	] = [	48	,	72	,	450.00	,	495.00	];
		numberOfPrices = 16;										
									
				
										
		
	}

	if ( frame == "Valencia" )
	{
		framePricePerFoot = 8;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 7;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H602Gold";
		frameName = "Valencia Frame";	
		frameTitle = "valencia";
		framePosition = 7;
		frameSamplePrice =  3.50;
		frameDescription = "The largest frame in our collection at approximately 4 1/2\".  The broad plain edges of this gold frame contrast with its tight swirl central decoration to provide a traditional look.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H602Gold_cornerZoom.jpg";
		p2 = "H602Gold_zoom.jpg";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 4.25;
		frameExternalSize = 4.5;		

		pricesArray[ 	1	] = [	16	,	20	,	66.00	,	73.00	];
		pricesArray[ 	3	] = [	20	,	24	,	86.00	,	95.00	];
		pricesArray[ 	2	] = [	17	,	26	,	86.00	,	95.00	];
		pricesArray[ 	4	] = [	20	,	30	,	107.00	,	117.00	];
		pricesArray[ 	10	] = [	30	,	40	,	149.00	,	164.00	];
		pricesArray[ 	5	] = [	24	,	24	,	104.00	,	114.00	];
		pricesArray[ 	6	] = [	24	,	36	,	129.00	,	142.00	];
		pricesArray[ 	7	] = [	24	,	48	,	165.00	,	181.00	];
		pricesArray[ 	8	] = [	24	,	60	,	202.00	,	222.00	];
		pricesArray[ 	9	] = [	24	,	72	,	246.00	,	270.00	];
		pricesArray[ 	11	] = [	36	,	36	,	194.00	,	214.00	];
		pricesArray[ 	12	] = [	36	,	48	,	220.00	,	242.00	];
		pricesArray[ 	13	] = [	36	,	60	,	249.00	,	274.00	];
		pricesArray[ 	14	] = [	36	,	72	,	278.00	,	306.00	];
		pricesArray[ 	15	] = [	48	,	48	,	242.00	,	266.00	];
		pricesArray[ 	16	] = [	48	,	60	,	311.00	,	343.00	];
		pricesArray[ 	17	] = [	48	,	72	,	405.00	,	445.00	];
		numberOfPrices = 16;										
									
			
			
		
				
	}

	if ( frame == "Salvador" )
	{
		framePricePerFoot = 9;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 8;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H602Silver";
		frameName = "Salvador Frame";	
		frameTitle = "salvador";
		framePosition =8 ;
		frameSamplePrice =  3.50;
		frameDescription = "The largest frame in our collection at approximately 4 1/2\".  The broad plain edges of this silver-bronze frame contrast with its tight swirl central decoration to provide a traditional look.";
		frameDescription += " Sizes shown are the glass size.";
		p1 = "H602Silver_cornerZoom.jpg";
		p2 = "H602Silver_zoom.jpg";
		p3 = "floorStandingMirrorTraditionalH602Silver.jpg";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
		frameInternalSize = 4.25;
		frameExternalSize = 4.5;
		
		pricesArray[ 	1	] = [	16	,	20	,	66.00	,	73.00	];
		pricesArray[ 	3	] = [	20	,	24	,	86.00	,	95.00	];
		pricesArray[ 	2	] = [	17	,	26	,	86.00	,	95.00	];
		pricesArray[ 	4	] = [	20	,	30	,	107.00	,	117.00	];
		pricesArray[ 	10	] = [	30	,	40	,	149.00	,	164.00	];
		pricesArray[ 	5	] = [	24	,	24	,	104.00	,	114.00	];
		pricesArray[ 	6	] = [	24	,	36	,	129.00	,	142.00	];
		pricesArray[ 	7	] = [	24	,	48	,	165.00	,	181.00	];
		pricesArray[ 	8	] = [	24	,	60	,	202.00	,	222.00	];
		pricesArray[ 	9	] = [	24	,	72	,	246.00	,	270.00	];
		pricesArray[ 	11	] = [	36	,	36	,	194.00	,	214.00	];
		pricesArray[ 	12	] = [	36	,	48	,	220.00	,	242.00	];
		pricesArray[ 	13	] = [	36	,	60	,	249.00	,	274.00	];
		pricesArray[ 	14	] = [	36	,	72	,	278.00	,	306.00	];
		pricesArray[ 	15	] = [	48	,	48	,	242.00	,	266.00	];
		pricesArray[ 	16	] = [	48	,	60	,	311.00	,	343.00	];
		pricesArray[ 	17	] = [	48	,	72	,	405.00	,	445.00	];
		numberOfPrices = 16;										
									
			
										
						
	}
 
 
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
///////////// Bathroom mirrors
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
 
 	if ( frame == "Harriet" )
	{
		frameId 				= "(72.0207)";
		frameName 				= "Harriet 80X80cm";	
		frameTitle 				= "Harriet";
		framePosition 			= 1 ;
		frameDescription 		= "A 80x80cm polished edged mirror on a matt white screen printed frame, with bevelled mirror edge, and a 60cm glass shelf.";
		bathroomMirrorPrice 	= pricesArray[ HARRIET ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ HARRIET ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_1;
		fixingSetPriceRetail 	= fixingSetPriceRetail_1;
		fixingSetNo		 		= fixingSetNo_1;
		isBathroomMirror		= "true";
	}
	
 	if ( frame == "Jordan" )
	{
		frameId 				= "(64.1235)";
		frameName 				= "Jordan 60cm";	
		frameTitle 				= "Jordan";
		framePosition 			= 2 ;
		frameDescription 		= "Modern circular back lit mirror.  60cm in diameter and 5mm thickness glass.";
		bathroomMirrorPrice 	= pricesArray[ JORDAN ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ JORDAN ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
		
	}	
	
 	if ( frame == "Aldous" )
	{
		frameId 				= "(61.1640)";
		frameName 				= "Aldous 60X45cm";	
		frameTitle 				= "Aldous";
		framePosition 			= 3 ;
		frameDescription 		= "Brilliant cut and bevelled 60X45cm mirror.";
		bathroomMirrorPrice 	= pricesArray[ ALDOUS ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ALDOUS ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_1;
		fixingSetPriceRetail 	= fixingSetPriceRetail_1;
		fixingSetNo		 		= fixingSetNo_1;
		isBathroomMirror		= "true";
	}	
	
 	if ( frame == "Albina" )
	{
		frameId 				= "(61.1641)";
		frameName 				= "Albina 60X45cm";	
		frameTitle 				= "Albina";
		framePosition 			= 4 ;
		frameDescription 		= "Rectangular bevelled 60X45cm mirror with brilliant cut design.";
		bathroomMirrorPrice 	= pricesArray[ ALBINA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ALBINA ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_1;
		fixingSetPriceRetail 	= fixingSetPriceRetail_1;
		fixingSetNo		 		= fixingSetNo_1;
		isBathroomMirror		= "true";
	}	
	
 	if ( frame == "Astia" )
	{
		frameId 				= "(69.3430)";
		frameName 				= "Astia 70X50cm";	
		frameTitle 				= "Astia";
		framePosition 			= 5 ;
		frameDescription 		= "70X50cm screen printed rectangular mirror";
		bathroomMirrorPrice 	= pricesArray[ ASTIA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ASTIA ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_1;
		fixingSetPriceRetail 	= fixingSetPriceRetail_1;
		fixingSetNo		 		= fixingSetNo_1;
		isBathroomMirror		= "true";
	}	
	
 	if ( frame == "Melbourne" )
	{
		frameId 				= "(71.1505)";
		frameName 				= "Melbourne 70X50cm";	
		frameTitle 				= "Melbourne";
		framePosition 			= 6 ;
		frameDescription 		= "5mm bevelled 70X50cm mirror with modern aluminium light. 2X30Watt halogen lights (IP23).";
		bathroomMirrorPrice 	= pricesArray[ MELBOURNE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ MELBOURNE ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}
	
	if ( frame == "Scala" )
	{
		frameId 				= "(71.3010)";
		frameName 				= "Scala 89X70cm";	
		frameTitle 				= "Scala";
		framePosition 			= 7 ;
		frameDescription 		= "Double mounted 89X70cm mirror with chrome light. 2X20Watt halogen lights (IP23).";
		bathroomMirrorPrice 	= pricesArray[ SCALA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ SCALA ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}
	
	if ( frame == "Jamba" )
	{
		frameId 				= "(63.0707)";
		frameName 				= "Jamba 70X50cm";	
		frameTitle 				= "Jamba";
		framePosition 			= 8 ;
		frameDescription 		= "70X50cm shaped and bevelled two part mirror.";
		bathroomMirrorPrice 	= pricesArray[ JAMBA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ JAMBA ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_1;
		fixingSetPriceRetail 	= fixingSetPriceRetail_1;
		fixingSetNo		 		= fixingSetNo_1;
		isBathroomMirror		= "true";
	}	
		
	if ( frame == "Halifax" )
	{
		frameId 				= "(64.1230)";
		frameName 				= "Halifax 70X50cm";	
		frameTitle 				= "Halifax";
		framePosition 			= 9 ;
		frameDescription 		= "70X50cm modern back lit mirror with 5mm glass.";
		bathroomMirrorPrice 	= pricesArray[ HALIFAX ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ HALIFAX ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}	
		
	if ( frame == "Galaxy" )
	{
		frameId 				= "(64.6464)";
		frameName 				= "Galaxy 110X70cm";	
		frameTitle 				= "Galaxy";
		framePosition 			= 10 ;
		frameDescription 		= "110x70cm striking mirrors with optical effect of lights disappearing into infinity.  12W lights mounted in a wooden silver effect 110X70cm frame.";
		bathroomMirrorPrice 	= pricesArray[ GALAXY ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ GALAXY ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}		
	
	if ( frame == "Dorcas" )
	{
		frameId 				= "(64.8932)";
		frameName 				= "Dorcas 80X60cm";	
		frameTitle 				= "Dorcas";
		framePosition 			= 10 ;
		frameDescription 		= "80X60cm arched bevelled mirror with four chrome lights.";
		bathroomMirrorPrice 	= pricesArray[ DORCAS ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ DORCAS ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}		
		
	if ( frame == "Denie" )
	{
		frameId 				= "(71.3339)";
		frameName 				= "Denie 70cm";	
		frameTitle 				= "Denie";
		framePosition 			= 10 ;
		frameDescription 		= "70cm diameter circular designed mirror with frosted pattern and low voltage lighting.";
		bathroomMirrorPrice 	= pricesArray[ DENIE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ DENIE ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}		
	
	if ( frame == "Cosmos" )
	{
		frameId 				= "(64.9014)";
		frameName 				= "Cosmos 70X50cm";	
		frameTitle 				= "Cosmos";
		framePosition 			= 10 ;
		frameDescription 		= "70X50cm rectangular multi-layered bevelled mirror with a chrome covered neon strip light.";
		bathroomMirrorPrice 	= pricesArray[ COSMOS ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ COSMOS ][ 0 ]; // Retail price
		fixingSetPriceBuy	 	= fixingSetPriceBuy_2;
		fixingSetPriceRetail 	= fixingSetPriceRetail_2;
		fixingSetNo		 		= fixingSetNo_2;
		isBathroomMirror		= "true";
	}			
			


	if ( frame == "zoomRound" )
	{
		frameId 				= "(VEZOP600)";
		frameName 				= "zoomRound";	
		frameTitle 				= "Zoom+ Round";
		framePosition 			= 1 ;
		frameDescription 		= "60cm diameter 5mm mirror incorporating a magnifying mirror.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ZOOMROUND ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ZOOMROUND ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			
			


	if ( frame == "zoomSquare" )
	{
		frameId 				= "(VEZOP6X6)";
		frameName 				= "zoomSquare";	
		frameTitle 				= "Zoom+ Square";
		framePosition 			= 2 ;
		frameDescription 		= "60x60cm 5mm mirror incorporating a magnifying mirror.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ZOOMSQUARE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ZOOMSQUARE ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			

	if ( frame == "zoomRectangular" )
	{
		frameId 				= "(VEZOP410HV)";
		frameName 				= "zoomRectangular";	
		frameTitle 				= "Zoom+ Rectangular";
		framePosition 			= 3 ;
		frameDescription 		= "40X100cm 5mm mirror incorporating a magnifying mirror.  Can be hung virtical or horizontally.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ZOOMRECTANGULAR ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ZOOMRECTANGULAR ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			

	if ( frame == "zoomRectangularH" )
	{
		frameId 				= "(VEZOP410HV)";
		frameName 				= "zoomRectangularH";	
		frameTitle 				= "Zoom+ Rectangular";
		framePosition 			= 3 ;
		frameDescription 		= "40X100cm 5mm mirror incorporating a magnifying mirror.  Can be hung virtical or horizontally.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ZOOMRECTANGULAR ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ZOOMRECTANGULAR ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			



	if ( frame == "bean" )
	{
		frameId 				= "(VEBEA566AO)";
		frameName 				= "Bean";	
		frameTitle 				= "Bean With Magnifying Mirror";
		framePosition 			= 4 ;
		frameDescription 		= "56X66cm 5mm mirror incorporating a magnifying mirror.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ BEAN ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ BEAN ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			


	if ( frame == "stone" )
	{
		frameId 				= "(VESTO526AO)";
		frameName 				= "Stone";	
		frameTitle 				= "Stone With Magnifying Mirror";
		framePosition 			= 5 ;
		frameDescription 		= "52x60cm 5mm mirror incorporating a magnifying mirror.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ STONE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ STONE ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			


	if ( frame == "xarxa" )
	{
		frameId 				= "(VEXAR160HV)";
		frameName 				= "Xarxa";	
		frameTitle 				= "Xarxa";
		framePosition 			= 6 ;
		frameDescription 		= "100X60cm 5mm mirror.   Stunning graphics achieved using hard-wearing serigraphic ink.  Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ XARXA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ XARXA ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			


	if ( frame == "clof" )
	{
		frameId 				= "(VECLO495G)";
		frameName 				= "Clof";	
		frameTitle 				= "Clof";
		framePosition 			= 6 ;
		frameDescription 		= "40x95cm 5mm mirror.   Stunning graphics achieved using hard-wearing serigraphic ink.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ CLOF ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ CLOF ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			



	if ( frame == "globeCromo" )
	{
		frameId 				= "(VEGLO495CR)";
		frameName 				= "GLOBECROMO";	
		frameTitle 				= "Chrome framed Globe mirror";
		framePosition 			= 6 ;
		frameDescription 		= "40X100cm 5mm chrome framed mirror.   Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ GLOBECROMO ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ GLOBECROMO][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			

	if ( frame == "glup" )
	{
		frameId 				= "(VEGLU595Z)";
		frameName 				= "Glup";	
		frameTitle 				= "Glup";
		framePosition 			= 6 ;
		frameDescription 		= "40x95cm 5mm mirror.   Stunning graphics achieved using hard-wearing serigraphic ink.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ GLUP ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ GLUP ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			




	if ( frame == "scotBlack" )
	{
		frameId 				= "(VESCO495NEBlack)";
		frameName 				= "scotblack";	
		frameTitle 				= "Scot aluminium framed mirror";
		framePosition 			= 6 ;
		frameDescription 		= "40X100cm 5mm aluminium framed mirror.   Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ SCOTBLACK ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ SCOTBLACK ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			

	if ( frame == "teknik" )
	{
		frameId 				= "(VETEK575CR)";
		frameName 				= "Teknik";	
		frameTitle 				= "Teknik polished stainless steel";
		framePosition 			= 6 ;
		frameDescription 		= "50X75cm 5mm mirror with polished stainless steel base.   Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ TEKNIK ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ TEKNIK ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			

	if ( frame == "accidSquare" )
	{
		frameId 				= "(VEACC6X6)";
		frameName 				= "accidSquare";	
		frameTitle 				= "Accid Square";
		framePosition 			= 6 ;
		frameDescription 		= "60x60cm 5mm mirror with frosted edge.  Features a built-in hanging system.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ACCIDSQUARE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ACCIDSQUARE ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			


	if ( frame == "capsule" )
	{
		frameId 				= "(VECAP150HV)";
		frameName 				= "capsule";	
		frameTitle 				= "Capsule";
		framePosition 			= 6 ;
		frameDescription 		= "100X50cm 5mm mirror.   Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ CAPSULE ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ CAPSULE ][ 0 ]; // Supply price
		isBathroomMirror		= "true";

	}	


	if ( frame == "aigua" )
	{
		frameId 				= "(VEAIG160HV)";
		frameName 				= "Aigua";	
		frameTitle 				= "Aigua";
		framePosition 			= 6 ;
		frameDescription 		= "100X60cm 5mm mirror.   Stunning graphics achieved using hard-wearing serigraphic ink.  Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ XARXA ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ XARXA ][ 0 ]; // Supply price
		isBathroomMirror		= "true";
	}			


	if ( frame == "accidRectangular" )
	{
		frameId 				= "(VEACC410HV)";
		frameName 				= "accidRectangular";	
		frameTitle 				= "Accid rectangular";
		framePosition 			= 6 ;
		frameDescription 		= "100X40cm 5mm frosted edged mirror.  Features a built-in hanging system allowing mirror to be hung virtically or horizontally.  Click image for more detailed picture.";
		bathroomMirrorPrice 	= pricesArray[ ACCIDRECTANGULAR ][ 2 ]; // Retail price
		bathroomMirrorPriceBuy 	= pricesArray[ ACCIDRECTANGULAR ][ 0 ]; // Supply price
		isBathroomMirror		= "true";

	}			





//frameDescription = frameDescription + "<a href=../bathroommirrors>back</a>";

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/*
	if ( frame == "Sevilla" )
	{
		framePricePerFoot = 9.5;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 8.5;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H221";
		frameName = "Sevilla Frame";	
		frameTitle = "sevilla";
		framePosition = 9;
		frameSamplePrice =  3.50;
		frameDescription = "This elegent mahogany finished frame, with its dark shadowed 3\" profile, contrasts beautifully with a the light and airy beveled mirror.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}

	if ( frame == "Bruxelles" )
	{
		framePricePerFoot = 10.50;  // Catologue price of the frame per foot for under 16ft
		framePricePerFoot16 = 9.50;  // Catologue price of the frame per foot for 16ft and over
		frameBeveledPricePerFoot = 1;  // Additional Catologue price of the frame per foot with beveled
		frameId = "H381";
		frameName = "Bruxelles Frame";	
		frameTitle = "bruxelles";
		framePosition = 10;
		frameSamplePrice =  3.50;
		frameDescription = "Combining the broad and clean lines with a roped edging, this 3\" gold gilted frame looks wonderful in larger mirrors.";
		p1 = ".jpg";
		p2 = "";
		p3 = "";
		c1 = "";
		c2 = "";
		c3 = "";
		c4 = "";
	}
*/
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

	if ( frame == "Plain" )
	{
		frameName = "Plain";
	}
	
	if ( frame == "PlainRaised" )
	{
		frameName = "PlainRaised";
	}	
	
	if ( frame == "Pad" )
	{
		frameName = "Pad";
	}	
}

function setImages()
{
	document.mainImage.src="images/frames/" + frameId + "_box.gif";
}

function toggleExact( tog )
{
	if ( tog == "on" )
	{
		specifingExact = 1;
		document.getElementById('exactOffTog').style.display = 'block';
		/*
		if( document.forms["mirrorForm"].beveled.value == "1" )
		{	
			document.getElementById('defaultSizeDivBev').style.display = 'none';
		}
		else
		{
			document.getElementById('defaultSizeDivNonBev').style.display = 'none';
		}*/
		
		document.getElementById('defaultSizeDiv').style.display = 'none';
		
		document.getElementById('exactSizeDiv').style.display = 'block';
		document.getElementById('exactOnTog').style.display = 'none'; 
		recalculate();
	}
	else
	{
		specifingExact = 0;
		document.getElementById('exactOffTog').style.display = 'none';
		
		/*
		if( document.forms["mirrorForm"].beveled.value == "1" )
		{	
			document.getElementById('defaultSizeDivBev').style.display = 'block';
		}
		else
		{
			document.getElementById('defaultSizeDivNonBev').style.display = 'block';
		}*/
		
		document.getElementById('defaultSizeDiv').style.display = 'block';
		document.getElementById('exactSizeDiv').style.display = 'none';
		document.getElementById('exactOnTog').style.display = 'block';
		recalculate();
	}
}
	

function recalculateBath()
{
	var widthSelect 		= document.forms["mirrorForm"].width;
	var heightSelect 		= document.forms["mirrorForm"].height;
	var beveledSelect 		= document.forms["mirrorForm"].beveled;
	var polishedSelect 		= document.forms["mirrorForm"].polished;
	var thicknessSelect		= document.forms["mirrorForm"].thickness;
	var priceField 			= document.forms["mirrorForm"].price;
	var priceDescField 		= document.forms["mirrorForm"].priceDesc;
	var delievryPriceField	= document.forms["mirrorForm"].deliveryPrice;
	var deliverySelect 		= document.forms["mirrorForm"].delivery;
	var bracketsSelect		= document.forms["mirrorForm"].brackets;
	var holesSelect			= document.forms["mirrorForm"].holes;
	var safetySelect		= document.forms["mirrorForm"].safety;
	var totalLinerMT;
	var totalSqMT;
	var bathmirrorPrice 	= 80;
	var safetyPrice			= 15;
	var bathbeveledPrice 	= 11;
	var bathPolishedPrice 	= 7;
	var bracketPrice		= 5;
	var holesPrice			= 1.5;
	var bevCost 			= 0;
	var polishedCost		= 0;
	var bracketCost			= 0;
	var holesCost			= 0;
	var safetyCost			= 0;
	var MIN_ORDER_VALUE		= 95;
	var	RAISED_MIRROR_PRICE = 135;

	if ( widthSelect.value == 0 || heightSelect.value == 0  )
	{
		priceField.value = "";
	}
	else
	{

		var width = parseInt(widthSelect.value);
		var height = parseInt(heightSelect.value);
		var description = "";
		var widthDesc = width + "mm";
		var heightDesc = height + "mm";

		delievryPriceField.value = "10";

		totalLinerMT = (width/1000  * 2) + (height/1000  * 2);
		totalSqMT=  width/1000  * height/1000 ;

		if ( beveledSelect.value == "1" ) 
		{
			description += "Bevelled (3/4inch). ";
			bevCost = totalLinerMT * bathbeveledPrice; 			
		}

		if ( polishedSelect.value == "1" ) 
		{
			description += "Polished. ";
			polishedCost = totalLinerMT * bathPolishedPrice;
		}
		
		if ( beveledSelect.value != "1" && polishedSelect.value != "1" )
		{
			description += " Plain (NonBev NonPol). ";
		}	
		
		if ( holesSelect.value != "" )
		{
			description += "6mmHolesX" + holesSelect.value + ". ";
			holesCost = holesPrice * parseInt( holesSelect.value );
		}
		
		if ( safetySelect.value == "1" )
		{
			description += " Safety. ";
			safetyCost = safetyPrice * totalSqMT;
		}
		else
		{
			if 	( width > 400 || height > 400 )
			{
				alert("For health and saftey reasons, plain mirrors can only be supplied with safety backing if any length is over 400mm");
				description += " Safety";
				safetyCost = safetyPrice * totalSqMT;
				document.forms["mirrorForm"].safety.selectedIndex = 0;
			}
		}	
		
		description += "" + thicknessSelect.value + " thickness. " ;
		
		if ( bracketsSelect.value != "0" )
		{
			description += " bracketsX" + bracketsSelect.value;
			bracketCost = bracketPrice *  parseInt(bracketsSelect.value);
		}		
					
		totalAmount = convertToMoney( (totalSqMT  * bathmirrorPrice ) + bevCost + polishedCost + bracketCost + holesCost + safetyCost);

		if( totalSqMT  <= 1.44)
		{
			totalAmount =  convertToMoney(0.9 * totalAmount)
			delievryPriceField.value = "0";			
		}else if( totalSqMT  <= 3.75)
		{
			totalAmount =  convertToMoney(0.95 * totalAmount)
			delievryPriceField.value = "0";			
		}

		if( frameName == "PlainRaised" ) {
			totalAmount =  convertToMoney( (1 * totalAmount) + RAISED_MIRROR_PRICE );
			description = "FLOATING MIRROR KIT : " + description;
			if ( totalAmount < ( MIN_ORDER_VALUE + RAISED_MIRROR_PRICE )  )
			{			
				priceField.value = "£" + totalAmount + " (min £" + (MIN_ORDER_VALUE + RAISED_MIRROR_PRICE) + ")";
				totalAmount = MIN_ORDER_VALUE + RAISED_MIRROR_PRICE;
			}
			else
				priceField.value = "£" + totalAmount;
		} 
		else
		{
			// It is a standard plain mirror
			document.getElementById('showFloatingText').style.display = 'block';
			
			if ( totalAmount < MIN_ORDER_VALUE )
			{			
				priceField.value = "£" + totalAmount + " (min £" + MIN_ORDER_VALUE + ")";
				totalAmount = MIN_ORDER_VALUE;
			}
			else
				priceField.value = "£" + totalAmount;
		}
		
		description = description  + " " + widthDesc  + "X" + heightDesc;

		setBasketDetails ((parseInt( delievryPriceField.value ) + parseFloat(totalAmount)), description, "PLAIN", "", "", "" );

	}

}

function toggleBeveled()
{
	var beveledSelect 		= document.forms["mirrorForm"].beveled;
	
	if ( beveledSelect.value == 0 )
	{
		document.getElementById('defaultSizeDivBev').style.display = 'none';
		document.getElementById('defaultSizeDivNonBev').style.display = 'block';
	}
	else
	{
		document.getElementById('defaultSizeDivBev').style.display = 'block';
		document.getElementById('defaultSizeDivNonBev').style.display = 'none';
	}

	recalculate();
}	

function recalculatePad()
{
	var item1Select			= document.forms["mirrorForm"].pad274_274;
	var item2Select			= document.forms["mirrorForm"].pad574_274;
	var item3Select			= document.forms["mirrorForm"].pad524_524;
	var item4Select			= document.forms["mirrorForm"].pad1024_524;				


	////  !!!!  If you change these do not forget to change the desciption on the pads page!!!!!
	var priceItem1 = 40;
	var priceItem2 = 53;
	var priceItem3 = 61;
	var priceItem4 = 74;
	var delAmount = 10;
	////  !!!!  If you change these do not forget to change the desciption on the pads page!!!!!
		
	var itemDescription = "";
	var totalAmount = 0;
	


	if( item1Select.value != "0") 
	{
		itemDescription += item1Select.value + "Xpad252x274. ";
		totalAmount += (parseInt( item1Select.value ) * priceItem1);
	}
	
	if( item2Select.value != "0") 
	{
		itemDescription += item2Select.value + "Xpad524x274. ";
		totalAmount += (parseInt( item2Select.value ) * priceItem2);
	}
		
	if( item3Select.value != "0") 
	{
		itemDescription += item3Select.value + "Xpad519x524. ";
		totalAmount += (parseInt( item3Select.value ) * priceItem3);
	}
	
	if( item4Select.value != "0") 
	{
		itemDescription += item4Select.value + "Xpad1004x524. ";
		totalAmount += (parseInt( item4Select.value ) * priceItem4);
	}



		document.forms["mirrorForm"].deliveryPrice.value = delAmount;
		document.forms["mirrorForm"].price.value = totalAmount;
		// populate shopping cart fields
		document.forms["mirrorForm"].amount.value = parseInt(totalAmount) + parseInt( delAmount );
		document.forms["mirrorForm"].item_number.value = itemDescription;
		document.forms["mirrorForm"].item_name.value = itemDescription;

		document.forms["mirrorForm"].desc.value = itemDescription;
}



function recalculateBathroomMirrors()
{

	var fixingSelect		= document.forms["mirrorForm"].fixing;
	var padsSelect			= document.forms["mirrorForm"].pads;	
	var itemDescription = "";
	var totalAmount = bathroomMirrorPrice;
	var totalAmountBuy = bathroomMirrorPriceBuy;
	
	itemDescription = frameName + " " + frameId;
	if( fixingSelect.value == "Yes" ) 
	{
		itemDescription += " with fixing set (" + fixingSetNo + ")";
		totalAmount += fixingSetPriceRetail;
		totalAmountBuy += fixingSetPriceBuy;		
	}

	totalAmount = convertToMoney( totalAmount);
	// populate price and del fields 
	document.forms["mirrorForm"].price.value = totalAmount + " (free delivery)";
	// populate shopping cart fields
	document.forms["mirrorForm"].amount.value = totalAmount;
	document.forms["mirrorForm"].desc.value = itemDescription;
	document.forms["mirrorForm"].M_c.value = totalAmountBuy;
	document.forms["mirrorForm"].M_frame.value = "BathroomMirror";
	
}




function recalculate()
{	
	// ONLY USED BY MOULDINGS

	var beveledSelect 		= document.forms["mirrorForm"].beveled;
	var defaultSizeSelect;
	var length1InchesSelect	= document.forms["mirrorForm"].length1Inches;
	var length2InchesSelect	= document.forms["mirrorForm"].length2Inches;
	var priceField 			= document.forms["mirrorForm"].price;
	var priceDescField 		= document.forms["mirrorForm"].priceDesc;
	var delievryPriceField	= document.forms["mirrorForm"].deliveryPrice;
	var deliverySelect 		= document.forms["mirrorForm"].delivery;

	var totalAmount;
	var length1Desc;
	var length2Desc;
	var length1;
	var length2;
	
	var sizeId 	
	var beveledOptionSelected;

	// START SELECT correct price drop-down
	// This ensures the sizes selected in the two default size drop-downs (bevelled and non-bevelled) are the same
	// and also selects the drop-down to be used for prices.
	if ( beveledSelect.value == 1 ) 
	{
		beveledOptionSelected = BEVELLED_CONST;
		defaultSizeSelect = document.forms["mirrorForm"].defaultSizeBev;
		document.forms["mirrorForm"].defaultSizeNonBev[defaultSizeSelect.value].selected = true;
	}
	else
	{
		beveledOptionSelected = NONBEVELLED_CONST;
		defaultSizeSelect = document.forms["mirrorForm"].defaultSizeNonBev;
		document.forms["mirrorForm"].defaultSizeBev[defaultSizeSelect.value].selected = true
	}
	// END select correct price drop-down
	
	
	// START : Do nothing if details have not been completely selected
			
	if( 
		( specifingExact == 0 && defaultSizeSelect.value  == 0 ) ||
		( specifingExact == 1 && ( length1InchesSelect.value == 0 || length2InchesSelect.value == 0 ) )
	   )
	{
		priceField.value = "";
		return;
	}
	// END : Do nothing
	
	if( specifingExact == 0 )
	{	
		totalAmount = convertToMoney( pricesArray[ defaultSizeSelect.value ][ beveledOptionSelected ] );
		sizeId =  defaultSizeSelect.value;
								
		length1 = pricesArray[ defaultSizeSelect.value ][ LENGTH1_CONST ];
		length2 = pricesArray[ defaultSizeSelect.value ][ LENGTH2_CONST ];
			
		priceField.value = "£" + totalAmount;
	}
	else
	{
		length1 = parseInt(length1InchesSelect.value);
		length2 = parseInt(length2InchesSelect.value);
		
		// find the smallest length the customer has specified
		var smallestLength;
		var largestLength;
		if (length1 <= length2 ) 
		{
			smallestLength = length1;
			largestLength = length2;
		} else {
			smallestLength = length2;
			largestLength = length1;
		}			
		
		sizeId = 1;	
		// LENGTH1_CONST always has the shortest length
		while( smallestLength > pricesArray[ sizeId ][ LENGTH1_CONST ] && sizeId<=numberOfPrices)
		{
			sizeId++;			
		}
		
		while( largestLength > pricesArray[ sizeId ][ LENGTH2_CONST ] && sizeId<=numberOfPrices)
		{
			sizeId++;
		}


		if ( frameName == "leather" )
		{

			totalAmount = convertToMoney( pricesArray[ sizeId ][ beveledOptionSelected ] );				
			priceField.value = "£" + totalAmount + "  [Price of ("+ pricesArray[ sizeId ][ LENGTH1_CONST ] + "x" + pricesArray[ sizeId ][ LENGTH2_CONST ] + "\")]";
	alert("here");

//			totalAmount = convertToMoney( pricesArray[ sizeId ][ beveledOptionSelected ] );
//			priceField.value = "£" + totalAmount + " price of ("+ pricesArray[ sizeId ][ LENGTH1_CONST ] + "x" + pricesArray[ sizeId ][ LENGTH2_CONST ] + "\")";
			
		}
		else
		{
			totalAmount = convertToMoney( pricesArray[ sizeId ][ beveledOptionSelected ] * percentForExact );
				
			priceField.value = "£" + totalAmount + "  [130% of £"+ pricesArray[ sizeId ][ beveledOptionSelected ] + " ("+ pricesArray[ sizeId ][ LENGTH1_CONST ] + "x" + pricesArray[ sizeId ][ LENGTH2_CONST ] + "\")]";
		}
		
		length1Desc	= pricesArray[ sizeId ][ LENGTH1_CONST ] ;
		length2Desc	= pricesArray[ sizeId ][ LENGTH2_CONST ] ;
		
	}
	
	
	
	// CALCULATE DELIVERY COSTS
	var totalFt =  length1 * length2;
	var delAmount = 0;
	//delievryPriceField.value = "";

	if ( frameName == "leather" )
	  delAmount = "24.99";
        else
	{
	  if( totalFt <= 862 )   // 36 X 24
		delAmount = "10.00";
	  else if( totalFt <= 1728 && totalFt > 862 )  // 1728 = 36X48
		delAmount = "15.00";
	  else if( totalFt <= 2304 && totalFt > 1728 ) 	// 2304 = 48X48
		delAmount = "20.00";
	  else if( totalFt > 2304 ) 
		delAmount = "25.00";
	}

	//delievryPriceField.value = "£" + delAmount;
	priceField.value = priceField.value + " (plus £" + delAmount + " del.)"
	// FINISH CALC DELIVERY COSTS					
	
	
	// Create order description
	if ( beveledSelect.value == "1" )
		desc = frameId + " " + length1 + "X" + length2 + " BV (" + frameName + " bevelled ";		
	else
		desc = frameId + " " + length1 + "X" + length2 + " PL (" +   frameName + " plain ";			

	if( specifingExact == 1 )
		// Case where user has selected exact		
		desc = "CUSTOM " + desc + "CUSTOM)";
	else
		desc = desc + ")";

	
	if ( frameName == "leather" )
		desc = desc + document.forms["mirrorForm"].colour.value + " " + document.forms["mirrorForm"].profile.value ;


	// POPULATE SHOPPING CART FORM DETAILS
	setBasketDetails ( (parseInt(totalAmount) + parseInt( delAmount )), desc, frameName, sizeId, beveledSelect.value, specifingExact );
	// FINISH POPULATE PAYPAL FORM DETAILS
}



function setBasketDetails( amount, desc, frame, sizeId, type, exact  )
{
	// ADDED TO STOP
	alert("THIS WEBSITE IS NO LONGER OPERATIONAL.  PLEASE VISIT OUR NEW WEBSITE WWW.BESPOKEMIRRORS.COM.  YOU ARE AT THE OLD .CO.UK WEBSITE.");
	return false;
	
	document.forms["mirrorForm"].amount.value		= amount;
	document.forms["mirrorForm"].desc.value			= desc;
	document.forms["mirrorForm"].M_frame.value		= frame;
	document.forms["mirrorForm"].M_sizeId.value		= sizeId;
	document.forms["mirrorForm"].M_type.value		= type;
	document.forms["mirrorForm"].M_exact.value		= exact;	
}

function checkMouldingForm()
{

	// ADDED TO STOP
	alert("THIS WEBSITE IS NO LONGER OPERATIONAL.  PLEASE VISIT OUR NEW WEBSITE WWW.BESPOKEMIRRORS.COM.  YOU ARE AT THE OLD .CO.UK WEBSITE.");
	return false;

	if ( frameName == "Plain" )
		return checkPlainForm();
	
	if ( frameName == "PlainRaised" )
		return checkPlainForm();	
	
	
	if( frameName == "Pad" )
		return checkPadForm();
		
	if( isBathroomMirror == "true" )
		return checkBathroomMirror();

	if( frameName == "Samples" )
		return checkSamplesForm();

	var beveledSelect 		= document.forms["mirrorForm"].beveled;
	var length1InchesSelect	= document.forms["mirrorForm"].length1Inches;
	var length2InchesSelect	= document.forms["mirrorForm"].length2Inches;
	//var deliverySelect 		= document.forms["mirrorForm"].delivery;
	var defaultSizeSelect 	= document.forms["mirrorForm"].defaultSizeBev;

	var errorMsg = "";

	
	if( specifingExact == 0 )
	{
		if ( defaultSizeSelect.value == 0 )
			errorMsg += "You must select a size for your mirror.\n";
	}
	else
	{
		if ( length1InchesSelect.value  == 0 || length1InchesSelect.value == 0 )
			errorMsg += "You must select a size for both lengths when specifying an exact size.\n";
	}

	if ( frameName == "leather" )
	{
		var colour 	= document.forms["mirrorForm"].colour.value;
		var profile 	= document.forms["mirrorForm"].profile.value;
		if ( colour == "" )
			errorMsg += "Please select the colour you would like.\n";
		if ( profile == "" )
			errorMsg += "Please select the frame profile you would like.\n"
	}
	else
	{
		if( !confirm("The size you have selected is the GLASS size.\n" +
			"You should add approximately " + frameInternalSize * 2 + "\" to the width and length to get the total FRAME size.\n\n" +
			"Press 'OK' to continue or 'Cancel' to change your order.") )
		    return false;
	}

	if ( errorMsg != "" )
	{
		alert( errorMsg );
		return false;
	}
	else
		return true;
}

function checkPadForm()
{
	
	if ( document.forms["mirrorForm"].price.value == "" || document.forms["mirrorForm"].price.value == "0")
	{
		alert( "You have not selected anything.\n" );
		return false;
	}
	else
		return true;
		
}

function checkBathroomMirror()
{
	var fixingSelect 	= document.forms["mirrorForm"].fixing;
	var padsSelect 		= document.forms["mirrorForm"].pads;

	var errorMsg = "";
	
	if ( fixingSelect.value == "" )
		errorMsg += "You must select if you require fixings.\n";

//	if ( padsSelect.value == "" )
	//	errorMsg += "You must select if you require heated pads.\n";

	if ( errorMsg != "" )
	{
		alert( errorMsg );
		return false;
	}
	else
		return true;
}


function checkPlainForm()
{

	var widthSelect 	= document.forms["mirrorForm"].width;
	var heightSelect 	= document.forms["mirrorForm"].height;
	var deliverySelect 	= document.forms["mirrorForm"].delivery;

	var errorMsg = "";
	
	if ( widthSelect.value == 0 )
		errorMsg += "You must select a width for your mirror.\n";

	if ( heightSelect.value == 0 )
		errorMsg += "You must select a height for your mirror.\n";

	
	if ( deliverySelect.value == "" )
		errorMsg += "You must select a delivery area.\n";

	if ( errorMsg != "" )
	{
		alert( errorMsg );
		return false;
	}
	else
	{
	//	if( deliverySelect.value == "outM25" )
	//		return confirm("If you require delivery outside of the M25, please check the map to see if we can guarantee delivery to that area.  If your delivery location does not come within our guaranteed area, please e-mail us with your postcode and glass measurements so that we can give you a quote.\n\nPress CANCEL if you have not checked our delivery area.\n\nPress OK to continue with the order.");
	//	else
			return true;
	}
}

function convertToMoney( num )
{
	num = Math.round( num * 100 ) / 100 ;
	num = num + "";
	var len = num.length;
	if ( num.charAt( len - 2 ) == "." )
		return num + "0";
	if ( num.charAt( len - 3 ) != "." )
		return num + ".00";
	return num;

}


function recalculateSample( frame )
{
	var x = 0;
	var frameSamples = "";
	var sampleAmount = 0;
	while ( x < frameNamesArray.length )	
	{
		var sam = "sample" + x;
		if ( document.forms["mirrorForm"][ sam ].value == "Yes")
		{
			frameSamples += frameNamesArray[x] + ", ";
			sampleAmount += 2;
		}
		x++;

	}

	document.forms["mirrorForm"].price.value = sampleAmount;
	document.forms["mirrorForm"].deliveryPrice.value = 2;
	document.forms["mirrorForm"].amount.value		= (sampleAmount + 2);
	document.forms["mirrorForm"].desc.value			= frameSamples;
	

}

function checkSamplesForm()
{
	return true;
}
