//stdStyles are the image file names for the standard styles page
var stdStyles = new Array(21);
			stdStyles[0] = new Array();
			stdStyles[0][0] = "19";  // Number of products in category
			stdStyles[1] = new Array();
			stdStyles[1][0] = "standard/images/std_tuck_win";
			stdStyles[1][1] = "6";
			stdStyles[2]= new Array();
			stdStyles[2][0] = "standard/images/std_autolock_win";
			stdStyles[2][1] = "5";
			stdStyles[3] = new Array();
			stdStyles[3][0] = "standard/images/std_snaplock_win";
			stdStyles[3][1] = "4";
			stdStyles[4] = new Array();
			stdStyles[4][0] = "standard/images/std_fivepanel_win";
			stdStyles[4][1] = "5";
			stdStyles[5] = new Array();
			stdStyles[5][0] = "standard/images/std_bookend_win";
			stdStyles[5][1] = "4";
			stdStyles[6] = new Array();
			stdStyles[6][0] = "standard/images/std_sleeve_win";
			stdStyles[6][1] = "6";
			stdStyles[7] = new Array();
			stdStyles[7][0] = "standard/images/std_rett_win";
			stdStyles[7][1] = "6";
			stdStyles[8] = new Array();
			stdStyles[8][0] = "standard/images/std_header_win";
			stdStyles[8][1] = "6";
			stdStyles[9] = new Array();
			stdStyles[9][0] = "standard/images/std_gable_win";
			stdStyles[9][1] = "6";
			stdStyles[10] = new Array();
			stdStyles[10][0] = "standard/images/std_tea_win";
			stdStyles[10][1] = "4";
			stdStyles[11] = new Array();
			stdStyles[11][0] = "standard/images/std_theme_win";
			stdStyles[11][1] = "4";
			stdStyles[12] = new Array();
			stdStyles[12][0] = "standard/images/std_mailer_win";
			stdStyles[12][1] = "3";
			stdStyles[13] = new Array();
			stdStyles[13][0] = "standard/images/std_snappop_win";
			stdStyles[13][1] = "4";
			stdStyles[14] = new Array();
			stdStyles[14][0] = "standard/images/std_rettpop_win";
			stdStyles[14][1] = "3";
			stdStyles[15] = new Array();
			stdStyles[15][0] = "standard/images/std_corrugated_win";
			stdStyles[15][1] = "4";
			stdStyles[16] = new Array();
			stdStyles[16][0] = "standard/images/std_software_win";
			stdStyles[16][1] = "1";
			stdStyles[17] = new Array();
			stdStyles[17][0] = "standard/images/std_soap_win";
			stdStyles[17][1] = "1";
			stdStyles[18] = new Array();
			stdStyles[18][0] = "standard/images/std_candle_win";
			stdStyles[18][1] = "1";
			stdStyles[19] = new Array();
			stdStyles[19][0] = "standard/images/std_cosmetics_win";
			stdStyles[19][1] = "1";
			stdStyles[20] = new Array();
			stdStyles[20][0] = "standard/images/std_software_win";
			stdStyles[20][1] = "1";

//bathbodyStyles are the image file names for the soap styles page
var bathbodyStyles = new Array(19);
			bathbodyStyles[0] = new Array();
			bathbodyStyles[0][0] = "17";  // Number of products in category
			bathbodyStyles[1] = new Array();
			bathbodyStyles[1][0] = "bathbody/images/soap_butter_win";
			bathbodyStyles[1][1] = "3";
			bathbodyStyles[2]= new Array();
			bathbodyStyles[2][0] = "bathbody/images/soap_lotion_win";
			bathbodyStyles[2][1] = "4";
			bathbodyStyles[3] = new Array();
			bathbodyStyles[3][0] = "bathbody/images/soap_bomb_win";
			bathbodyStyles[3][1] = "2";
			bathbodyStyles[4] = new Array();
			bathbodyStyles[4][0] = "bathbody/images/soap_kits_win";
			bathbodyStyles[4][1] = "3";
			bathbodyStyles[5] = new Array();
			bathbodyStyles[5][0] = "bathbody/images/soap_candle_win";
			bathbodyStyles[5][1] = "5";
			bathbodyStyles[6] = new Array();
			bathbodyStyles[6][0] = "bathbody/images/soap_gable_win";
			bathbodyStyles[6][1] = "3";
			bathbodyStyles[7] = new Array();
			bathbodyStyles[7][0] = "bathbody/images/soap_theme_win";
			bathbodyStyles[7][1] = "3";
			bathbodyStyles[8] = new Array();
			bathbodyStyles[8][0] = "bathbody/images/soap_pop_win";
			bathbodyStyles[8][1] = "3";
			bathbodyStyles[9] = new Array();
			bathbodyStyles[9][0] = "bathbody/images/soap_tuck_win";
			bathbodyStyles[9][1] = "5";
			bathbodyStyles[10] = new Array();
			bathbodyStyles[10][0] = "bathbody/images/soap_ret_win";
			bathbodyStyles[10][1] = "4";
			bathbodyStyles[11] = new Array();
			bathbodyStyles[11][0] = "bathbody/images/soap_hex_win";
			bathbodyStyles[11][1] = "4";
			bathbodyStyles[12] = new Array();
			bathbodyStyles[12][0] = "bathbody/images/soap_blank_win";
			bathbodyStyles[12][1] = "1";
			bathbodyStyles[13] = new Array();
			bathbodyStyles[13][0] = "bathbody/images/soap_dontsee_win";
			bathbodyStyles[13][1] = "5";
			bathbodyStyles[14] = new Array();
			bathbodyStyles[14][0] = "bathbody/images/soap_blank_win";
			bathbodyStyles[14][1] = "1";
			bathbodyStyles[15] = new Array();
			bathbodyStyles[15][0] = "bathbody/images/soap_blank_win";
			bathbodyStyles[15][1] = "1";
			bathbodyStyles[16] = new Array();
			bathbodyStyles[16][0] = "bathbody/images/soap_stock_ste_win";
			bathbodyStyles[16][1] = "1";
			bathbodyStyles[17] = new Array();
			bathbodyStyles[17][0] = "bathbody/images/soap_stock_retf_win";
			bathbodyStyles[17][1] = "2";
			bathbodyStyles[18] = new Array();
			bathbodyStyles[18][0] = "bathbody/images/soap_stock_hex_win";
			bathbodyStyles[18][1] = "1";


//candleStyles are the image file names for the candle styles page
var candleStyles = new Array(12);
			candleStyles[0] = new Array();
			candleStyles[0][0] = "10";  // Number of products in category
			candleStyles[1] = new Array();
			candleStyles[1][0] = "candle/images/candle_votivemultipak_win";
			candleStyles[1][1] = "2";
			candleStyles[2] = new Array();
			candleStyles[2][0] = "candle/images/candle_teamultipak_win";
			candleStyles[2][1] = "2";
			candleStyles[3] = new Array();
			candleStyles[3][0] = "candle/images/candle_pillar_win";
			candleStyles[3][1] = "4";
			candleStyles[4] = new Array();
			candleStyles[4][0] = "candle/images/candle_jar_win";
			candleStyles[4][1] = "6";
			candleStyles[5] = new Array();
			candleStyles[5][0] = "candle/images/candle_tart_win";
			candleStyles[5][1] = "2";
			candleStyles[6] = new Array();
			candleStyles[6][0] = "candle/images/candle_sleeve_win";
			candleStyles[6][1] = "2";
			candleStyles[7] = new Array();
			candleStyles[7][0] = "candle/images/candle_wrap_win";
			candleStyles[7][1] = "2";
			candleStyles[8] = new Array();
			candleStyles[8][0] = "candle/images/candle_lid_win";
			candleStyles[8][1] = "2";
			candleStyles[9] = new Array();
			candleStyles[9][0] = "candle/images/candle_diffuser_win";
			candleStyles[9][1] = "3";
			candleStyles[10] = new Array();
			candleStyles[10][0] = "candle/images/candle_theme_win";
			candleStyles[10][1] = "2";
			candleStyles[11] = new Array();
			candleStyles[11][0] = "candle/images/candle_pop_win";
			candleStyles[11][1] = "2";


//softStyles are the image file names for the software styles page
var softStyles = new Array(9);
			softStyles[0] = new Array();
			softStyles[0][0] = "7";  // Number of products in category
			softStyles[1] = new Array();
			softStyles[1][0] = "software/images/soft_tuck_win";
			softStyles[1][1] = "4";
			softStyles[2]= new Array();
			softStyles[2][0] = "software/images/soft_bookend_win";
			softStyles[2][1] = "2";
			softStyles[3] = new Array();
			softStyles[3][0] = "software/images/soft_pcgame_win";
			softStyles[3][1] = "2";
			softStyles[4] = new Array();
			softStyles[4][0] = "software/images/soft_promotional_win";
			softStyles[4][1] = "2";
			softStyles[5] = new Array();
			softStyles[5][0] = "software/images/soft_mailer_win";
			softStyles[5][1] = "4";
			softStyles[6] = new Array();
			softStyles[6][0] = "software/images/soft_ret_win";
			softStyles[6][1] = "1";
			softStyles[7] = new Array();
			softStyles[7][0] = "software/images/soft_insert_win";
			softStyles[7][1] = "1";
			softStyles[8] = new Array();
			softStyles[8][0] = "software/images/soft_corrugated_win";
			softStyles[8][1] = "2";


//foodStyles are the image file names for the food styles page
var foodStyles = new Array(12);
			foodStyles[0] = new Array();
			foodStyles[0][0] = "10";  // Number of products in category
			foodStyles[1] = new Array();
			foodStyles[1][0] = "food/images/food_tuck_win";
			foodStyles[1][1] = "6";
			foodStyles[2]= new Array();
			foodStyles[2][0] = "food/images/food_seal_win";
			foodStyles[2][1] = "1";
			foodStyles[3] = new Array();
			foodStyles[3][0] = "food/images/food_autolock_win";
			foodStyles[3][1] = "2";
			foodStyles[4] = new Array();
			foodStyles[4][0] = "food/images/food_snap_win";
			foodStyles[4][1] = "1";
			foodStyles[5] = new Array();
			foodStyles[5][0] = "food/images/food_sleeve_win";
			foodStyles[5][1] = "1";
			foodStyles[6] = new Array();
			foodStyles[6][0] = "food/images/food_gable_win";
			foodStyles[6][1] = "2";

			foodStyles[7] = new Array();
			foodStyles[7][0] = "food/images/food_ret_win";
			foodStyles[7][1] = "3";

			foodStyles[8] = new Array();
			foodStyles[8][0] = "food/images/food_tea2_win";
			foodStyles[8][1] = "4";

			foodStyles[9] = new Array();
			foodStyles[9][0] = "food/images/food_tea_win";
			foodStyles[9][1] = "3";
			foodStyles[10] = new Array();
			foodStyles[10][0] = "food/images/food_snappop_win";
			foodStyles[10][1] = "2";
			foodStyles[11] = new Array();
			foodStyles[11][0] = "food/images/food_rettpop_win";
			foodStyles[11][1] = "2";

			foodStyles[12] = new Array();
			foodStyles[12][0] = "food/images/food_blank_win";
			foodStyles[12][1] = "1";
			foodStyles[13] = new Array();
			foodStyles[13][0] = "food/images/food_different_win";
			foodStyles[13][1] = "1";

			
//cosmStyles are the image file names for the cosmetic styles page
var cosmStyles = new Array(15);
			cosmStyles[0] = new Array();
			cosmStyles[0][0] = "13";  // Number of products in category
			cosmStyles[1] = new Array();
			cosmStyles[1][0] = "cosmetic/images/cosm_compact_win";
			cosmStyles[1][1] = "3";
			cosmStyles[2]= new Array();
			cosmStyles[2][0] = "cosmetic/images/cosm_jar_win";
			cosmStyles[2][1] = "5";
			cosmStyles[3] = new Array();
			cosmStyles[3][0] = "cosmetic/images/cosm_moist_win";
			cosmStyles[3][1] = "4";
			cosmStyles[4] = new Array();
			cosmStyles[4][0] = "cosmetic/images/cosm_perfume_win";
			cosmStyles[4][1] = "4";
			cosmStyles[5] = new Array();
			cosmStyles[5][0] = "cosmetic/images/cosm_lip_win";
			cosmStyles[5][1] = "5";
			cosmStyles[6] = new Array();
			cosmStyles[6][0] = "cosmetic/images/cosm_sleeve_win";
			cosmStyles[6][1] = "3";
			cosmStyles[7] = new Array();
			cosmStyles[7][0] = "cosmetic/images/cosm_tube_win";
			cosmStyles[7][1] = "2";
			cosmStyles[8] = new Array();
			cosmStyles[8][0] = "cosmetic/images/cosm_POP_win";
			cosmStyles[8][1] = "5";
			cosmStyles[9] = new Array();
			cosmStyles[9][0] = "cosmetic/images/cosm_lbdispenser_win";
			cosmStyles[9][1] = "2";
			cosmStyles[10] = new Array();
			cosmStyles[10][0] = "cosmetic/images/cosm_spa_win";
			cosmStyles[10][1] = "6";
			cosmStyles[11] = new Array();
			cosmStyles[11][0] = "cosmetic/images/cosm_promo_win";
			cosmStyles[11][1] = "1";
			cosmStyles[12] = new Array();
			cosmStyles[12][0] = "cosmetic/images/cosm_promo_win";
			cosmStyles[12][1] = "1";
			cosmStyles[13] = new Array();
			cosmStyles[13][0] = "cosmetic/images/cosm_promo_win";
			cosmStyles[13][1] = "1";
			cosmStyles[14] = new Array();
			cosmStyles[14][0] = "cosmetic/images/cosm_stockpop_win";
			cosmStyles[14][1] = "1";

//lipbalmStyles are the image file names for the cosmetic styles page
var lipbalmStyles = new Array(11);
			lipbalmStyles[0] = new Array();
			lipbalmStyles[0][0] = "9";  // Number of products in category
			lipbalmStyles[1] = new Array();
			lipbalmStyles[1][0] = "lipbalm/images/lipbalm_tubes_win";
			lipbalmStyles[1][1] = "5";
			lipbalmStyles[2]= new Array();
			lipbalmStyles[2][0] = "lipbalm/images/lipbalm_tins_win";
			lipbalmStyles[2][1] = "1";
			lipbalmStyles[3] = new Array();
			lipbalmStyles[3][0] = "lipbalm/images/lipbalm_dispenser_win";
			lipbalmStyles[3][1] = "4";
			lipbalmStyles[4] = new Array();
			lipbalmStyles[4][0] = "lipbalm/images/lipbalm_box_win";
			lipbalmStyles[4][1] = "2";
			lipbalmStyles[5] = new Array();
			lipbalmStyles[5][0] = "lipbalm/images/lipbalm_sleeve_win";
			lipbalmStyles[5][1] = "2";
			lipbalmStyles[6] = new Array();
			lipbalmStyles[6][0] = "lipbalm/images/lipbalm_collar_win";
			lipbalmStyles[6][1] = "1";
			lipbalmStyles[7] = new Array();
			lipbalmStyles[7][0] = "lipbalm/images/lipbalm_insert_win";
			lipbalmStyles[7][1] = "2";
			lipbalmStyles[8] = new Array();
			lipbalmStyles[8][0] = "lipbalm/images/lipbalm_blank_win";
			lipbalmStyles[8][1] = "1";
			lipbalmStyles[9] = new Array();
			lipbalmStyles[9][0] = "lipbalm/images/lipbalm_blank_win";
			lipbalmStyles[9][1] = "1";
			lipbalmStyles[10] = new Array();
			lipbalmStyles[10][0] = "lipbalm/images/lipbalm_stockpop_win";
			lipbalmStyles[10][1] = "1";


//cosmResources are the image file names for the cosmetic styles page
var cosmResources = new Array(19);
			cosmResources[0] = new Array();
			cosmResources[0][0] = "18";  // Number of products in category
			cosmResources[1] = new Array();
			cosmResources[1][0] = "cosmetic/resources/images/welcome_win";
			cosmResources[1][1] = "1";
			cosmResources[2] = new Array();
			cosmResources[2][0] = "cosmetic/resources/images/prism_win";
			cosmResources[2][1] = "1";
			cosmResources[3]= new Array();
			cosmResources[3][0] = "cosmetic/resources/images/alliance_win";
			cosmResources[3][1] = "2";
			cosmResources[4] = new Array();
			cosmResources[4][0] = "cosmetic/resources/images/barcodes_win";
			cosmResources[4][1] = "1";
			cosmResources[5] = new Array();
			cosmResources[5][0] = "cosmetic/resources/images/graphicdesign1_win";
			cosmResources[5][1] = "1";
			cosmResources[6] = new Array();
			cosmResources[6][0] = "cosmetic/resources/images/graphicdesign2_win";
			cosmResources[6][1] = "1";
			cosmResources[7] = new Array();
			cosmResources[7][0] = "cosmetic/resources/images/rbierweiler_win";
			cosmResources[7][1] = "1";
			cosmResources[8] = new Array();
			cosmResources[8][0] = "cosmetic/resources/images/ingredients_win";
			cosmResources[8][1] = "1";
			cosmResources[9] = new Array();
			cosmResources[9][0] = "cosmetic/resources/images/bottles_win";
			cosmResources[9][1] = "1";
			cosmResources[10] = new Array();
			cosmResources[10][0] = "cosmetic/resources/images/labels_win";
			cosmResources[10][1] = "1";
			cosmResources[11] = new Array();
			cosmResources[11][0] = "cosmetic/resources/images/containers_win";
			cosmResources[11][1] = "1";
			cosmResources[12] = new Array();
			cosmResources[12][0] = "cosmetic/resources/images/tubes_win";
			cosmResources[12][1] = "1";
			cosmResources[13] = new Array();
			cosmResources[13][0] = "cosmetic/resources/images/equipment_win";
			cosmResources[13][1] = "1";
			cosmResources[14] = new Array();
			cosmResources[14][0] = "cosmetic/resources/images/boxcoop_win";
			cosmResources[14][1] = "6";
			cosmResources[15] = new Array();
			cosmResources[15][0] = "cosmetic/resources/images/test_win";
			cosmResources[15][1] = "1";
			cosmResources[16] = new Array();
			cosmResources[16][0] = "cosmetic/resources/images/barcodes_win";
			cosmResources[16][1] = "1";
			cosmResources[17] = new Array();
			cosmResources[17][0] = "cosmetic/resources/images/test_win";
			cosmResources[17][1] = "1";
			cosmResources[18] = new Array();
			cosmResources[18][0] = "cosmetic/resources/images/join_win";
			cosmResources[18][1] = "1";
			
//soapResources are the image file names for the cosmetic styles page
var soapResources = new Array(18);
			soapResources[0] = new Array();
			soapResources[0][0] = "16";  // Number of products in category
			soapResources[1] = new Array();
			soapResources[1][0] = "bathbody/resources/images/welcome_win";
			soapResources[1][1] = "1";
			soapResources[2] = new Array();
			soapResources[2][0] = "bathbody/resources/images/prism_win";
			soapResources[2][1] = "1";
			soapResources[3]= new Array();
			soapResources[3][0] = "bathbody/resources/images/equipment_win";
			soapResources[3][1] = "1";
			soapResources[4] = new Array();
			soapResources[4][0] = "bathbody/resources/images/marketing_win";
			soapResources[4][1] = "5";
			soapResources[5] = new Array();
			soapResources[5][0] = "bathbody/resources/images/graphicdesign1_win";
			soapResources[5][1] = "1";
			soapResources[6] = new Array();
			soapResources[6][0] = "bathbody/resources/images/graphicdesign2_win";
			soapResources[6][1] = "1";
			soapResources[7] = new Array();
			soapResources[7][0] = "bathbody/resources/images/rbierweiler_win";
			soapResources[7][1] = "1";
			soapResources[8] = new Array();
			soapResources[8][0] = "bathbody/resources/images/ingredients_win";
			soapResources[8][1] = "1";
			soapResources[9] = new Array();
			soapResources[9][0] = "bathbody/resources/images/bottles_win";
			soapResources[9][1] = "1";
			soapResources[10] = new Array();
			soapResources[10][0] = "bathbody/resources/images/labels_win";
			soapResources[10][1] = "1";
			soapResources[11] = new Array();
			soapResources[11][0] = "bathbody/resources/images/containers_win";
			soapResources[11][1] = "1";
			soapResources[12] = new Array();
			soapResources[12][0] = "bathbody/resources/images/tubes_win";
			soapResources[12][1] = "1";
			soapResources[13] = new Array();
			soapResources[13][0] = "bathbody/resources/images/fulfillment_win";
			soapResources[13][1] = "1";
			soapResources[14] = new Array();
			soapResources[14][0] = "bathbody/resources/images/test_win";
			soapResources[14][1] = "1";
			soapResources[15] = new Array();
			soapResources[15][0] = "bathbody/resources/images/barcodes_win";
			soapResources[15][1] = "1";
			soapResources[16] = new Array();
			soapResources[16][0] = "bathbody/resources/images/test_win";
			soapResources[16][1] = "1";
			soapResources[17] = new Array();
			soapResources[17][0] = "bathbody/resources/images/join_win";
			soapResources[17][1] = "1";

			//lipBalmLanding are the image file names for the Lip Balm POP landing page
			var lipBalmLanding = new Array(5);
			lipBalmLanding[0] = new Array();
			lipBalmLanding[0][0] = "4";  // Number of products in category
			lipBalmLanding[1] = new Array();
			lipBalmLanding[1][0] = "tradeshow/images/lipbalm_win";
			lipBalmLanding[1][1] = "1";
			lipBalmLanding[2] = new Array();
			lipBalmLanding[2][0] = "tradeshow/images/std_standard_win";
			lipBalmLanding[2][1] = "1";
			lipBalmLanding[3] = new Array();
			lipBalmLanding[3][0] = "tradeshow/images/std_soap_win";
			lipBalmLanding[3][1] = "1";
			lipBalmLanding[4] = new Array();
			lipBalmLanding[4][0] = "tradeshow/images/std_candle_win";
			lipBalmLanding[4][1] = "1";
			
			
			//medicalStyles
			var medicalStyles = new Array(7);
			medicalStyles[0] = new Array();
			medicalStyles[0][0] = "3";  // Number of products in category
			medicalStyles[1] = new Array();
			medicalStyles[1][0] = "medical/images/medical_tuck_win";
			medicalStyles[1][1] = "2";
			medicalStyles[2] = new Array();
			medicalStyles[2][0] = "medical/images/medical_snaplock_win";
			medicalStyles[2][1] = "2";
			medicalStyles[3] = new Array();
			medicalStyles[3][0] = "medical/images/medical_autolock_win";
			medicalStyles[3][1] = "3";
			medicalStyles[4] = new Array();
			medicalStyles[4][0] = "medical/images/medical_ret_win";
			medicalStyles[4][1] = "3";
			medicalStyles[5]= new Array();
			medicalStyles[5][0] = "medical/images/medical_diagnostic_win";
			medicalStyles[5][1] = "5";
			medicalStyles[6]= new Array();
			medicalStyles[6][0] = "medical/images/medical_diagnostic_win";
			medicalStyles[6][1] = "5";
			medicalStyles[7] = new Array();
			medicalStyles[7][0] = "medical/images/medical_home_win";
			medicalStyles[7][1] = "4";

			
			function textMedical(key)
			{
			var textA = new Array();
			textA[1] = 'Compact storage, easy to assemble, the tuck end allows for easy fulfilment of your medical kits and products. Custom inserts are available to hold product securely, hang-tab also available to allow for hanging on a retail rack.';
			textA[2] = 'Cost effective, easy storage, bottom requires hand assembly, effective presentation of your medical kits and products, with custom inserts available to securely hold your kit components.';	
			textA[3] = 'Strong, easy to store and assemble, when box folded in square, reinforced bottom pops into place, allowing quick fulfilment of your medical kits and product, custom inserts available to hold kit completry securely.';
			textA[4] = 'Very cost-effective, with attractive presentation of your medical kits and accessories, box opens like a treasure chest. Custom inserts are available to securely contain kit elements';
			textA[5] = 'Assay style kits for quantitative testing/analysis; immnuoassays, bioassays, enzyme & antigen detection, reagents, etc. Different box styles depending on applications. Custom paper or foam inserts available to secure kit components.';
			textA[6] = 'Assay style kits for quantitative testing/analysis; immnuoassays, bioassays, enzyme & antigen detection, reagents, etc. Different box styles depending on applications. Custom paper or foam inserts available to secure kit components.';
			textA[7] = 'Boxes typically used for home and product rapid assay kits, including drug and alcohol, pregnancy and paternity, cholesterol, and diabetes testing. Paper or foam can be added as needed.';
			
			
				//alert(key);	
				//alert(textA[key]);
				document.getElementById('textMedical').innerHTML = textA[key]; /* maybe use jQuery */
		
			}

			
			
			
			
			
			//resourceDemo are the image file names for the resource demonstration page
			var resourceDemo = new Array(5);
			resourceDemo[0] = new Array();
			resourceDemo[0][0] = "4";  // Number of products in category
			resourceDemo[1] = new Array();
			resourceDemo[1][0] = "resource_demo/images/intro_win";
			resourceDemo[1][1] = "1";
			resourceDemo[2] = new Array();
			resourceDemo[2][0] = "resource_demo/images/you_win";
			resourceDemo[2][1] = "1";
			resourceDemo[3] = new Array();
			resourceDemo[3][0] = "resource_demo/images/us_win";
			resourceDemo[3][1] = "1";
			resourceDemo[4] = new Array();
			resourceDemo[4][0] = "resource_demo/images/us_win";
			resourceDemo[4][1] = "1";

			resourceDemo[5] = new Array();
			resourceDemo[5][0] = "resource_demo/images/boxcoop_win";
			resourceDemo[5][1] = "6";


//soapStyles are the image file names for the soap styles page
var homeStyles = new Array(9);
			homeStyles[0] = new Array();
			homeStyles[0][0] = "8";  // Number of products in category
			homeStyles[1] = new Array();
			homeStyles[1][0] = "home_images/standard_collage";
			homeStyles[1][1] = "1";
			homeStyles[2] = new Array();
			homeStyles[2][0] = "home_images/bbspa_collage";
			homeStyles[2][1] = "1";
			homeStyles[3] = new Array();
			homeStyles[3][0] = "home_images/candle_collage";
			homeStyles[3][1] = "1";
			homeStyles[4] = new Array();
			homeStyles[4][0] = "home_images/software_collage";
			homeStyles[4][1] = "1";

			homeStyles[5] = new Array();
			homeStyles[5][0] = "home_images/food_collage";
			homeStyles[5][1] = "1";

			homeStyles[6] = new Array();
			homeStyles[6][0] = "home_images/cosmetics_collage";
			homeStyles[6][1] = "1";
			homeStyles[7] = new Array();
			homeStyles[7][0] = "home_images/lipbalm_collage";
			homeStyles[7][1] = "1";
			homeStyles[8] = new Array();
			homeStyles[8][0] = "home_images/standard_collage";
			homeStyles[8][1] = "1";
			
			
			

			
			// Current styles array
			styles = new Array();
				
// displayArray contains the filenames of the main window and the thumbs.
// displayArray [0][0] contains the current function key.
// displayArray [0][1] contains the total number of images for this style.
// displayArray [0][2] contains the current image pointer.
			var maxDisplayElements = 7;
			var display = new Array(6);
				display[0] = new Array(3);
				display[0][0] = 0;
				display[0][1] = 1;
				display[0][2] = 1;

// setStylesArray loads the styles array with the current pages' box style elements
// who: string specifying what html page is calling
function setStylesArray (who)

{
  styles = "";  // De-allocate current array
  switch (who)
    {
		case "standard":
		  styles = stdStyles;
		  break;
		case "bathbody":
		  styles = bathbodyStyles;
		  break;
  		case "candle":
		  styles = candleStyles;
		  break;
		case "software":  
		  styles = softStyles;
		  break;
		case "food":  
		  styles = foodStyles;
		  break;
		case "cosmetic":
		  styles = cosmStyles;
		  break;
		case "lipbalm":
		  styles = lipbalmStyles;
		  break;
		case "medical":
		  styles = medicalStyles;
		  break;
		case "cosmetic resources":
		  styles = cosmResources;
		  break;
		case "soap resources":
		  styles = soapResources;
		  break;
		case "lip balm":
		  styles = lipBalmLanding;
		  break;
		case "resource demo":
		  styles = resourceDemo;
		  break;
  		case "home":
		  styles = homeStyles;
		  break;
		default:
		  styles = stdStyles;
	}
}


function silentpreloader(osc) {
//silentpreloader start
showfirst(osc);
showthumb(osc);
showlast(osc);
//silentpreloader end

}

function preloader(osc) {
//preloader start
showfirst(osc);
displayImages(true,1);
//showmain(osc);
showthumb(osc);
showlast(osc);
//preloader end

}
// show first images
function showfirst(osc) {
      for (var i = 0; i < osc.length; i++) {
if (osc[i][1]) {
var x = osc[i][1];
x++;
var mainpath = osc[i][0]+"1.jpg";
MM_preloadImages(mainpath);
			}
		}
}

//show last images
function showlast(osc) {
      for (var i = 0; i < osc.length; i++) {
if (osc[i][1]) {
var x = osc[i][1];
x++;
for (var j = 2; j < x; j++) {
var mainpath = osc[i][0]+j+".jpg";
MM_preloadImages(mainpath);
				}
			}
		}
}

//main image preloader
function showmain(osc) {
var z = 1;
      for (var i = 0; i < osc.length; i++) {
if (osc[i][1]) {
var x = osc[i][1];
x++;
for (var j = 1; j < x; j++) {
var mainpath = osc[i][0]+j+".jpg";
MM_preloadImages(mainpath);
/*
var mainpic = "mainpic"+z;
mainpic = new Image();
mainpic.src=mainpath;
*/
z++;
				}
			}
		}
}
//thumbnail preloader
function showthumb(osc) {
var z = 1;
      for (var i = 0; i < osc.length; i++) {
if (osc[i][1]) {
var x = osc[i][1];
x++;
for (var j = 1; j < x; j++) {
var mainpath = osc[i][0]+j+".jpg";
var thumbpath = mainpath.replace('win','thumb');
MM_preloadImages(thumbpath);
/*
var thumbpic = "thumbpic"+z;
thumbpic = new Image();
thumbpic.src=thumbpath;
*/
z++;
				}
			}
		}
}
//////

function showresources(id) {
      for (var i = 0; i < styles.length; i++) {
        if (styles[i][1]){

if (document.getElementById(["resource" + i])) {
//layerVisibility(["resource" + i], 0);
document.getElementById(["resource" + i]).style.display='none';

  }
        }

		}
if (document.getElementById(["resource" + id])) {
//	layerVisibility(["resource" + id], 1);
document.getElementById(["resource" + id]).style.display='block';
	}
}

/////
function layerVisibility (divID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[divID] :
   document.getElementById ?  document.getElementById(divID).style :
   document.all[divID].style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}
		
// tab to next thumbnail image
// imageID contains the image to go to
function tabNextThumb (imageID)

{
var tempStr = "";

  if (display[0][2] != imageID) //Only change the current image pointer if it's a new
    {								// thumbnail image rollover
      // A thumbnail rollover has occurred.  Reset the main image to the current thumbnail.
	  display[0][2] = imageID;
	  tempStr = display[1];
	  display[1] = display[1].substring(0,display[1].lastIndexOf(".")-1) + imageID;
	  display[1] = display [1] + tempStr.substring(tempStr.lastIndexOf("."));
	}
	showresources(display[0][0]);
	//showresources(display[0][0],display[0][2]);
	
}

// This function tabs to the next/previous thumbnail image as a result of the user
// hitting the next/previous arrow keys.
// next: boolean value indicating if the image tabs to the next or previous image
function tabNextImage (next)

{
var tempIndex = "";

  // assign the current image pointer to a temp string so function tabNextImage can be used to set
  // the new main image name
  tempIndex = display[0][2];
  
  if (display[0][1] > 1) // Check to see if there is more than one image
    {
    if (next) // Tab to the next image
	  if (display[0][1] == tempIndex) // Is current pointer already pointing at the last image
	    tempIndex = 1; // Set current pointer to the first image
	  else
	    tempIndex++;  // Set current pointer to the next image
	else // Tab to previous image
	  if (tempIndex == 1)
	    tempIndex = display[0][1];
	  else
	     tempIndex--;
		 
	// Change the main image name in the display array	 
	tabNextThumb(tempIndex);
	display[0][2] = tempIndex;
	}
}
				
// This function fills the image array if necessary, and displays the new images
// newImageSet: indicates a new style function key has been rolled over.  Load up new images
// styleKey: indicates the current style function key that was rolled over
// imageID: A thumbnail image was rolled over.  Reset the current image pointer

function displayImages (newImageSet,styleKey)

{
var i = 0;
var showImages = true;

  
  // Check to see if this a new function key rollover, or a thumbnail index/rollover
  if (newImageSet)
  
	//Check to see if it's necessary
    // to fill the display array again
   	if (display[0][0] != styleKey)
    {
	  // A new function key has been rolled over. Hide the previous image's forward/back index keys
	  if (display[0][1] > 1)
	    if (styleKey == 0) // This is initial display.  Turn off the image paging key layers
		  for (i=1; i<=styles[0][0]; i++)
		    layerVisibility ("imageTab" + i, 0);
		    
		else 
	      layerVisibility ("imageTab" + display[0][0], 0)
	      
		
	  // Refill the display array
	  display[0][0] = styleKey; 			// current function key
	  display[0][1] = styles[styleKey][1]	// total number of thumbnails
	  display[0][2] = 1;					// current image pointer
	  
	  //Put the new main image in the display array
	  display[1] = styles[styleKey][0] + display[0][2] + ".jpg";
	  for (i=1; i<maxDisplayElements; i++)
	    {
	      // Assign a blank thumbnail window just in case
	      display[i+1]= "blank_thumb.jpg"
		
	      if (display[0][1] >= i)
		    {
			  // If there's only one image, don't display a thumbnail
			  if (display[0][1] > 1)
			  
			  {
		        // Put the new thumbnail image in the display array
		        display[i+1] = styles[styleKey][0]
			    display[i+1] = 
			      display[i].substring(0,display[i].lastIndexOf("_")+1) + "thumb" + i + ".jpg";
			      
			  }
	        }
		}		  
	}
	else
	  showImages = false;
	  	
  if (showImages)
  {
    // Display the new images
	document.images ["main"].src = display[1];
	
	// Turn on the image paging keys if more than one image to display
	if (display[0][1] > 1)
	  layerVisibility("imageTab" + display[0][0], 1)
	  
	// Assign thumbnail image and set visibility
    for (i=1; i<=maxDisplayElements-1; i++)
	{
                document.images ["thumb_" + i].src = display[i+1];

	  if (i == display[0][2]) { // Highlight the current image
	    document.images ["thumb_" + i].border = 1; // changed from 2
	    if (document.all||document.getElementById){
         // document.images ["thumb_" + i].style.borderColor='#197338';
         document.getElementById(["thumb_" + i]).style.borderColor='#ff0000';
}
	    }

	  else {
	    document.images ["thumb_" + i].border = 1;
	    	    if (document.all||document.getElementById){
        //document.images ["thumb_" + i].style.borderColor='#168bb8';
        document.getElementById(["thumb_" + i]).style.borderColor='#168bb8';
	    }
}
	  if (display[0][1] > 1 && i <= display[0][1]) {
	    layerVisibility ("thumb" + i, 1);  // Turn visibility on
        }
	  else {
	    layerVisibility ("thumb" + i, 0); // Turn visibility off
	    }
	}
  }

}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

//Highlight Image Script II
function borderit(which,color){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
which.style.borderColor=color
}
}

//Script to make the box quote appear and the textbox hidden
function showqsforms() {
/*
   layerVisibility('stock',0);
   layerVisibility('nonstock',0);
   layerVisibility('qsforms',1);
*/
var toggle1 = new getObj('qsforms')
var toggle2 = new getObj('stock')
var toggle3 = new getObj('nonstock')

toggle1.style.display='block';
toggle2.style.display='none';
toggle3.style.display='none';


}

function showstock() {
/*
   layerVisibility('qsforms',0);
   layerVisibility('nonstock',0);
   layerVisibility('stock',1);
*/

var toggle1 = new getObj('qsforms')
var toggle2 = new getObj('stock')
var toggle3 = new getObj('nonstock')

toggle1.style.display='none';
toggle2.style.display='block';
toggle3.style.display='none';

}

function shownonstock() {
/*
   layerVisibility('qsforms',0);
   layerVisibility('stock',0);
   layerVisibility('nonstock',1);
*/

var toggle1 = new getObj('qsforms')
var toggle2 = new getObj('stock')
var toggle3 = new getObj('nonstock')

toggle1.style.display='none';
toggle2.style.display='none';
toggle3.style.display='block';

}

function specialtext2text(){
  var toggle1 = new getObj('specialtextArea');
    if (toggle1.style.visibility == 'visible') {
   layerVisibility('textArea', 1);
   layerVisibility('specialtextArea', 0);
}
}
function stock2box() {
var toggle1 = new getObj('boxquote');
    if (toggle1.style.visibility == 'visible') {
   layerVisibility('stockquote', 1);
   layerVisibility('boxquote', 0);
}
}
function box2stock() {
var toggle1 = new getObj('stockquote');
    if (toggle1.style.visibility == 'visible') {
   layerVisibility('boxquote', 1);
   layerVisibility('stockquote', 0);
}
}
//for the box quote form, copied form the existing site
function showDate(){
			myMonth= new Array("January","February","March","April","May","June","July","August","September","October","November","December")
			myHour= new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23")
			myMinute= new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59")
			mySecond= new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59")
    //	myDay= new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    	now = new Date()
    	year = now.getFullYear()
   	    month = now.getMonth()
				hours = now.getHours()
				minutes = now.getMinutes()
				seconds = now.getSeconds()
		todayday = now.getDay()
   		day = now.getDate()
    	if(day<10) day = "0" + String(day);
    	today = (myMonth[month]+' '+day+', '+year)
			time = (myHour[hours]+':'+myMinute[minutes]+':'+mySecond[seconds])
			//document.write(today);
			//document.write(time);
			document.quotation.tDate.value=today;
			document.quotation.tTime.value=time;
}
//changing the drop down box to show the box styles
function stylestd(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkstd(document.quotation.boxStyle.value)
}
function stylebathbody(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkbathbody(document.quotation.boxStyle.value)
}
function stylestock(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkbathbody(document.quotation.boxStyle.value)
}
function stylecandle(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkcandle(document.quotation.boxStyle.value)
}
function stylecosm(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkcosm(document.quotation.boxStyle.value)
}
function stylesoft(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checksoft(document.quotation.boxStyle.value)
}
function stylefood(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checksoft(document.quotation.boxStyle.value)
}
function stylelipbalm(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checklipbalm(document.quotation.boxStyle.value)
}
function stylemedical(key){
document.quotation.boxStyle.value=key
document.sample.boxStyle.value=key
checkmedical(document.quotation.boxStyle.value)
}
function resetform()
{
// document.quotation.reset();
}

function submitform()
{
  document.quotation.submit();
}


//
function validatenum(field) {
//var field = document.quotation.telephone.value;
var valid = "0123456789-";
var hyphencount = 0;
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your Telephone Number.");
document.quotation.telephone.value='';
document.quotation.telephone.focus();
return false;
}
}
}
//

//Form validation
function validateform1()
{ //v3.0
/*
if(document.quotation.boxStyle.value=="")
	{
		alert("Enter BoxStyle!!.")
		document.quotation.boxStyle.focus();
		return false;
	}
if(document.quotation.boxLength.value=="")
	{
		alert("Enter BoxLength!!!.")
		document.quotation.boxLength.focus();
		return false;
	}
if(document.quotation.boxWidth.value=="")
	{
		alert("Enter BoxWidth!!!.")
		document.quotation.boxWidth.focus();
		return false;
	}
if(document.quotation.boxDepth.value=="")
	{
		alert("Enter BoxDepth!!!.")
		document.quotation.boxDepth.focus();
		return false;
	}
if(document.quotation.boxHeight.value=="")
	{
		alert("Enter the BoxHeight!!.")
		document.quotation.boxHeight.focus();
		return false;
	}
if(document.quotation.hangTab.value=="")
	{
		alert("Enter HangTab!!!.")
		document.quotation.hangTab.focus();
		return false;
	}
if(document.quotation.paper_thickness.value=="")
	{
		alert("Enter Paper Thickness!!!.")
		document.quotation.paper_thickness.focus();
		return false;
	}
if(document.quotation.lowqty.value=="")
	{
		alert("Enter Qty1!!.")
		document.quotation.lowqty.focus();
		return false;
	}
if(document.quotation.highqty.value=="")
	{
		alert("Enter Qty2!!.")
		document.quotation.highqty.focus();
		return false;
	}

if(document.quotation.company.value=="")
	{
		alert("Enter Company!!.")
		document.quotation.company.focus();
		return false;
	}
*/
if(document.quotation.name.value=="")
	{
		alert("Enter your name.")
		document.quotation.name.focus();
		return false;
	}
if(document.quotation.telephone.value=="")
	{
		alert("Enter your telephone number.")
		document.quotation.telephone.focus();
		return false;
	}
/*
    else{
var field = document.quotation.telephone.value;
var valid = "0123456789-";
var hyphencount = 0;
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your Telephone Number.");
document.quotation.telephone.value='';
document.quotation.telephone.focus();
return false;
}
}
}
*/

if(document.quotation.email.value=="")
	{
		alert("Enter your email address.")
		document.quotation.email.focus();
		return false;
	}
if(emailCheck(document.quotation.email.value)==false)
	{
		   document.quotation.email.select();
		   document.quotation.email.focus();
		   return false;
	}
submitform();
resetform();
}
//##########FUNCTION TO CHECK THE PROPER EMAIL FIELD###############//

function emailCheck (emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
	alert("Email address seems incorrect (check @ and .'s)")
	return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
    alert("The username doesn't seem to be valid.")
    return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        alert("Email destination IP address is invalid.")
		return false
	    }
    }
    return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
	alert("The domain name doesn't seem to be valid.")
    return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
    domArr[domArr.length-1].length>3) {
   alert("The email address must end in a three-letter domain, or two letter country.")
   return false
}
if (len<2) {
   var errStr="This email address is missing a hostname."
   alert(errStr)
   return false
}
return true;
}
//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="red"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
function testit(){
  document.quotation.boxLength.style.backgroundColor='#FF0000';
  document.quotation.boxLength.style.borderColor='#FFFFFF';
}
function checkstd(no){
  if (no == 8 || no == 12){
document.quotation.boxDepth.style.backgroundColor='#999999';
document.quotation.boxDepth.value=' ';
document.quotation.boxDepth.disabled=true;
changeCol1('#010662');
  }
else {document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');
}
  if (no != 4){
document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
  }
else {document.quotation.boxHeight.value='';
document.quotation.boxHeight.disabled=false;
document.quotation.boxHeight.style.backgroundColor='#FFFFCC';
changeCol2('#010662');
}
}
////////////////
function checkbathbody(no){
  if (no == 10){
//document.stockquotation.boxDepth.style.backgroundColor='#999999';
//document.quotation.boxLength.value='2.375"';
//document.quotation.boxWidth.value='1.1875"';
//document.quotation.boxDepth.value='3.25"';
//document.stockquotation.boxDepth.disabled=true;
//changeCol1('#010662');
  }
  if (no == 11){
//document.quotation.boxLength.value='3.5"';
//document.quotation.boxWidth.value='2.75"';
//document.quotation.boxDepth.value='1.25"';
  }
  if (no == 12){
//document.quotation.boxLength.value='3"';
//document.quotation.boxWidth.value='3"';
//document.quotation.boxDepth.value='1.25"';
  }

document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;

}
/////////////////
function checkcandle(no){
  if (no == 7){
document.quotation.boxDepth.style.backgroundColor='#999999';
document.quotation.boxDepth.value=' ';
document.quotation.boxDepth.disabled=true;
changeCol1('#010662');
  }
else {document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');
}
document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');

}
/////////////////
function checkcosm(no){
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');

document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
}
/////////////////

function checklipbalm(no){
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');

document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
}
/////////////////

function checksoft(no){
  if (no == 4 || no == 5){
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
changeCol1('#010662');
  }
else {document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');
}
document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value='';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
////hangTab
  if (no == 4 || no == 5 || no == 7){
document.quotation.hangTab.style.backgroundColor='#999999';
document.quotation.hangTab.value='';
document.quotation.hangTab.disabled=true;
changeCol3('#010662');
  }
else {document.quotation.hangTab.value='';
document.quotation.hangTab.disabled=false;
document.quotation.hangTab.style.backgroundColor='#FFFFCC';
changeCol3('#FFFFFF');
}
////
}


///////////////////

function checkfood(no){
  if (no == 4 || no == 5){
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
changeCol1('#010662');
  }
else {document.quotation.boxDepth.value='';
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');
}
document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value='';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
////hangTab
  if (no == 7){
document.quotation.hangTab.style.backgroundColor='#999999';
document.quotation.hangTab.value='';
document.quotation.hangTab.disabled=true;
changeCol3('#010662');
  }
else {document.quotation.hangTab.value='';
document.quotation.hangTab.disabled=false;
document.quotation.hangTab.style.backgroundColor='#FFFFCC';
changeCol3('#FFFFFF');
}
////
}

/////////////////
function checkmedical(no){
document.quotation.boxDepth.disabled=false;
document.quotation.boxDepth.style.backgroundColor='#FFFFCC';
changeCol1('#010662');

document.quotation.boxHeight.style.backgroundColor='#999999';
document.quotation.boxHeight.value=' ';
document.quotation.boxHeight.disabled=true;
changeCol2('#010662');
}
/////////////////


///////////////////
var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function invi(flag)
{
	if (!DHTML) return;
	var x = new getObj('text');
	x.style.visibility = (flag) ? 'hidden' : 'visible'
}

var texttop = 400;

function move(amount)
{
	if (!DHTML) return;
	var x = new getObj('text');
	texttop += amount;
	x.style.top = texttop;
}


function changeCol1(col)
{
	if (!DHTML) return;
	var x = new getObj('labelnotreq1');
	x.style.color = col;
}
function changeCol2(col)
{
	if (!DHTML) return;
	var x = new getObj('labelnotreq2');
	x.style.color = col;
}

function changeCol3(col)
{
	if (!DHTML) return;
	var x = new getObj('labelnotreq3');
	x.style.color = col;
}

function hidesubboxes()
{
  layerVisibility('subboxes', 0);
//  setTimeout("layerVisibility('subboxes', 0)",0000);
}
function viewsubboxes()
{
  layerVisibility('subboxes', 1);
//  setTimeout("layerVisibility('subboxes', 1)",0000);
}

function togglequote2sample() {
var toggle1 = new getObj('boxquote');
var toggle2 = new getObj('samplebox');

  toggle1.style.display = 'none';
  toggle2.style.display = 'block';
  document.getElementById('requesttype').value='Quote';

  document.getElementById('ontab').src='images/samples_on.gif';
  document.getElementById('offtab').src='images/quotes_off.gif';

}

function togglesample2quote() {
var toggle1 = new getObj('boxquote');
var toggle2 = new getObj('samplebox');

	toggle2.style.display = 'none';
	toggle1.style.display = 'block';
  document.getElementById('requesttype').value='Sample';

  document.getElementById('ontab').src='images/quotes_on.gif';
  document.getElementById('offtab').src='images/samples_off.gif';

}
///

function toggleforms(source) {

    //if(source == 'http://www.boxcoop.com/images/samples_off.gif' || source == 'http://boxcoop.com/images/samples_off.gif') {
    if(source.indexOf("samples_off.gif") > -1 || source.indexOf("samples_off2.gif") > -1){
    var toggle1 = new getObj('boxquote');
    var toggle2 = new getObj('samplebox');
	
	//alert('sample was off, now quote will be off');
    
    toggle1.style.display = 'none';
    toggle2.style.display = 'block';
    
    document.getElementById('requesttype').value='Sample';
    
    document.getElementById('ontab').src='images/quotes_off2.gif';
    document.getElementById('offtab').src='images/samples_off2.gif'; //same as sample_on
    
    }

    //if(source == 'http://www.boxcoop.com/images/quotes_off.gif' || source == 'http://boxcoop.com/images/quotes_off.gif') {
    if(source.indexOf("quotes_off.gif") > -1 || source.indexOf("quotes_off2.gif") > -1){
    var toggle1 = new getObj('boxquote');
    var toggle2 = new getObj('samplebox');
	
	//alert('quote was off, now sample will be off');
    
    toggle2.style.display = 'none';
    toggle1.style.display = 'block';
    
    document.getElementById('requesttype').value='Quote';
    
    document.getElementById('ontab').src='images/quotes_on.gif';
    document.getElementById('offtab').src='images/samples_off.gif';
    
    }

}



///

function togglequote() {
var toggle1 = new getObj('textArea');
var toggle2 = new getObj('boxquote');
var toggle3 = new getObj('samplebox');

if (toggle3.style.visibility == 'visible' || toggle1.style.visibility == 'visible') {
  text2quote();
  document.getElementById('requesttype').value='Quote';

}
else {
  quote2text();
  document.getElementById('requesttype').value='';

}
///
}

//////
function togglequote2() {
var toggle1 = new getObj('specialtextArea');
var toggle2 = new getObj('boxquote');
var toggle3 = new getObj('samplebox');
var toggle4 = new getObj('stockquote');

if (toggle3.style.visibility == 'visible' || toggle1.style.visibility == 'visible' || toggle2.style.visibility == 'visible') {
   layerVisibility('specialtextArea', 0);
   layerVisibility('boxquote', 0);
   layerVisibility('samplebox', 0);
   layerVisibility('stockquote', 1);
  document.getElementById('requesttype').value='StockQuote';
}
else {
   layerVisibility('specialtextArea', 1);
   layerVisibility('boxquote', 0);
   layerVisibility('stockquote', 0);
   layerVisibility('samplebox', 0);
  document.getElementById('requesttype').value='';
}
///
}

//////
function validateform2()

{ //v3.0
/*
if(document.contact.firstname.value=="")
	{
		alert("Enter Your First Name!!.")
		document.contact.firstname.focus();
		return false;
	}
if(document.contact.lastname.value=="")
	{
		alert("Enter Your Last Name!!!.")
		document.contact.lastname.focus();
		return false;
	}
*/
if(document.contact.email.value=="")
	{
		alert("Enter a valid email address.")
		document.contact.email.focus();
		return false;
	}
if(emailCheck(document.contact.email.value)==false)
	{
		   document.contact.email.select();
		   document.contact.email.focus();
		   return false;
	}
if(document.contact.phone.value=="")
	{
		alert("Enter a valid telephone number.")
		document.contact.phone.focus();
		return false;
	}
/*
    else{
var field = document.contact.phone.value;
var valid = "0123456789-";
var hyphencount = 0;
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your Telephone Number.");
document.contact.phone.value='';
document.contact.phone.focus();
return false;
}
}
}
*/
if(document.contact.message.value=="")
	{
		alert("Enter a message.")
		document.contact.message.focus();
		return false;
	}
}
/////////
var p = 1;
var soapprice = new Array();
			soapprice[0] = new Array();
			soapprice[0][1] = "- - -";
			soapprice[0][2] = "- - -";
			soapprice[0][3] = "- - -";
			soapprice[0][4] = "- - -";
			soapprice[0][5] = "- - -";
			soapprice[0][6] = "- - -";
			soapprice[0][7] = "- - -";
			soapprice[0][8] = "- - -";
			soapprice[0][9] = "- - -";
			soapprice[0][10] = "- - -";
			soapprice[0][11] = "- - -";
			
			soapprice[1] = new Array();
			soapprice[1][1] = "$0.769";
			soapprice[1][2] = "$0.462";
			soapprice[1][3] = "$0.313";
			soapprice[1][4] = "$0.255";
			soapprice[1][5] = "$0.208";
			soapprice[1][6] = '(Approx. size: 2.75" x 1.25" x 3.75" that holds a 4-5 oz soap bar)';
			soapprice[1][7] = "    ---";
			soapprice[1][8] = "    ---";
			soapprice[1][9] = "    ---";
			soapprice[1][10] = "    ---";
			soapprice[1][11] = "    ---";
			
			soapprice[2] = new Array();
			soapprice[2][1] = "$0.635";
			soapprice[2][2] = "$0.379";
			soapprice[2][3] = "$0.248";
			soapprice[2][4] = "$0.190";
			soapprice[2][5] = "$0.146";
			soapprice[2][6] = '(Approx. size: 3.75" x 2.75" x 1.25" that holds a 3-3.5 oz soap bar)';
			soapprice[2][7] = "    ---";
			soapprice[2][8] = "    ---";
			soapprice[2][9] = "    ---";
			soapprice[2][10] = "    ---";
			soapprice[2][11] = "    ---";
			
			soapprice[3] = new Array();
			soapprice[3][1] = "$0.635";
			soapprice[3][2] = "$0.379";
			soapprice[3][3] = "$0.248";
			soapprice[3][4] = "$0.190";
			soapprice[3][5] = "$0.146";
			soapprice[3][6] = '(Approx. size: 3.75" x 2.75" x 1.25" that holds a 3-3.5 oz soap bar)';
			soapprice[3][7] = "    ---";
			soapprice[3][8] = "    ---";
			soapprice[3][9] = "    ---";
			soapprice[3][10] = "    ---";
			soapprice[3][11] = "    ---";
			
			soapprice[4] = new Array();
			soapprice[4][1] = "$0.769";
			soapprice[4][2] = "$0.462";
			soapprice[4][3] = "$0.313";
			soapprice[4][4] = "$0.255";
			soapprice[4][5] = "$0.208";
			soapprice[4][6] = '(Approx. size: 3" x 3" x 1.25" that holds a 3.5 oz soap bar)';
			soapprice[4][7] = "    ---";
			soapprice[4][8] = "    ---";
			soapprice[4][9] = "    ---";
			soapprice[4][10] = "    ---";
			soapprice[4][11] = "    ---";
			
			soapprice[5] = new Array();
			soapprice[5][1] = "$0.769";
			soapprice[5][2] = "$0.462";
			soapprice[5][3] = "$0.313";
			soapprice[5][4] = "$0.255";
			soapprice[5][5] = "$0.208";
			soapprice[5][6] = '(Approx. size: 2" x 0.5" x 3.75" that holds a 3-3.5 oz soap bar)';
			soapprice[5][7] = "    ---";
			soapprice[5][8] = "    ---";
			soapprice[5][9] = "    ---";
			soapprice[5][10] = "    ---";
			soapprice[5][11] = "    ---";
			
			soapprice[6] = new Array();
			soapprice[6][1] = "$0.678";
			soapprice[6][2] = "$0.405";
			soapprice[6][3] = "$0.274";
			soapprice[6][4] = "$0.223";
			soapprice[6][5] = "$0.182";
			soapprice[6][6] = '(Approx. size: 2.25" x 0.5" x 2.75" that holds a 1.75 - 2 oz soap bar)';
			soapprice[6][7] = "    ---";
			soapprice[6][8] = "    ---";
			soapprice[6][9] = "    ---";
			soapprice[6][10] = "    ---";
			soapprice[6][11] = "    ---";
			
			soapprice[7] = new Array();
			soapprice[7][1] = "$0.905";
			soapprice[7][2] = "$0.545";
			soapprice[7][3] = "$0.368";
			soapprice[7][4] = "$0.287";
			soapprice[7][5] = "$0.246";
			soapprice[7][6] = '(Approx. size: )';
			soapprice[7][7] = "$0.905";
			soapprice[7][8] = "$0.545";
			soapprice[7][9] = "$0.368";
			soapprice[7][10] = "$0.287";
			soapprice[7][11] = "$0.246";
			
			soapprice[8] = new Array();
			soapprice[8][1] = "$0.928";
			soapprice[8][2] = "$0.55";
			soapprice[8][3] = "$0.36";
			soapprice[8][4] = "$0.264";
			soapprice[8][5] = "$0.218";
			soapprice[8][6] = '(Approx. size: )';
			soapprice[8][7] = "$0.928";
			soapprice[8][8] = "$0.55";
			soapprice[8][9] = "$0.36";
			soapprice[8][10] = "$0.264";
			soapprice[8][11] = "$0.218";

function changeprice(p,q) {
document.price.c1250.value = soapprice[p][1];
document.price.c2500.value = soapprice[p][2];
document.price.c5000.value = soapprice[p][3];
document.price.c10000.value = soapprice[p][4];
document.price.c20000.value = soapprice[p][5];

document.price.boxStyle.value = q;

/*
document.price.sizes.value = soapprice[p][6];

document.price.cm1250.value = soapprice[p][7];
document.price.cm2500.value = soapprice[p][8];
document.price.cm5000.value = soapprice[p][9];
document.price.cm10000.value = soapprice[p][10];
document.price.cm20000.value = soapprice[p][11];
*/
}

var soapprice2 = new Array();
			soapprice2[0] = new Array();
			soapprice2[0][1] = "- - -";
			soapprice2[0][2] = "- - -";
			soapprice2[0][3] = "- - -";
			soapprice2[0][4] = "- - -";
			soapprice2[0][5] = "- - -";
			soapprice2[0][6] = "- - -";

			soapprice2[1] = new Array();
			soapprice2[1][1] = "$0.40";
			soapprice2[1][2] = "$0.35";
			soapprice2[1][3] = "$0.30";
			soapprice2[1][4] = "$0.25";
			soapprice2[1][5] = "";
			soapprice2[1][6] = '(Approx. size: 2.75" x 1.25" x 3.75" that holds a 4-5 oz soap bar)';

			soapprice2[2] = new Array();
			soapprice2[2][1] = "$0.35";
			soapprice2[2][2] = "$0.30";
			soapprice2[2][3] = "$0.25";
			soapprice2[2][4] = "$0.20";
			soapprice2[2][5] = "$";
			soapprice2[2][6] = '(Approx. size: 3.75" x 2.75" x 1.25" that holds a 3-3.5 oz soap bar)';

			soapprice2[3] = new Array();
			soapprice2[3][1] = "$0.40";
			soapprice2[3][2] = "$0.35";
			soapprice2[3][3] = "$0.30";
			soapprice2[3][4] = "$0.25";
			soapprice2[3][5] = "";
			soapprice2[3][6] = '(Approx. size: 3.75" x 2.75" x 1.25" that holds a 3-3.5 oz soap bar)';

			soapprice2[4] = new Array();
			soapprice2[4][1] = "$0.40";
			soapprice2[4][2] = "$0.35";
			soapprice2[4][3] = "$0.30";
			soapprice2[4][4] = "$0.25";
			soapprice2[4][5] = "";
			soapprice2[4][6] = '(Approx. size: 3" x 3" x 1.25" that holds a 3.5 oz soap bar)';

function changeprice2(p,q) {
document.price2.c1250.value = soapprice2[p][1];
document.price2.c2500.value = soapprice2[p][2];
document.price2.c5000.value = soapprice2[p][3];

document.price2.boxStyle.value = q;

//document.price2.c10000.value = soapprice2[p][4];
//document.price2.c20000.value = soapprice2[p][5];
}

var cosmeticprice = new Array();
			cosmeticprice[0] = new Array();
			cosmeticprice[0][1] = "- - -";
			cosmeticprice[0][2] = "- - -";
			cosmeticprice[0][3] = "- - -";
			cosmeticprice[0][4] = "- - -";
			cosmeticprice[0][5] = "- - -";
			cosmeticprice[0][6] = "- - -";

			cosmeticprice[1] = new Array();
			cosmeticprice[1][1] = "$1.20";
			cosmeticprice[1][2] = "$1.00";
			cosmeticprice[1][3] = "$0.90";
			cosmeticprice[1][4] = "$0.40";
			cosmeticprice[1][5] = "$0.35";
			cosmeticprice[1][6] = "$0.30";

			cosmeticprice[2] = new Array();
			cosmeticprice[2][1] = "$1.20";
			cosmeticprice[2][2] = "$1.00";
			cosmeticprice[2][3] = "$0.90";
			cosmeticprice[2][4] = "$0.40";
			cosmeticprice[2][5] = "$0.35";
			cosmeticprice[2][6] = "$0.30";

			cosmeticprice[3] = new Array();
			cosmeticprice[3][1] = "$1.20";
			cosmeticprice[3][2] = "$1.00";
			cosmeticprice[3][3] = "$0.90";
			cosmeticprice[3][4] = "$0.40";
			cosmeticprice[3][5] = "$0.35";
			cosmeticprice[3][6] = "$0.30";

			cosmeticprice[4] = new Array();
			cosmeticprice[4][1] = "$1.20";
			cosmeticprice[4][2] = "$1.00";
			cosmeticprice[4][3] = "$0.90";
			cosmeticprice[4][4] = "$0.40";
			cosmeticprice[4][5] = "$0.35";
			cosmeticprice[4][6] = "$0.30";

function changecosmeticprice(p,q) {
document.price2.c1250.value = cosmeticprice[p][1];
document.price2.c2500.value = cosmeticprice[p][2];
document.price2.c5000.value = cosmeticprice[p][3];

document.price2.c10000.value = cosmeticprice[p][4];
document.price2.c20000.value = cosmeticprice[p][5];
document.price2.c30000.value = cosmeticprice[p][6];

document.price2.boxStyle.value = q;

//document.price2.c10000.value = soapprice2[p][4];
//document.price2.c20000.value = soapprice2[p][5];
}


///////////////////

var lipbalmprice = new Array();
			lipbalmprice[0] = new Array();
			lipbalmprice[0][1] = "- - -";
			lipbalmprice[0][2] = "- - -";
			lipbalmprice[0][3] = "- - -";
			lipbalmprice[0][4] = "- - -";
			lipbalmprice[0][5] = "- - -";
			lipbalmprice[0][6] = "- - -";

			lipbalmprice[1] = new Array();
			lipbalmprice[1][1] = "$1.20";
			lipbalmprice[1][2] = "$1.00";
			lipbalmprice[1][3] = "$0.90";
			lipbalmprice[1][4] = "$0.40";
			lipbalmprice[1][5] = "$0.35";
			lipbalmprice[1][6] = "$0.30";

			lipbalmprice[2] = new Array();
			lipbalmprice[2][1] = "$1.20";
			lipbalmprice[2][2] = "$1.00";
			lipbalmprice[2][3] = "$0.90";
			lipbalmprice[2][4] = "$0.40";
			lipbalmprice[2][5] = "$0.35";
			lipbalmprice[2][6] = "$0.30";

			lipbalmprice[3] = new Array();
			lipbalmprice[3][1] = "$1.20";
			lipbalmprice[3][2] = "$1.00";
			lipbalmprice[3][3] = "$0.90";
			lipbalmprice[3][4] = "$0.40";
			lipbalmprice[3][5] = "$0.35";
			lipbalmprice[3][6] = "$0.30";

			lipbalmprice[4] = new Array();
			lipbalmprice[4][1] = "$1.20";
			lipbalmprice[4][2] = "$1.00";
			lipbalmprice[4][3] = "$0.90";
			lipbalmprice[4][4] = "$0.40";
			lipbalmprice[4][5] = "$0.35";
			lipbalmprice[4][6] = "$0.30";

function changelipbalmprice(p,q) {
document.price2.c1250.value = lipbalmprice[p][1];
document.price2.c2500.value = lipbalmprice[p][2];
document.price2.c5000.value = lipbalmprice[p][3];

document.price2.c10000.value = lipbalmprice[p][4];
document.price2.c20000.value = lipbalmprice[p][5];
document.price2.c30000.value = lipbalmprice[p][6];

document.price2.boxStyle.value = q;
}

//////////////////

function showsamplebox() {
   layerVisibility('textArea', 0);
   layerVisibility('boxquote', 0);
   layerVisibility('samplebox', 1);
}
function hidesamplebox() {
   layerVisibility('textArea', 0);
   layerVisibility('boxquote', 1);
   layerVisibility('samplebox', 0);
}
function togglesample() {
var toggle1 = new getObj('textArea');
var toggle2 = new getObj('boxquote');
var toggle3 = new getObj('samplebox');

if (toggle3.style.visibility == 'hidden') {
showsamplebox();
document.getElementById('requesttype').value='Sample';

}
else {
hidesamplebox();
document.getElementById('requesttype').value='';

}
}
/////////////

function togglesample2() {
var toggle1 = new getObj('specialtextArea');
var toggle2 = new getObj('boxquote');
var toggle3 = new getObj('samplebox');

if (toggle3.style.visibility == 'hidden') {
   layerVisibility('specialtextArea', 0);
   layerVisibility('textArea', 0);
   layerVisibility('boxquote', 0);
   layerVisibility('samplebox', 1);
  document.getElementById('requesttype').value='Sample';
}
else {
   layerVisibility('specialtextArea', 0);
   layerVisibility('textArea', 0);
   layerVisibility('boxquote', 1);
   layerVisibility('samplebox', 0);
  document.getElementById('requesttype').value='Quote';
}
}

/////////////sample box form
function validateform3()

{ //v3.0
if(document.sample.name.value=="")
	{
		alert("Enter your name.")
		document.sample.name.focus();
		return false;
	}
if(document.sample.telephone.value=="")
	{
		alert("Enter a valid telephone number.")
		document.sample.telephone.focus();
		return false;
	}
/*
    else{
var field = document.sample.telephone.value;
var valid = "0123456789-";
var hyphencount = 0;
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your Telephone Number.");
document.sample.phone.value='';
document.sample.phone.focus();
return false;
}
}
}
*/
if(document.sample.email.value=="")
	{
		alert("Enter a valid email address.")
		document.sample.email.focus();
		return false;
	}
if(emailCheck(document.sample.email.value)==false)
	{
		   document.sample.email.select();
		   document.sample.email.focus();
		   return false;
	}
 document.sample.submit();
// document.sample.reset();
 }
//////////
function showcostmatrix() {
   layerVisibility('costmatrix', 1);
}
function hidecostmatrix() {
   layerVisibility('costmatrix', 0);
}
function showcostmatrix2() {
   layerVisibility('costmatrix2', 1);
}
function hidecostmatrix2() {
   layerVisibility('costmatrix2', 0);
}
//////

function validateform4()
{ //v3.0

if(document.stockquotation.name.value=="")
	{
		alert("Enter your name.")
		document.stockquotation.name.focus();
		return false;
	}
if(document.stockquotation.telephone.value=="")
	{
		alert("Enter your telephone number.")
		document.stockquotation.telephone.focus();
		return false;
	}


if(document.stockquotation.email.value=="")
	{
		alert("Enter your email address.")
		document.stockquotation.email.focus();
		return false;
	}
if(emailCheck(document.stockquotation.email.value)==false)
	{
		   document.stockquotation.email.select();
		   document.stockquotation.email.focus();
		   return false;
	}
document.stockquotation.submit();
//resetform();
}

/////

function popUp(winFile,winWidth,winHeight,winScroll, winResize){
	if ((screen.width == 640) && (screen.height == 480)){
	winLeft = 50; winTop = 50;
	}else if ((screen.width == 800) && (screen.height == 600)){
	winLeft = (800-winWidth)/2; winTop = (600-winHeight)/2;
	}else if ((screen.width == 1024) && (screen.height == 768)){
	winLeft = (1024-winWidth)/2; winTop = (768-winHeight)/2;
	}else{ winLeft = 50; winTop = 50; }
	window.open(winFile, "BoxCoop", "scrollbars=" + winScroll + ", addressbar=0, resizable=" + winResize + ", statusbar=0, menubar=0, left=" + winLeft + ", top=" + winTop + ", width=" + winWidth + ",height=" + winHeight);
}
///////////////////

function addbookmark_old()
{
bookmarkurl="http://www.boxcoop.com"
bookmarktitle="The Box Co-op - Custom full color printed boxes"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

///////////////

function addbookmark(){
url="http://www.boxcoop.com"
title="The Box Co-op - Custom full color printed boxes"
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

///////////////////

function displaytext() {
var txt = "Bookmark this Page";

var ver = navigator.appName;
var num = parseInt(navigator.appVersion);
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write(txt);
}
else if (navigator.appName == "Netscape") {
document.write(txt);
}
else{
txt = "(Ctrl+D) to Bookmark this Page";
document.write(txt);
}

}

///////////////
function showsurvey() {
   layerVisibility('survey', 1);
   layerVisibility('textArea', 0);
   layerVisibility('specialtextArea', 0);
   layerVisibility('boxquote', 0);
   layerVisibility('samplebox', 0);
   layerVisibility('stockquote', 0);
   
   hidecostmatrix();
   hidecostmatrix2();
}
///////////////
function votecolor(x) {

if (document.surveyform.color_a.value == "") { ca = 0; }
else {ca = document.surveyform.color_a.value;}
if (document.surveyform.color_b.value == "") { cb = 0; }
else {cb = document.surveyform.color_b.value;}
if (document.surveyform.color_c.value == "") { cc = 0; }
else {cc = document.surveyform.color_c.value;}
if (document.surveyform.color_d.value == "") { cd = 0; }
else {cd = document.surveyform.color_d.value;}
if (document.surveyform.color_e.value == "") { ce = 0; }
else {ce = document.surveyform.color_e.value;}

 if(document.getElementById(["color_" + x]).value == "") {

//var total = eval(document.surveyform.color_a.value) + eval(document.surveyform.color_b.value) + eval(document.surveyform.color_c.value) + eval(document.surveyform.color_d.value) + eval(document.surveyform.color_e.value);
var total = eval(ca) + eval(cb) + eval(cc) + eval(cd) + eval(ce);
//alert (total);

  switch (total)
    {
		case 0:
		  document.getElementById(["color_" + x]).value = 1;
		  break;
		case 1:
		  document.getElementById(["color_" + x]).value = 2;
		  break;
  		case 3:
		  document.getElementById(["color_" + x]).value = 3;
		  break;
		case 6:
		  document.getElementById(["color_" + x]).value = 4;
		  break;
		case 10:
		  document.getElementById(["color_" + x]).value = 5;
		  break;
  		case 15:
		  document.getElementById(["color_" + x]).value = 0;
		  break;
		default:
		  document.getElementById(["color_" + x]).value = 6;
	}
}
else {
if (eval(document.getElementById(["color_" + x]).value) == 1) {
  document.surveyform.color_a.value = "";
  document.surveyform.color_b.value = "";
  document.surveyform.color_c.value = "";
  document.surveyform.color_d.value = "";
  document.surveyform.color_e.value = "";

}
if (eval(document.getElementById(["color_" + x]).value) == 2) {
  document.getElementById(["color_" + x]).value = "";
  if ( eval(document.surveyform.color_a.value) > 2) {document.surveyform.color_a.value = "";}
  if ( eval(document.surveyform.color_b.value) > 2) {document.surveyform.color_b.value = "";}
  if ( eval(document.surveyform.color_c.value) > 2) {document.surveyform.color_c.value = "";}
  if ( eval(document.surveyform.color_d.value) > 2) {document.surveyform.color_d.value = "";}
  if ( eval(document.surveyform.color_e.value) > 2) {document.surveyform.color_e.value = "";}

}

if (eval(document.getElementById(["color_" + x]).value) == 3) {
  document.getElementById(["color_" + x]).value = "";
  if ( eval(document.surveyform.color_a.value) > 3) {document.surveyform.color_a.value = "";}
  if ( eval(document.surveyform.color_b.value) > 3) {document.surveyform.color_b.value = "";}
  if ( eval(document.surveyform.color_c.value) > 3) {document.surveyform.color_c.value = "";}
  if ( eval(document.surveyform.color_d.value) > 3) {document.surveyform.color_d.value = "";}
  if ( eval(document.surveyform.color_e.value) > 3) {document.surveyform.color_e.value = "";}

}

if (eval(document.getElementById(["color_" + x]).value) == 4) {
  document.getElementById(["color_" + x]).value = "";
  if ( eval(document.surveyform.color_a.value) > 4) {document.surveyform.color_a.value = "";}
  if ( eval(document.surveyform.color_b.value) > 4) {document.surveyform.color_b.value = "";}
  if ( eval(document.surveyform.color_c.value) > 4) {document.surveyform.color_c.value = "";}
  if ( eval(document.surveyform.color_d.value) > 4) {document.surveyform.color_d.value = "";}
  if ( eval(document.surveyform.color_e.value) > 4) {document.surveyform.color_e.value = "";}

}

}
}
////////
function votebox2(box) {
  document.surveyform.box_type.value = box;

document.getElementById(["boxtype_1"]).style.borderColor='#ffffff';
document.getElementById(["boxtype_2"]).style.borderColor='#ffffff';
document.getElementById(["boxtype_3"]).style.borderColor='#ffffff';
document.getElementById(["boxtype_4"]).style.borderColor='#ffffff';

document.getElementById(["boxtype_" + box]).style.borderColor='#ff0000';
}
///////////////////

function showstats() {
//if (document.getElementById(["color_percentage_a"]).style.visibility == 'hidden') {
if (document.surveyform.stats.checked == true) {

layerVisibility('color_percentage_a', 1);
layerVisibility('color_percentage_b', 1);
layerVisibility('color_percentage_c', 1);
layerVisibility('color_percentage_d', 1);
layerVisibility('color_percentage_e', 1);

layerVisibility('box_percentage_1', 1);
layerVisibility('box_percentage_2', 1);
layerVisibility('box_percentage_3', 1);
layerVisibility('box_percentage_4', 1);

//document.surveyform.stats.checked = true;
}
//else {
if (document.surveyform.stats.checked == false) {
layerVisibility('color_percentage_a', 0);
layerVisibility('color_percentage_b', 0);
layerVisibility('color_percentage_c', 0);
layerVisibility('color_percentage_d', 0);
layerVisibility('color_percentage_e', 0);

layerVisibility('box_percentage_1', 0);
layerVisibility('box_percentage_2', 0);
layerVisibility('box_percentage_3', 0);
layerVisibility('box_percentage_4', 0);

//document.surveyform.stats.checked = false;
}
}
//////
function submitsurvey()
{

///
//alert(document.surveyform.color_a.value);

if (document.surveyform.color_a.value == 1) { document.surveyform.color_a.value = 5; }
else if (document.surveyform.color_a.value == 2) { document.surveyform.color_a.value = 4; }
else if (document.surveyform.color_a.value == 4) { document.surveyform.color_a.value = 2; }
else if (document.surveyform.color_a.value == 5) { document.surveyform.color_a.value = 1; }

//alert(document.surveyform.color_a.value);

if (document.surveyform.color_b.value == 1) { document.surveyform.color_b.value = 5; }
else if (document.surveyform.color_b.value == 2) { document.surveyform.color_b.value = 4; }
else if (document.surveyform.color_b.value == 4) { document.surveyform.color_b.value = 2; }
else if (document.surveyform.color_b.value == 5) { document.surveyform.color_b.value = 1; }

if (document.surveyform.color_c.value == 1) { document.surveyform.color_c.value = 5; }
else if (document.surveyform.color_c.value == 2) { document.surveyform.color_c.value = 4; }
else if (document.surveyform.color_c.value == 4) { document.surveyform.color_c.value = 2; }
else if (document.surveyform.color_c.value == 5) { document.surveyform.color_c.value = 1; }

if (document.surveyform.color_d.value == 1) { document.surveyform.color_d.value = 5; }
else if (document.surveyform.color_d.value == 2) { document.surveyform.color_d.value = 4; }
else if (document.surveyform.color_d.value == 4) { document.surveyform.color_d.value = 2; }
else if (document.surveyform.color_d.value == 5) { document.surveyform.color_d.value = 1; }

if (document.surveyform.color_e.value == 1) { document.surveyform.color_e.value = 5; }
else if (document.surveyform.color_e.value == 2) { document.surveyform.color_e.value = 4; }
else if (document.surveyform.color_e.value == 4) { document.surveyform.color_e.value = 2; }
else if (document.surveyform.color_e.value == 5) { document.surveyform.color_e.value = 1; }


if (document.surveyform.box_1.value == 1) { document.surveyform.box_1.value = 4; }
else if (document.surveyform.box_1.value == 2) { document.surveyform.box_1.value = 3; }
else if (document.surveyform.box_1.value == 3) { document.surveyform.box_1.value = 2; }
else if (document.surveyform.box_1.value == 4) { document.surveyform.box_1.value = 1; }

if (document.surveyform.box_2.value == 1) { document.surveyform.box_2.value = 4; }
else if (document.surveyform.box_2.value == 2) { document.surveyform.box_2.value = 3; }
else if (document.surveyform.box_2.value == 3) { document.surveyform.box_2.value = 2; }
else if (document.surveyform.box_2.value == 4) { document.surveyform.box_2.value = 1; }

if (document.surveyform.box_3.value == 1) { document.surveyform.box_3.value = 4; }
else if (document.surveyform.box_3.value == 2) { document.surveyform.box_3.value = 3; }
else if (document.surveyform.box_3.value == 3) { document.surveyform.box_3.value = 2; }
else if (document.surveyform.box_3.value == 4) { document.surveyform.box_3.value = 1; }

if (document.surveyform.box_4.value == 1) { document.surveyform.box_4.value = 4; }
else if (document.surveyform.box_4.value == 2) { document.surveyform.box_4.value = 3; }
else if (document.surveyform.box_4.value == 3) { document.surveyform.box_4.value = 2; }
else if (document.surveyform.box_4.value == 4) { document.surveyform.box_4.value = 1; }

///

  document.surveyform.submit();
//  setTimeout("document.surveyform.reset()",1250);
// document.surveyform.reset();
}

/////////////////////////

function showmatrix() {

//if (document.getElementById(["survey"]).style.visibility == 'hidden') {
//showcostmatrix();
layerVisibility('costmatrix', 1);
//}

}

//////////////

function showmatrix2() {

if (document.getElementById(["survey"]).style.visibility == 'hidden') {
//showcostmatrix2();
layerVisibility('costmatrix2', 1);
}

}

///////////////
function votebox(x) {

if (document.surveyform.box_1.value == "") { v1 = 0; }
else {v1 = document.surveyform.box_1.value;}
if (document.surveyform.box_2.value == "") { v2 = 0; }
else {v2 = document.surveyform.box_2.value;}
if (document.surveyform.box_3.value == "") { v3 = 0; }
else {v3 = document.surveyform.box_3.value;}
if (document.surveyform.box_4.value == "") { v4 = 0; }
else {v4 = document.surveyform.box_4.value;}

 if(document.getElementById(["box_" + x]).value == "") {

//var total = eval(document.surveyform.color_a.value) + eval(document.surveyform.color_b.value) + eval(document.surveyform.color_c.value) + eval(document.surveyform.color_d.value) + eval(document.surveyform.color_e.value);
var total = eval(v1) + eval(v2) + eval(v3) + eval(v4);
//alert (total);

  switch (total)
    {
		case 0:
		  document.getElementById(["box_" + x]).value = 1;
		  break;
		case 1:
		  document.getElementById(["box_" + x]).value = 2;
		  break;
  		case 3:
		  document.getElementById(["box_" + x]).value = 3;
		  break;
		case 6:
		  document.getElementById(["box_" + x]).value = 4;
		  break;
		case 10:
		  document.getElementById(["box_" + x]).value = 0;
		  break;
		default:
		  document.getElementById(["box_" + x]).value = 6;
	}
}
else {
if (eval(document.getElementById(["box_" + x]).value) == 1) {
  document.surveyform.box_1.value = "";
  document.surveyform.box_2.value = "";
  document.surveyform.box_3.value = "";
  document.surveyform.box_4.value = "";

}
if (eval(document.getElementById(["box_" + x]).value) == 2) {
  document.getElementById(["box_" + x]).value = "";
  if ( eval(document.surveyform.box_1.value) > 2) {document.surveyform.box_1.value = "";}
  if ( eval(document.surveyform.box_2.value) > 2) {document.surveyform.box_2.value = "";}
  if ( eval(document.surveyform.box_3.value) > 2) {document.surveyform.box_3.value = "";}
  if ( eval(document.surveyform.box_4.value) > 2) {document.surveyform.box_4.value = "";}

}

if (eval(document.getElementById(["box_" + x]).value) == 3) {
  document.getElementById(["box_" + x]).value = "";
  if ( eval(document.surveyform.box_1.value) > 3) {document.surveyform.box_1.value = "";}
  if ( eval(document.surveyform.box_2.value) > 3) {document.surveyform.box_2.value = "";}
  if ( eval(document.surveyform.box_3.value) > 3) {document.surveyform.box_3.value = "";}
  if ( eval(document.surveyform.box_4.value) > 3) {document.surveyform.box_4.value = "";}

}

}
}
////////
function hidestatus() {
layerVisibility('color_percentage_a', 0);
layerVisibility('color_percentage_b', 0);
layerVisibility('color_percentage_c', 0);
layerVisibility('color_percentage_d', 0);
layerVisibility('color_percentage_e', 0);

layerVisibility('box_percentage_1', 0);
layerVisibility('box_percentage_2', 0);
layerVisibility('box_percentage_3', 0);
layerVisibility('box_percentage_4', 0);

document.surveyform.stats.checked=false;

}
///////////////
sfHover = function() {
	var sfEls = document.getElementById("mainlevelnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//////////////
function shownextarrow() {
	this.src='images/next_on.gif';
}
