<!--
//************************************************************************************************************
// Shipping Charge	
       
var flatrate = 1; // Set this number to 0 to use per item shipping or 1 to use a flat rate for all shipping, or 2 to use percentage.
var shipping1 = 4.95;
var shipping = 6.95; // How much for shipping PER ITEM or FLAT RATE?  There MUST be a ; after the number!
var shippingPercentage = 0.1600 // Add this percentage of price as shipping cost.
var freeshipping = 40; // When is shipping free? If never, put in a very large number. There MUST be a ; after the number!
var shippingcut = 25;
var saleOn = 0;	// Set to 1 if sale on else set to 0.
var salePercent = 0.10;		// Set to percentage of sale.

// Payment options
var payByPayPal		= 0;
var payByCredit 	= 1;
var payByCheck  	= 2;
var payByEmail		= 3;
var payByPreview	= 4;  // Does not consider any sales tax

//*****************************************************
// Simple Tax Functions

var taxrate = 0.0775; //Tax rate for your state, must be in decimal form (eg. 8.750 becomes 0.0875)
var taxstate = "California"; //The state you collect tax in (Your home state)

var autoRebate = 0.0000; // NoliCo rebate, automatic

var enableRebate = 1;	// Set to 1 to enable instant Energy Star Rebates
var enablePGERebate = 0;	// Set to 1 to enable instant PG&E Rebates

//*****************************************************
// Pay Pal email address.

var business = "sales@nolico.com";
	  
//*****************************************************

var returnURL = "http://www.nolico.com/saveenergy/thank_you_index.htm";
var cancelReturnURL = "http://www.nolico.com/saveenergy/order_cancelled_index.htm";

//*****************************************************
	  //*****************************************************
      //Start- This is the complete location (URL) to vbuy2.htm
	  //on your server.  Include the vbuy2.htm in the URL.
	  //Example you site URL is http://someplace.com 
	  //vbus2.htm is in the root folder the URL would be http://someplace.com/vbuy2.htm
		

var TovBuy2 = "http://www.nolico.com/saveenergy/vbuy2.htm";


      //End- Thank You Page
	  //*****************************************************
	  //*****************************************************


	  
	  //*****************************************************
	  //*****************************************************
      //Start- Table colors.  This allows you to set the table  
	  //colors and font colors displayed on vbuy.htm and 
	  //vbasket.htm.  You can change the to reflect the colors
	  //you want on your website.

      
 var tableheadcolor = "#336699"; //Table Header and Footer Color
 var tablebodycolor = "#CCCCCC"; //Body Color    
 var tablefontcolor = "#FFFFFF"; //Font Color
 var otherFontColor = "#000000"; //Inner table font color.
 
 
      //End- Table colors
	  //*****************************************************
	  //*****************************************************
       
      //*****************************************************
      //*****************************************************
      //Start- Go to vbasket.htm after product is added to shoppingcart
      // 1 is for yes. 0 is for no.


var vbasketTransaction = 0;


       //end- Go to vbasket.htm	
       //*****************************************************

// The following array defines Gift Certificate IDs that are currently available for redemption.
var giftCertArray = new Array();

// giftCertArray: Gift Certificate ID, Value, Unused(Y/N), First Name, Last Name, Certificate Type (0 = gift, 1 = store credit, 2 = % discount)

giftCertArray[0] = "1111111111111111111,19.19,Y,Aniko,Noli,0";
giftCertArray[1] = "NCGC1039284994139JN,10.00,Y,Jeff,Noli,0";
giftCertArray[2] = "NCGC1040199025921RD,75.00,N,Randy,Ryerse,0";
giftCertArray[3] = "NCGC1043689921531JW,50.00,N,James,Wood,0";
giftCertArray[4] = "NCSC1044218686923BF,8.09,Y,Betsy,Feldman,1";
giftCertArray[5] = "NCSC1046070460097KD,24.32,Y,Kenneth,Doubek,1";
giftCertArray[6] = "NCSC1046070478063MK,78.80,N,Margaret,Kinder,1";
giftCertArray[7] = "NCSC1047022452173CC,8.48,Y,Christopher,Chigas,1";
giftCertArray[8] = "NCSC1047661952371AF,56.98,N,Ardelle,Farinola,1";
giftCertArray[9] = "NCGC1052770742766JW,4.46,Y,James,Wood,0";
giftCertArray[10] = "NCSC1053377291705VG,5.00,N,Vickie,Gardner,1";
giftCertArray[11] = "NCSC1057809718565DM,8.45,Y,Dave,Milke,1";
giftCertArray[12] = "NCSC1058816109087DN,79.60,Y,Diane,Nash,1";
giftCertArray[13] = "NCDC1058843410708DM,5,Y,Donna,Malerba,2";
giftCertArray[14] = "NCSC1062307994548AZ,3.33,N,Aaron,Zschau,1";
giftCertArray[15] = "NCSC1062986151733KK,177.16,N,Kraig,Kissinger,1";
giftCertArray[16] = "NCSC1064353841466AZ,10.91,N,Aaron,Zschau,1";
giftCertArray[17] = "NCSC1073391550810KK,82.81,Y,Kraig,Kissinger,1";
giftCertArray[18] = "NCSC1079040520420TL,40.98,Y,Todd,Lutz,1";
giftCertArray[19] = "NCSC1079403405924MG,25.26,Y,Matthew,Gurvitch,1";
giftCertArray[20] = "NCSC1083801462010RC,120.00,N,Robert,Chimel,1";
giftCertArray[21] = "NCSC1083869306565RF,10.98,Y,Robert,Field,1";
giftCertArray[22] = "NCDC1084831215329MG,5,Y,Matt,Griffin,2";
giftCertArray[23] = "NCDC1094068529871LK,10,Y,Linda,Katz,2";
giftCertArray[24] = "NCDC1100672831851WB,5,Y,Wendy,Baily,2";
giftCertArray[25] = "NCSC1105635643594TG,67.46,N,Tristan,Gerra,1";
giftCertArray[26] = "NCSC1107282410145GW,5.07,Y,Greg,Wells,1";
giftCertArray[27] = "NCSC1108139456110PR,33.93,N,Peter,Roggenstein,1";
giftCertArray[28] = "NCSC1114620794812RC,8.48,Y,Robert,Chimel,1";
giftCertArray[29] = "NCSC1125502609650CB,4.13,Y,Chris,Bennetsen,1";
giftCertArray[30] = "NCDC130695049489JUN,5,Y,June,Discount,2";
giftCertArray[31] = "NCDC131109737052JUL,5,Y,July,Discount,2";
giftCertArray[32] = "NCGC1166800251703JS,50.00,Y,Jeff,Shanab,0";
giftCertArray[33] = "NCGC1166800251703ML,50.00,Y,Michael,Lee,0";
giftCertArray[34] = "NCGC1166800251703NS,50.00,N,Nick,Simi,0";
giftCertArray[35] = "NCGC1166800251703LH,50.00,N,Larry,Highman,0";
giftCertArray[36] = "NCGC1166800251703MM,50.00,N,Mayumi,Mizuno,0";
giftCertArray[37] = "NCGC1166800251703DR,50.00,N,Davebo,Rodrigues,0";
giftCertArray[38] = "NCGC1166800251703TS,50.00,Y,Todd,Swanzey,0";
giftCertArray[39] = "NCSC1170749372279PB,27.93,N,Peter,Ball,1";
giftCertArray[40] = "NCSC1171006999426JT,59.31,N,Joe,Tenn,1";
giftCertArray[41] = "NCSC1187286568582GM,273.30,N,Ginny,Maupin,1";
giftCertArray[42] = "NCSC1195520898878JP,136.50,N,John,Pilot,1";
giftCertArray[43] = "NCSC1196527942729JP,29.20,Y,John,Pilot,1";
giftCertArray[44] = "NCSC1237302248936GM,134.92,Y,Ginny,Maupin,1";
giftCertArray[45] = "NCSC1275403567297GM,4.95,Y,Randy,Gardner,1";
giftCertArray[46] = "NCSC1285006892414CH,56.89,Y,Chris,Heathwood,1";

// Indexes into giftCertArray
var gciGiftCertIDIndex	= 0;
var gciValueIndex	= 1;
var gciUnusedIndex	= 2;
var gciFirstNameIndex	= 3;
var gciLastNameIndex	= 4;
var gciTypeIndex	= 5;

var gciTypeGift		= 0;
var gciTypeStoreCredit	= 1;
var gciTypeDiscount	= 2;


var productArray = new Array();

// Product Array: Item ID, Item Description, Item Price, Energy Star(Y/N), Rebate Entity, Rebate Amount, Item Sale %
productArray[0] = "ESL13T,13W_Swirl_CFL,9.58,Y,PGE,03.00,0.0000";
productArray[1] = "ESL13T,6_Pack_of_13W_Swirl_CFL,9.52,Y,PGE,18.00,0.0000";
productArray[2] = "ESL13T,Case_of_12_13W_Swirl_CFL,9.52,Y,PGE,30.00,0.0000";
productArray[3] = "ESL15T,15W_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[4] = "ESL15T,6_Pack_of_15W_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[5] = "ESL15T,Case_of_12_15W_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[6] = "ESL15T/CW,15W_CW_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[7] = "ESL15T/CW,6_Pack_of_15W_CW_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[8] = "ESL15T/CW,Case_of_12_15W_CW_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[9] = "ESL20T,20W_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[10] = "ESL20T,6_Pack_of_20W_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[11] = "ESL20T,Case_of_12_20W_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[12] = "ESL20T/CW,20W_CW_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[13] = "ESL20T/CW,6_Pack_of_20W_CW_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[14] = "ESL20T/CW,Case_of_12_20W_CW_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[15] = "ESL25T,25W_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[16] = "ESL25T,6_Pack_of_25W_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[17] = "ESL25T,Case_of_12_25W_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[18] = "ESL25T/CW,25W_CW_Swirl_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[19] = "ESL25T/CW,6_Pack_of_25W_CW_Swirl_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[20] = "ESL25T/CW,Case_of_12_25W_CW_Swirl_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[21] = "ESL3WAY,3_Way_Swirl_CFL,11.99,N,none,00.00,0.0000";
productArray[22] = "ESL16A,15W_AType_CFL,10.99,Y,PGE,03.00,0.0000";
productArray[23] = "ESL16A,6_Pack_of_15W_AType_CFL,10.99,Y,PGE,18.00,0.0000";
productArray[24] = "ESL16A,Case_of_12_15W_AType_CFL,10.99,Y,PGE,30.00,0.0000";
productArray[25] = "ESL5A,5W_AType_CFL,8.99,N,none,00.00,0.0000";
productArray[26] = "ESL11G,11W_Globe_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[27] = "ESL11G,6_Pack_of_11W_Globe_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[28] = "ESL11G,Case_of_12_11W_Globe_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[29] = "ESL15C,15W_Cylinder_CFL,10.99,Y,PGE,03.00,0.0000";
productArray[30] = "ESL15C,6_Pack_of_15W_Cylinder_CFL,10.99,Y,PGE,18.00,0.0000";
productArray[31] = "ESL15C,Case_of_12_15W_Cylinder_CFL,10.99,Y,PGE,30.00,0.0000";
productArray[32] = "ESL15CY,15W_Yellow_Bug_CFL,9.99,N,none,00.00,0.0000";
productArray[33] = "ESL20R30,20W_Reflector_CFL,16.99,N,none,00.00,0.0000";
productArray[34] = "ESL3C,3W_Chandelier_CFL,6.49,N,none,00.00,0.0000";
productArray[35] = "ESL12C,12W_Chandelier_CFL,8.80,N,none,00.00,0.0000";
productArray[36] = "ESL15,16W_Double_Biax_CFL,9.99,Y,PGE,03.00,0.0000";
productArray[37] = "ESL15,6_Pack_of_16W_Double_Biax_CFL,9.99,Y,PGE,18.00,0.0000";
productArray[38] = "ESL15,Case_of_12_16W_Double_Biax_CFL,9.99,Y,PGE,30.00,0.0000";
productArray[39] = "ESL315,16W_Triple_Biax_CFL,8.99,Y,PGE,03.00,0.0000";
productArray[40] = "ESL315,6_Pack_of_16W_Triple_Biax_CFL,8.99,Y,PGE,18.00,0.0000";
productArray[41] = "ESL315,Case_of_12_16W_Triple_Biax_CFL,8.99,Y,PGE,30.00,0.0000";
productArray[42] = "ESL320,20W_Triple_Biax_CFL,8.99,Y,PGE,03.00,0.0000";
productArray[43] = "ESL320,6_Pack_of_20W_Triple_Biax_CFL,8.99,Y,PGE,18.00,0.0000";
productArray[44] = "ESL320,Case_of_12_20W_Triple_Biax_CFL,8.99,Y,PGE,30.00,0.0000";
productArray[45] = "ESL325,24W_Triple_Biax_CFL,8.99,Y,PGE,03.00,0.0000";
productArray[46] = "ESL325,6_Pack_of_24W_Triple_Biax_CFL,8.99,Y,PGE,18.00,0.0000";
productArray[47] = "ESL325,Case_of_12_24W_Triple_Biax_CFL,8.99,Y,PGE,30.00,0.0000";
productArray[48] = "ESL40,40W_Quad_CFL,11.98,N,none,00.00,0.0000";
productArray[49] = "ESL40,6_Pack_40W_Quad_CFL,71.88,N,none,00.00,0.0000";
productArray[50] = "ESL3C,Case_of_12_3W_Chandelier_CFL,6.49,N,none,00.00,0.0000";
productArray[51] = "ESL12C,6_Pack_12W_Chandelier_CFL,8.80,N,none,00.00,0.0000";
productArray[52] = "ESL12C,Case_of_12_12W_Chandelier_CFL,8.80,N,none,00.00,0.0000";
productArray[53] = "ESL5A,6_Pack_5W_AType_CFL,8.99,N,none,00.00,0.0000";
productArray[54] = "ESL15CY,6_Pack_15W_Yellow_Bug_CFL,9.99,N,none,00.00,0.0000";
productArray[55] = "LESTL07C,7W_Candelabra_CFL,8.49,N,none,00.00,0.0000";
productArray[56] = "LESTL07C,6_Pack_of_7W_Candelabra_CFL,8.49,N,none,00.00,0.0000";
productArray[57] = "LESTL07C,Case_of_12_7W_Candelabra_CFL,8.49,N,none,00.00,0.0000";
productArray[58] = "LESTL11C,11W_Candelabra_CFL,8.93,N,none,00.00,0.0000";
productArray[59] = "LESTL11C,6_Pack_of_11W_Candelabra_CFL,8.93,N,none,00.00,0.0000";
productArray[60] = "LESTL11C,Case_of_12_11W_Candelabra_CFL,8.93,N,none,00.00,0.0000";
productArray[61] = "ESL25T3PK,ESL25T_3_Pack_Special,14.97,Y,PGE,09.00,0.0000";
productArray[62] = "ESL25T3PK,ESL25T_9_Pack_Special,44.91,Y,PGE,27.00,0.0000";
productArray[63] = "ESL25T3PK,ESL25T_36_Pack_Special,164.67,Y,PGE,30.00,0.0000";
productArray[64] = "ESL13T3PK,Mini_13W_Swirl_CFL_3_Pack,29.85,Y,PGE,09.00,0.0000";
productArray[65] = "ESL13T3PK,6_Pack_of_Mini_13W_Swirl_CFL,59.70,Y,PGE,18.00,0.0000";
productArray[66] = "ESL13T3PK,Case_of_12_13W_Mini_Swirl_CFL,109.45,Y,PGE,30.00,0.0000";
productArray[67] = "ESL15R30,15W_Feit_Reflector_CFL,11.95,Y,PGE,03.00,0.0000";
productArray[68] = "ESL15R30,6_Pack_of_15W_Feit_Reflector_CFL,71.70,Y,PGE,18.00,0.0000";
productArray[69] = "ESL15R30,Case_of_12_15W_Feit_Reflector_CFL,131.45,Y,PGE,30.00,0.0000";
productArray[70] = "GL15W/ELR30,15W_Greenlite_Reflector_CFL,14.32,Y,PGE,03.00,0.0000";
productArray[71] = "GL15W/ELR30,6_Pack_of_15W_Greenlite_Reflector_CFL,85.92,Y,PGE,18.00,0.0000";
productArray[72] = "GL15W/ELR30,Case_of_12_15W_Greenlite_Reflector_CFL,157.52,Y,PGE,30.00,0.0000";
productArray[73] = "GL15W/ELR30/S,15W_Super_Reflector_CFL,14.32,Y,PGE,03.00,0.0000";
productArray[74] = "GL15W/ELR30/S,6_Pack_of_15W_Super_Reflector_CFL,85.92,Y,PGE,18.00,0.0000";
productArray[75] = "GL15W/ELR30/S,Case_of_12_15W_Super_Reflector_CFL,157.52,Y,PGE,30.00,0.0000";
productArray[76] = "GL15W/ELS-DIM,15W_Dimmable_Swirl_CFL,16.95,Y,none,00.00,0.0000";
productArray[77] = "GL15W/ELS-DIM,6_Pack_of_15W_Dimmable_Swirl_CFL,101.70,Y,none,00.00,0.0000";
productArray[78] = "GL15W/ELS-DIM,Case_of_12_15W_Dimmable_Swirl_CFL,186.45,Y,none,00.00,0.0000";
productArray[79] = "GL20W/ELS-DIM,20W_Dimmable_Swirl_CFL,16.95,Y,none,00.00,0.0000";
productArray[80] = "GL20W/ELS-DIM,6_Pack_of_20W_Dimmable_Swirl_CFL,101.70,Y,none,00.00,0.0000";
productArray[81] = "GL20W/ELS-DIM,Case_of_12_20W_Dimmable_Swirl_CFL,186.45,Y,none,00.00,0.0000";
productArray[82] = "GL15W/ELS-M,15W_Greenlite_Mini_Swirl_CFL,7.95,Y,PGE,03.00,0.0000";
productArray[83] = "GL15W/ELS-M,6_Pack_of_15W_Greenlite_Mini_Swirl_CFL,47.70,Y,PGE,18.00,0.0000";
productArray[84] = "GL15W/ELS-M,Case_of_12_15W_Greenlite_Mini_Swirl_CFL,87.45,Y,PGE,30.00,0.0000";
productArray[85] = "ESL18TM,18W_Mini_Swirl_CFL,9.95,N,none,00.00,0.0000";
productArray[86] = "ESL18TM,6_Pack_of_18W_Mini_Swirl_CFL,59.70,N,none,00.00,0.0000";
productArray[87] = "ESL18TM,Case_of_12_18W_Mini_Swirl_CFL,109.45,N,none,00.00,0.0000";
productArray[88] = "ESL23TM,23W_Mini_Swirl_CFL,10.45,N,none,00.00,0.0000";
productArray[89] = "ESL23TM,6_Pack_of_23W_Mini_Swirl_CFL,62.70,N,none,00.00,0.0000";
productArray[90] = "ESL23TM,Case_of_12_23W_Mini_Swirl_CFL,114.95,N,none,00.00,0.0000";
productArray[91] = "DEC3-20-RED,20W_Swirl_Red_CFL,9.98,N,none,00.00,0.0000";
productArray[92] = "DEC3-20-RED,10_Pack_of_20W_Red_CFL,99.80,N,none,00.00,0.0000";
productArray[93] = "DEC3-20-RED,Case_of_50_20W_Red_CFL,449.10,N,none,00.00,0.0000";
productArray[94] = "ESL11T,11W_Swirl_CFL,7.98,N,none,00.00,0.0000";
productArray[95] = "ESL11T,6_Pack_of_11W_Swirl_CFL,47.88,N,none,00.00,0.0000";
productArray[96] = "ESL11T,Case_of_12_11W_Swirl_CFL,87.78,N,none,00.00,0.0000";
productArray[97] = "GL15W/ELS-Y,15W_Yellow_Swirl,9.98,N,none,00.00,0.1000";
productArray[98] = "GL15W/ELS-Y,6_Pack_15W_Yellow_Swirl,59.88,N,none,00.00,0.1000";
productArray[99] = "GL15W/ELS-Y,12_Pack_15W_Yellow_Swirl,109.78,N,none,00.00,0.1000";
productArray[100] = "GL15W/ELS-Y,Case_of_50_15W_Yellow_Swirl,449.10,N,none,00.00,0.1000";

var serviceArray = new Array();

// Services defined here will never incur shipping charges our product rebates.
serviceArray[0] = "NC468x60,468X60_Banner,25.00,N,none,00.00";
serviceArray[1] = "NC153X39,153X39_Banner,10.00,N,none,00.00";
serviceArray[2] = "NC2PACK,2_Pack_Banner_Special,30.00,N,none,00.00";
serviceArray[3] = "NC/WSAE,Web_Site_Analysis_Email,25.00,N,none,00.00";
serviceArray[4] = "NC/WSAS,Web_Site_Analysis_Special,45.00,N,none,00.00";
serviceArray[5] = "NC/COMBO,Banner_and_Analysis_Combo,70.00,N,none,00.00";
serviceArray[6] = "NC/EXPRESS,Express_Inclusion,20.00,N,none,00.00";
serviceArray[7] = "NC/BANNER_M,Monthly_Rental,10.00,N,none,00.00";
serviceArray[8] = "NC/BANNER_6,6_Month_Rental,42.00,N,none,00.00";
serviceArray[9] = "NC/BANNER_Y,1_Year_Rental,60.00,N,none,00.00";
serviceArray[10] = "NC/PBANNER_M,Monthly_Premier_Rental,50.00,N,none,00.00";
serviceArray[11] = "NC/PBANNER_6,6_Month_Premier_Rental,210.00,N,none,00.00";
serviceArray[12] = "NC/PBANNER_Y,1_Year_Premier_Rental,300.00,N,none,00.00";
serviceArray[13] = "NC/GIFT_CERT,Gift_Certificate,300.00,N,none,00.00";

// Info cookie definition.  The NoliCoInfo cookie contains information about the customer,  The following variables
// define the layout of the information such that the program can access information easily.
var emailAddrIndex	= 0;
var companyNameIndex	= 1;
var realNameIndex	= 2;
var AddressIndex	= 3;
var CityIndex		= 4;
var StateIndex		= 5;
var zipCodeIndex	= 6;
var phoneNumberIndex	= 7;
var taxableIndex	= 8;
var GiftCertIndex	= 9;
var GiftCertUsedIndex	= 10;
var MaxIndex		= 10;
       
//************************************************************************************************************

var rebateAvailable = 0;
var svpRebateAvailable = 0;

//************************************************************************************************************

var svpZipArray = new Array();		// Silicon Valley Power zipcodes.
svpZipArray[0] = "95050";
svpZipArray[1] = "95051";
svpZipArray[2] = "95052";
svpZipArray[3] = "95053";
svpZipArray[4] = "95054";

//************************************************************************************************************

var zipArray = new Array();
zipArray[0] = "93239,KETTLEMAN CITY,PGE";
zipArray[1] = "93241,LAMONT,PGE";
zipArray[2] = "93242,LATON,PGE";
zipArray[3] = "93243,LEBEC,PGE";
zipArray[4] = "93245,LEMOORE,PGE";
zipArray[5] = "93426,BRADLEY,PGE";
zipArray[6] = "93249,LOST HILLS,PGE";
zipArray[7] = "93427,BUELLTON,PGE";
zipArray[8] = "93250,MC FARLAND,PGE";
zipArray[9] = "93428,CAMBRIA,PGE";
zipArray[10] = "93251,MC KITTRICK,PGE";
zipArray[11] = "93429,CASMALIA,PGE";
zipArray[12] = "93252,MARICOPA,PGE";
zipArray[13] = "93430,CAYUCOS,PGE";
zipArray[14] = "93254,NEW CUYAMA,PGE";
zipArray[15] = "93431,CHOLAME,PGE";
zipArray[16] = "93432,CRESTON,PGE";
zipArray[17] = "93433,GROVER BEACH,PGE";
zipArray[18] = "93434,GUADALUPE,PGE";
zipArray[19] = "93435,HARMONY,PGE";
zipArray[20] = "93436,LOMPOC,PGE";
zipArray[21] = "93440,LOS ALAMOS,PGE";
zipArray[22] = "93441,LOS OLIVOS,PGE";
zipArray[23] = "93263,SHAFTER,PGE";
zipArray[24] = "93442,MORRO BAY,PGE";
zipArray[25] = "93444,NIPOMO,PGE";
zipArray[26] = "93266,STRATFORD,PGE";
zipArray[27] = "93445,OCEANO,PGE";
zipArray[28] = "93446,PASO ROBLES,PGE";
zipArray[29] = "93268,TAFT,PGE";
zipArray[30] = "93449,PISMO BEACH,PGE";
zipArray[31] = "93450,SAN ARDO,PGE";
zipArray[32] = "93451,SAN MIGUEL,PGE";
zipArray[33] = "93452,SAN SIMEON,PGE";
zipArray[34] = "93453,SN MARGARITA,PGE";
zipArray[35] = "93454,SANTA MARIA,PGE";
zipArray[36] = "93276,TUPMAN,PGE";
zipArray[37] = "93455,SANTA MARIA,PGE";
zipArray[38] = "93458,SANTA MARIA,PGE";
zipArray[39] = "93460,SANTA YNEZ,PGE";
zipArray[40] = "93280,WASCO,PGE";
zipArray[41] = "93461,SHANDON,PGE";
zipArray[42] = "93282,WAUKENA,PGE";
zipArray[43] = "93463,SOLVANG,PGE";
zipArray[44] = "93465,TEMPLETON,PGE";
zipArray[45] = "93301,BAKERSFIELD,PGE";
zipArray[46] = "93304,BAKERSFIELD,PGE";
zipArray[47] = "93305,BAKERSFIELD,PGE";
zipArray[48] = "93306,BAKERSFIELD,PGE";
zipArray[49] = "93307,BAKERSFIELD,PGE";
zipArray[50] = "93308,BAKERSFIELD,PGE";
zipArray[51] = "93309,BAKERSFIELD,PGE";
zipArray[52] = "93311,BAKERSFIELD,PGE";
zipArray[53] = "93312,BAKERSFIELD,PGE";
zipArray[54] = "93313,BAKERSFIELD,PGE";
zipArray[55] = "93401,SAN LUIS OBISPO,PGE";
zipArray[56] = "93402,LOS OSOS,PGE";
zipArray[57] = "93405,SAN LUIS OBISPO,PGE";
zipArray[58] = "93420,ARROYO GRANDE,PGE";
zipArray[59] = "93422,ATASCADERO,PGE";
zipArray[60] = "93424,AVILA BEACH,PGE";
zipArray[61] = "93646,ORANGE COVE,PGE";
zipArray[62] = "93647,OROSI,PGE";
zipArray[63] = "93648,PARLIER,PGE";
zipArray[64] = "93650,PINEDALE,PGE";
zipArray[65] = "93651,PRATHER,PGE";
zipArray[66] = "93652,RAISIN CITY,PGE";
zipArray[67] = "93653,RAYMOND,PGE";
zipArray[68] = "93654,REEDLEY,PGE";
zipArray[69] = "93656,RIVERDALE,PGE";
zipArray[70] = "93657,SANGER,PGE";
zipArray[71] = "93660,SAN JOAQUIN,PGE";
zipArray[72] = "93662,SELMA,PGE";
zipArray[73] = "93665,S DOS PALOS,PGE";
zipArray[74] = "93601,AHWAHNEE,PGE";
zipArray[75] = "93666,SULTANA,PGE";
zipArray[76] = "93602,AUBERRY,PGE";
zipArray[77] = "93667,TOLLHOUSE,PGE";
zipArray[78] = "93603,BADGER,PGE";
zipArray[79] = "93668,TRANQUILLITY,PGE";
zipArray[80] = "93604,BASS LAKE,PGE";
zipArray[81] = "93669,WISHON,PGE";
zipArray[82] = "93605,BIGCREEK,SCE";
zipArray[83] = "93670,YETTEM,PGE";
zipArray[84] = "93606,BIOLA,PGE";
zipArray[85] = "93673,TRAVER,PGE";
zipArray[86] = "93608,CANTUA CREEK,PGE";
zipArray[87] = "93675,SQUAW VALLEY,PGE";
zipArray[88] = "93609,CARUTHERS,PGE";
zipArray[89] = "93701,FRESNO,PGE";
zipArray[90] = "93610,CHOWCHILLA,PGE";
zipArray[91] = "93702,FRESNO,PGE";
zipArray[92] = "93611,CLOVIS,PGE";
zipArray[93] = "93703,FRESNO,PGE";
zipArray[94] = "93612,CLOVIS,PGE";
zipArray[95] = "93704,FRESNO,PGE";
zipArray[96] = "93614,COARSEGOLD,PGE";
zipArray[97] = "93705,FRESNO,PGE";
zipArray[98] = "93615,CUTLER,PGE";
zipArray[99] = "93706,FRESNO,PGE";
zipArray[100] = "93616,DEL REY,PGE";
zipArray[101] = "93710,FRESNO,PGE";
zipArray[102] = "93711,FRESNO,PGE";
zipArray[103] = "93618,DINUBA,PGE";
zipArray[104] = "93620,DOS PALOS,PGE";
zipArray[105] = "93720,FRESNO,PGE";
zipArray[106] = "93621,DUNLAP,PGE";
zipArray[107] = "93721,FRESNO,PGE";
zipArray[108] = "93622,FIREBAUGH,PGE";
zipArray[109] = "93722,FRESNO,PGE";
zipArray[110] = "93623,FISH CAMP,PGE";
zipArray[111] = "93725,FRESNO,PGE";
zipArray[112] = "93624,FIVE POINTS,PGE";
zipArray[113] = "93726,FRESNO,PGE";
zipArray[114] = "93625,FOWLER,PGE";
zipArray[115] = "93727,FRESNO,PGE";
zipArray[116] = "93626,FRIANT,PGE";
zipArray[117] = "93728,FRESNO,PGE";
zipArray[118] = "93627,HELM,PGE";
zipArray[119] = "93901,SALINAS,PGE";
zipArray[120] = "93628,HUME LAKE,PGE";
zipArray[121] = "93905,SALINAS,PGE";
zipArray[122] = "93906,SALINAS,PGE";
zipArray[123] = "93630,KERMAN,PGE";
zipArray[124] = "93907,SALINAS,PGE";
zipArray[125] = "93631,KINGSBURG,PGE";
zipArray[126] = "93908,SALINAS,PGE";
zipArray[127] = "93633,KINGS CANYON,PGE";
zipArray[128] = "93920,BIG SUR,PGE";
zipArray[129] = "93921,CARMEL,PGE";
zipArray[130] = "93635,LOS BANOS,PGE";
zipArray[131] = "93923,CARMEL,PGE";
zipArray[132] = "93637,MADERA,PGE";
zipArray[133] = "93924,CARMEL VLY,PGE";
zipArray[134] = "93638,MADERA,PGE";
zipArray[135] = "93925,CHUALAR,PGE";
zipArray[136] = "93640,MENDOTA,PGE";
zipArray[137] = "93926,GONZALES,PGE";
zipArray[138] = "93641,MIRAMONTE,PGE";
zipArray[139] = "93927,GREENFIELD,PGE";
zipArray[140] = "93643,NORTH FORK,PGE";
zipArray[141] = "93930,KING CITY,PGE";
zipArray[142] = "93644,OAKHURST,PGE";
zipArray[143] = "93932,LOCKWOOD,PGE";
zipArray[144] = "93645,ONEALS,PGE";
zipArray[145] = "93933,MARINA,PGE";
zipArray[146] = "93940,MONTEREY,PGE";
zipArray[147] = "94116,SN FRANCISCO,PGE";
zipArray[148] = "93950,PACIFIC GRV,PGE";
zipArray[149] = "94117,SN FRANCISCO,PGE";
zipArray[150] = "93953,PEBBLE BEACH,PGE";
zipArray[151] = "94118,SN FRANCISCO,PGE";
zipArray[152] = "93954,SAN LUCAS,PGE";
zipArray[153] = "94121,SN FRANCISCO,PGE";
zipArray[154] = "93955,SEASIDE,PGE";
zipArray[155] = "94122,SN FRANCISCO,PGE";
zipArray[156] = "93960,SOLEDAD,PGE";
zipArray[157] = "94123,SN FRANCISCO,PGE";
zipArray[158] = "93962,SPRECKELS,PGE";
zipArray[159] = "94124,SN FRANCISCO,PGE";
zipArray[160] = "94002,BELMONT,PGE";
zipArray[161] = "94127,SN FRANCISCO,PGE";
zipArray[162] = "94005,BRISBANE,PGE";
zipArray[163] = "94131,SN FRANCISCO,PGE";
zipArray[164] = "94010,BURLINGAME,PGE";
zipArray[165] = "94132,SN FRANCISCO,PGE";
zipArray[166] = "94014,DALY CITY/Colma,PGE";
zipArray[167] = "94133,SN FRANCISCO,PGE";
zipArray[168] = "94015,DALY CITY,PGE";
zipArray[169] = "94134,SN FRANCISCO,PGE";
zipArray[170] = "94018,EL GRANADA,PGE";
zipArray[171] = "94019,HLF MOON BAY,PGE";
zipArray[172] = "94303,E PALO ALTO,PGE";
zipArray[173] = "94020,LA HONDA,PGE";
zipArray[174] = "94305,STANFORD,PGE";
zipArray[175] = "94021,LOMA MAR,PGE";
zipArray[176] = "94401,SAN MATEO,PGE";
zipArray[177] = "94022,LOS ALTOS,PGE";
zipArray[178] = "94402,SAN MATEO,PGE";
zipArray[179] = "94024,LOS ALTOS,PGE";
zipArray[180] = "94403,SAN MATEO,PGE";
zipArray[181] = "94025,MENLO PARK,PGE";
zipArray[182] = "94404,FOSTER CITY/San Mateo,PGE";
zipArray[183] = "94027,ATHERTON,PGE";
zipArray[184] = "94502,ALAMEDA,PGE";
zipArray[185] = "94028,PORTOLA VLY,PGE";
zipArray[186] = "94506,DANVILLE,PGE";
zipArray[187] = "94030,MILLBRAE,PGE";
zipArray[188] = "94507,ALAMO,PGE";
zipArray[189] = "94037,MONTARA,PGE";
zipArray[190] = "94508,ANGWIN,PGE";
zipArray[191] = "94038,MOSS BEACH,PGE";
zipArray[192] = "94509,ANTIOCH,PGE";
zipArray[193] = "94040,MTN VIEW,PGE";
zipArray[194] = "94510,BENICIA,PGE";
zipArray[195] = "94041,MTN VIEW,PGE";
zipArray[196] = "94511,BETHEL IS,PGE";
zipArray[197] = "94043,MTN VIEW,PGE";
zipArray[198] = "94512,BIRDS LNDG,PGE";
zipArray[199] = "94044,PACIFICA,PGE";
zipArray[200] = "94513,BRENTWOOD,PGE";
zipArray[201] = "94060,PESCADERO,PGE";
zipArray[202] = "94514,BYRON,PGE";
zipArray[203] = "94061,REDWOOD CITY,PGE";
zipArray[204] = "94515,CALISTOGA,PGE";
zipArray[205] = "94062,REDWOOD CITY,PGE";
zipArray[206] = "94516,CANYON,PGE";
zipArray[207] = "94063,REDWOOD CITY,PGE";
zipArray[208] = "94517,CLAYTON,PGE";
zipArray[209] = "94065,REDWOOD CITY,PGE";
zipArray[210] = "94518,CONCORD,PGE";
zipArray[211] = "94066,SAN BRUNO,PGE";
zipArray[212] = "94519,CONCORD,PGE";
zipArray[213] = "94070,SAN CARLOS,PGE";
zipArray[214] = "94520,CONCORD,PGE";
zipArray[215] = "94074,SAN GREGORIO,PGE";
zipArray[216] = "94521,CONCORD,PGE";
zipArray[217] = "94080,S SN FRNCSCO,PGE";
zipArray[218] = "94523,PLEASANT HL,PGE";
zipArray[219] = "94086,SUNNYVALE,PGE";
zipArray[220] = "94525,CROCKETT,PGE";
zipArray[221] = "94087,SUNNYVALE,PGE";
zipArray[222] = "94526,DANVILLE,PGE";
zipArray[223] = "94089,SUNNYVALE,PGE";
zipArray[224] = "94528,DIABLO,PGE";
zipArray[225] = "94102,SN FRANCISCO,PGE";
zipArray[226] = "94530,EL CERRITO,PGE";
zipArray[227] = "94103,SN FRANCISCO,PGE";
zipArray[228] = "94533,FAIRFIELD,PGE";
zipArray[229] = "94104,SN FRANCISCO,PGE";
zipArray[230] = "94535,FAIRFIELD,PGE";
zipArray[231] = "94105,SN FRANCISCO,PGE";
zipArray[232] = "94536,FREMONT,PGE";
zipArray[233] = "94107,SN FRANCISCO,PGE";
zipArray[234] = "94538,FREMONT,PGE";
zipArray[235] = "94108,SN FRANCISCO,PGE";
zipArray[236] = "94539,FREMONT,PGE";
zipArray[237] = "94109,SN FRANCISCO,PGE";
zipArray[238] = "94541,HAYWARD,PGE";
zipArray[239] = "94110,SN FRANCISCO,PGE";
zipArray[240] = "94542,HAYWARD,PGE";
zipArray[241] = "94111,SN FRANCISCO,PGE";
zipArray[242] = "94544,HAYWARD,PGE";
zipArray[243] = "94112,SN FRANCISCO,PGE";
zipArray[244] = "94545,HAYWARD,PGE";
zipArray[245] = "94114,SN FRANCISCO,PGE";
zipArray[246] = "94546,CASTRO VLY,PGE";
zipArray[247] = "94115,SN FRANCISCO,PGE";
zipArray[248] = "94547,HERCULES,PGE";
zipArray[249] = "94548,KNIGHTSEN,PGE";
zipArray[250] = "94613,OAKLAND,PGE";
zipArray[251] = "94549,LAFAYETTE,PGE";
zipArray[252] = "94618,OAKLAND,PGE";
zipArray[253] = "94550,LIVERMORE,PGE";
zipArray[254] = "94619,OAKLAND,PGE";
zipArray[255] = "94552,CASTRO VLY,PGE";
zipArray[256] = "94621,OAKLAND,PGE";
zipArray[257] = "94553,MARTINEZ,PGE";
zipArray[258] = "94702,BERKELEY,PGE";
zipArray[259] = "94555,FREMONT,PGE";
zipArray[260] = "94703,BERKELEY,PGE";
zipArray[261] = "94556,MORAGA,PGE";
zipArray[262] = "94704,BERKELEY,PGE";
zipArray[263] = "94558,NAPA,PGE";
zipArray[264] = "94705,BERKELEY,PGE";
zipArray[265] = "94559,NAPA,PGE";
zipArray[266] = "94706,ALBANY,PGE";
zipArray[267] = "94560,NEWARK,PGE";
zipArray[268] = "94707,BERKELEY,PGE";
zipArray[269] = "94561,OAKLEY,PGE";
zipArray[270] = "94708,BERKELEY,PGE";
zipArray[271] = "94562,OAKVILLE,PGE";
zipArray[272] = "94709,BERKELEY,PGE";
zipArray[273] = "94563,ORINDA,PGE";
zipArray[274] = "94710,BERKELEY,PGE";
zipArray[275] = "94564,PINOLE,PGE";
zipArray[276] = "94720,BERKELEY,PGE";
zipArray[277] = "94565,PITTSBURG,PGE";
zipArray[278] = "94801,RICHMOND,PGE";
zipArray[279] = "94566,PLEASANTON,PGE";
zipArray[280] = "94803,EL SOBRANTE,PGE";
zipArray[281] = "94567,POPE VALLEY,PGE";
zipArray[282] = "94804,RICHMOND,PGE";
zipArray[283] = "94568,DUBLIN,PGE";
zipArray[284] = "94805,RICHMOND,PGE";
zipArray[285] = "94569,PORT COSTA,PGE";
zipArray[286] = "94806,SAN PABLO,PGE";
zipArray[287] = "94571,RIO VISTA,PGE";
zipArray[288] = "94901,SAN RAFAEL,PGE";
zipArray[289] = "94572,RODEO,PGE";
zipArray[290] = "94903,SAN RAFAEL,PGE";
zipArray[291] = "94573,RUTHERFORD,PGE";
zipArray[292] = "94904,KENTFIELD,PGE";
zipArray[293] = "94574,ST HELENA,PGE";
zipArray[294] = "94920,TIBURON,PGE";
zipArray[295] = "94576,DEER PARK,PGE";
zipArray[296] = "94922,BODEGA,PGE";
zipArray[297] = "94577,SAN LEANDRO,PGE";
zipArray[298] = "94923,BODEGA BAY,PGE";
zipArray[299] = "94578,SAN LEANDRO,PGE";
zipArray[300] = "94924,BOLINAS,PGE";
zipArray[301] = "94579,SAN LEANDRO,PGE";
zipArray[302] = "94925,CORTE MADERA,PGE";
zipArray[303] = "94580,SAN LORENZO,PGE";
zipArray[304] = "94928,ROHNERT PARK,PGE";
zipArray[305] = "94583,SAN RAMON,PGE";
zipArray[306] = "94929,DILLON BEACH,PGE";
zipArray[307] = "94585,SUISUN/Fairfield,PGE";
zipArray[308] = "94930,FAIRFAX,PGE";
zipArray[309] = "94586,SUNOL,PGE";
zipArray[310] = "94931,COTATI,PGE";
zipArray[311] = "94587,UNION CITY,PGE";
zipArray[312] = "94933,FOREST KNLLS,PGE";
zipArray[313] = "94588,PLEASANTON,PGE";
zipArray[314] = "94937,INVERNESS,PGE";
zipArray[315] = "94589,VALLEJO,PGE";
zipArray[316] = "94938,LAGUNITAS,PGE";
zipArray[317] = "94590,VALLEJO,PGE";
zipArray[318] = "94939,LARKSPUR,PGE";
zipArray[319] = "94591,VALLEJO,PGE";
zipArray[320] = "94940,MARSHALL,PGE";
zipArray[321] = "94595,WALNUT CREEK,PGE";
zipArray[322] = "94941,MILL VALLEY,PGE";
zipArray[323] = "94596,WALNUT CREEK,PGE";
zipArray[324] = "94945,NOVATO,PGE";
zipArray[325] = "94598,WALNUT CREEK,PGE";
zipArray[326] = "94946,NICASIO,PGE";
zipArray[327] = "94599,YOUNTVILLE,PGE";
zipArray[328] = "94947,NOVATO,PGE";
zipArray[329] = "94601,OAKLAND,PGE";
zipArray[330] = "94949,NOVATO,PGE";
zipArray[331] = "94602,OAKLAND,PGE";
zipArray[332] = "94950,OLEMA,PGE";
zipArray[333] = "94603,OAKLAND,PGE";
zipArray[334] = "94951,PENNGROVE,PGE";
zipArray[335] = "94604,OAKLAND,PGE";
zipArray[336] = "94952,PETALUMA,PGE";
zipArray[337] = "94605,OAKLAND,PGE";
zipArray[338] = "94954,PETALUMA,PGE";
zipArray[339] = "94606,OAKLAND,PGE";
zipArray[340] = "94956,PT REYES,PGE";
zipArray[341] = "94607,OAKLAND,PGE";
zipArray[342] = "94957,ROSS,PGE";
zipArray[343] = "94608,OAKLAND/Emeryville,PGE";
zipArray[344] = "94960,SAN ANSELMO,PGE";
zipArray[345] = "94609,OAKLAND,PGE";
zipArray[346] = "94963,SAN GERONIMO,PGE";
zipArray[347] = "94610,OAKLAND,PGE";
zipArray[348] = "94964,SAN QUENTIN,PGE";
zipArray[349] = "94611,OAKLAND,PGE";
zipArray[350] = "94965,SAUSALITO,PGE";
zipArray[351] = "94612,OAKLAND,PGE";
zipArray[352] = "94970,STINSON BCH,PGE";
zipArray[353] = "94971,TOMALES,PGE";
zipArray[354] = "95123,SAN JOSE,PGE";
zipArray[355] = "94972,VALLEY FORD,PGE";
zipArray[356] = "95124,SAN JOSE,PGE";
zipArray[357] = "94973,WOODACRE,PGE";
zipArray[358] = "95125,SAN JOSE,PGE";
zipArray[359] = "95002,ALVISO,PGE";
zipArray[360] = "95126,SAN JOSE,PGE";
zipArray[361] = "95003,APTOS,PGE";
zipArray[362] = "95127,SAN JOSE,PGE";
zipArray[363] = "95004,AROMAS,PGE";
zipArray[364] = "95128,SAN JOSE,PGE";
zipArray[365] = "95005,BEN LOMOND,PGE";
zipArray[366] = "95129,SAN JOSE,PGE";
zipArray[367] = "95006,BOULDER CRK,PGE";
zipArray[368] = "95130,SAN JOSE,PGE";
zipArray[369] = "95007,BROOKDALE,PGE";
zipArray[370] = "95131,SAN JOSE,PGE";
zipArray[371] = "95008,CAMPBELL,PGE";
zipArray[372] = "95132,SAN JOSE,PGE";
zipArray[373] = "95010,CAPITOLA,PGE";
zipArray[374] = "95133,SAN JOSE,PGE";
zipArray[375] = "95012,CASTROVILLE,PGE";
zipArray[376] = "95134,SAN JOSE,PGE";
zipArray[377] = "95013,COYOTE,PGE";
zipArray[378] = "95135,SAN JOSE,PGE";
zipArray[379] = "95014,CUPERTINO,PGE";
zipArray[380] = "95136,SAN JOSE,PGE";
zipArray[381] = "95017,DAVENPORT,PGE";
zipArray[382] = "95138,SAN JOSE,PGE";
zipArray[383] = "95018,FELTON,PGE";
zipArray[384] = "95139,SAN JOSE,PGE";
zipArray[385] = "95019,FREEDOM,PGE";
zipArray[386] = "95140,SAN JOSE,PGE";
zipArray[387] = "95020,GILROY,PGE";
zipArray[388] = "95141,SAN JOSE,PGE";
zipArray[389] = "95023,HOLLISTER,PGE";
zipArray[390] = "95148,SAN JOSE,PGE";
zipArray[391] = "95030,LOS GATOS,PGE";
zipArray[392] = "95202,STOCKTON,PGE";
zipArray[393] = "95032,LOS GATOS,PGE";
zipArray[394] = "95203,STOCKTON,PGE";
zipArray[395] = "95033,LOS GATOS,PGE";
zipArray[396] = "95204,STOCKTON,PGE";
zipArray[397] = "95035,MILPITAS,PGE";
zipArray[398] = "95205,STOCKTON,PGE";
zipArray[399] = "95037,MORGAN HILL,PGE";
zipArray[400] = "95206,STOCKTON,PGE";
zipArray[401] = "95039,MOSS LANDING,PGE";
zipArray[402] = "95207,STOCKTON,PGE";
zipArray[403] = "95041,MT HERMON,PGE";
zipArray[404] = "95209,STOCKTON,PGE";
zipArray[405] = "95043,PAICINES,PGE";
zipArray[406] = "95210,STOCKTON,PGE";
zipArray[407] = "95044,RWD ESTATES,PGE";
zipArray[408] = "95212,STOCKTON,PGE";
zipArray[409] = "95045,SAN JN BTSTA,PGE";
zipArray[410] = "95215,STOCKTON,PGE";
zipArray[411] = "95046,SAN MARTIN,PGE";
zipArray[412] = "95219,STOCKTON,PGE";
zipArray[413] = "95050,SANTA CLARA,PGE";
zipArray[414] = "95220,ACAMPO,PGE";
zipArray[415] = "95054,SANTA CLARA,PGE";
zipArray[416] = "95221,ANGELS CAMP,PGE";
zipArray[417] = "95060,SANTA CRUZ,PGE";
zipArray[418] = "95222,ANGELS CAMP,PGE";
zipArray[419] = "95062,SANTA CRUZ,PGE";
zipArray[420] = "95223,ARNOLD,PGE";
zipArray[421] = "95064,SANTA CRUZ,PGE";
zipArray[422] = "95224,AVERY,PGE";
zipArray[423] = "95065,SANTA CRUZ,PGE";
zipArray[424] = "95225,BURSON,PGE";
zipArray[425] = "95066,SCOTTS VLY,PGE";
zipArray[426] = "95226,CAMPO SECO,PGE";
zipArray[427] = "95070,SARATOGA,PGE";
zipArray[428] = "95227,CLEMENTS,PGE";
zipArray[429] = "95073,SOQUEL,PGE";
zipArray[430] = "95228,COPPEROPOLIS,PGE";
zipArray[431] = "95075,TRES PINOS,PGE";
zipArray[432] = "95229,DOUGLAS FLAT,PGE";
zipArray[433] = "95076,WATSONVILLE,PGE";
zipArray[434] = "95230,FARMINGTON,PGE";
zipArray[435] = "95110,SAN JOSE,PGE";
zipArray[436] = "95231,FRENCH CAMP,PGE";
zipArray[437] = "95111,SAN JOSE,PGE";
zipArray[438] = "95232,GLENCOE,PGE";
zipArray[439] = "95112,SAN JOSE,PGE";
zipArray[440] = "95233,HATHAWAY PNS,PGE";
zipArray[441] = "95113,SAN JOSE,PGE";
zipArray[442] = "95236,LINDEN,PGE";
zipArray[443] = "95116,SAN JOSE,PGE";
zipArray[444] = "95237,LOCKEFORD,PGE";
zipArray[445] = "95117,SAN JOSE,PGE";
zipArray[446] = "95240,LODI,PGE";
zipArray[447] = "95118,SAN JOSE,PGE";
zipArray[448] = "95242,LODI,PGE";
zipArray[449] = "95119,SAN JOSE,PGE";
zipArray[450] = "95245,MOKELUMNE HL,PGE";
zipArray[451] = "95120,SAN JOSE,PGE";
zipArray[452] = "95246,MTN RANCH,PGE";
zipArray[453] = "95121,SAN JOSE,PGE";
zipArray[454] = "95247,MURPHYS,PGE";
zipArray[455] = "95122,SAN JOSE,PGE";
zipArray[456] = "95248,RAIL RD FLAT,PGE";
zipArray[457] = "95249,SAN ANDREAS,PGE";
zipArray[458] = "95376,TRACY,PGE";
zipArray[459] = "95250,SHEEP RANCH,PGE";
zipArray[460] = "95379,TUOLUMNE,PGE";
zipArray[461] = "95251,VALLECITO,PGE";
zipArray[462] = "95383,TWAIN HARTE,PGE";
zipArray[463] = "95252,VALLEY SPGS,PGE";
zipArray[464] = "95385,VERNALIS,PGE";
zipArray[465] = "95253,VICTOR,PGE";
zipArray[466] = "95386,WATERFORD,PGE";
zipArray[467] = "95254,WALLACE,PGE";
zipArray[468] = "95387,WESTLEY,PGE";
zipArray[469] = "95255,WEST POINT,PGE";
zipArray[470] = "95388,WINTON,PGE";
zipArray[471] = "95257,WILSEYVILLE,PGE";
zipArray[472] = "95389,YOSEMITE,PGE";
zipArray[473] = "95258,WOODBRIDGE,PGE";
zipArray[474] = "95401,SANTA ROSA,PGE";
zipArray[475] = "95301,ATWATER,PGE";
zipArray[476] = "95403,SANTA ROSA,PGE";
zipArray[477] = "95303,BALLICO,PGE";
zipArray[478] = "95404,SANTA ROSA,PGE";
zipArray[479] = "95304,BANTA,PGE";
zipArray[480] = "95405,SANTA ROSA,PGE";
zipArray[481] = "95306,CATHEYS VLY,PGE";
zipArray[482] = "95407,SANTA ROSA,PGE";
zipArray[483] = "95309,CHINESE CAMP,PGE";
zipArray[484] = "95409,SANTA ROSA,PGE";
zipArray[485] = "95310,COLUMBIA,PGE";
zipArray[486] = "95410,ALBION,PGE";
zipArray[487] = "95311,COULTERVILLE,PGE";
zipArray[488] = "95412,ANNAPOLIS,PGE";
zipArray[489] = "95312,CRESSEY,PGE";
zipArray[490] = "95415,BOONVILLE,PGE";
zipArray[491] = "95313,CROWS LNDG,PGE";
zipArray[492] = "95417,BRANSCOMB,PGE";
zipArray[493] = "95316,DENAIR,PGE";
zipArray[494] = "95419,CAMP MEEKER,PGE";
zipArray[495] = "95317,EL NIDO,PGE";
zipArray[496] = "95420,CASPAR,PGE";
zipArray[497] = "95318,EL PORTAL,PGE";
zipArray[498] = "95421,CAZADERO,PGE";
zipArray[499] = "95320,ESCALON,PGE";
zipArray[500] = "95422,CLEARLAKE,PGE";
zipArray[501] = "95321,GROVELAND,PGE";
zipArray[502] = "95423,CLRLK OAKS,PGE";
zipArray[503] = "95322,GUSTINE,PGE";
zipArray[504] = "95424,CLRLK PARK,PGE";
zipArray[505] = "95324,HILMAR,PGE";
zipArray[506] = "95425,CLOVERDALE,PGE";
zipArray[507] = "95325,HORNITOS,PGE";
zipArray[508] = "95426,COBB,PGE";
zipArray[509] = "95327,JAMESTOWN,PGE";
zipArray[510] = "95427,COMPTCHE,PGE";
zipArray[511] = "95329,LA GRANGE,PGE";
zipArray[512] = "95428,COVELO,PGE";
zipArray[513] = "95330,LATHROP,PGE";
zipArray[514] = "95429,DOS RIOS,PGE";
zipArray[515] = "95333,LE GRAND,PGE";
zipArray[516] = "95430,DUNCAN MILLS/Merced,PGE";
zipArray[517] = "95334,LIVINGSTON,PGE";
zipArray[518] = "95432,ELK,PGE";
zipArray[519] = "95335,LONG BARN,PGE";
zipArray[520] = "95435,FINLEY,PGE";
zipArray[521] = "95336,MANTECA,PGE";
zipArray[522] = "95436,FORESTVILLE,PGE";
zipArray[523] = "95337,MANTECA,PGE";
zipArray[524] = "95437,FORT BRAGG,PGE";
zipArray[525] = "95338,MARIPOSA,PGE";
zipArray[526] = "95439,FULTON,PGE";
zipArray[527] = "95340,MERCED,PGE";
zipArray[528] = "95441,GEYSERVILLE,PGE";
zipArray[529] = "95345,MIDPINES,PGE";
zipArray[530] = "95442,GLEN ELLEN,PGE";
zipArray[531] = "95346,MI WUK VLG,PGE";
zipArray[532] = "95443,GLENHAVEN,PGE";
zipArray[533] = "95348,MERCED,PGE";
zipArray[534] = "95444,GRATON,PGE";
zipArray[535] = "95357,MODESTO,PGE";
zipArray[536] = "95445,GUALALA,PGE";
zipArray[537] = "95360,NEWMAN,PGE";
zipArray[538] = "95446,GUERNEVILLE,PGE";
zipArray[539] = "95361,OAKDALE,PGE";
zipArray[540] = "95448,HEALDSBURG,PGE";
zipArray[541] = "95363,PATTERSON,PGE";
zipArray[542] = "95449,HOPLAND,PGE";
zipArray[543] = "95364,PINECREST,PGE";
zipArray[544] = "95450,JENNER,PGE";
zipArray[545] = "95365,PLANADA,PGE";
zipArray[546] = "95451,KELSEYVILLE,PGE";
zipArray[547] = "95366,RIPON,PGE";
zipArray[548] = "95452,KENWOOD,PGE";
zipArray[549] = "95367,RIVERBANK,PGE";
zipArray[550] = "95453,LAKEPORT,PGE";
zipArray[551] = "95369,SNELLING,PGE";
zipArray[552] = "95454,LAYTONVILLE,PGE";
zipArray[553] = "95370,SONORA,PGE";
zipArray[554] = "95456,LITTLE RIVER,PGE";
zipArray[555] = "95372,SOULSBYVILLE,PGE";
zipArray[556] = "95457,LOWER LAKE,PGE";
zipArray[557] = "95374,STEVINSON,PGE";
zipArray[558] = "95458,LUCERNE,PGE";
zipArray[559] = "95375,STRAWBERRY,PGE";
zipArray[560] = "95459,MANCHESTER,PGE";
zipArray[561] = "95460,MENDOCINO,PGE";
zipArray[562] = "95560,REDWAY,PGE";
zipArray[563] = "95461,MIDDLETOWN,PGE";
zipArray[564] = "95562,RIO DELL,PGE";
zipArray[565] = "95462,MONTE RIO,PGE";
zipArray[566] = "95563,SALYER,PGE";
zipArray[567] = "95463,NAVARRO,PGE";
zipArray[568] = "95564,SAMOA,PGE";
zipArray[569] = "95464,NICE,PGE";
zipArray[570] = "95565,SCOTIA,PGE";
zipArray[571] = "95465,OCCIDENTAL,PGE";
zipArray[572] = "95568,SOMES BAR,PGE";
zipArray[573] = "95466,PHILO,PGE";
zipArray[574] = "95569,REDCREST,PGE";
zipArray[575] = "95468,POINT ARENA,PGE";
zipArray[576] = "95570,TRINIDAD,PGE";
zipArray[577] = "95469,POTTER VLY,PGE";
zipArray[578] = "95571,WEOTT,PGE";
zipArray[579] = "95470,REDWOOD VLY,PGE";
zipArray[580] = "95573,WILLOW CREEK,PGE";
zipArray[581] = "95471,RIO NIDO,PGE";
zipArray[582] = "95585,LEGGETT,PGE";
zipArray[583] = "95472,SEBASTOPOL,PGE";
zipArray[584] = "95587,PIERCY,PGE";
zipArray[585] = "95476,SONOMA,PGE";
zipArray[586] = "95589,WHITETHORN,PGE";
zipArray[587] = "95477,CUMMINGS,PGE";
zipArray[588] = "95595,ZENIA,PGE";
zipArray[589] = "95480,STEWARTS PT,PGE";
zipArray[590] = "95601,AMADOR CITY,PGE";
zipArray[591] = "95482,UKIAH,PGE";
zipArray[592] = "95602,AUBURN,PGE";
zipArray[593] = "95485,UPPER LAKE,PGE";
zipArray[594] = "95603,AUBURN,PGE";
zipArray[595] = "95486,VILLA GRANDE,PGE";
zipArray[596] = "95605,W SACRAMENTO,PGE";
zipArray[597] = "95488,WESTPORT,PGE";
zipArray[598] = "95606,BROOKS,PGE";
zipArray[599] = "95490,WILLITS,PGE";
zipArray[600] = "95607,CAPAY,PGE";
zipArray[601] = "95492,WINDSOR,PGE";
zipArray[602] = "95612,CLARKSBURG,PGE";
zipArray[603] = "95493,WITTER SPG,PGE";
zipArray[604] = "95613,COLOMA,PGE";
zipArray[605] = "95494,YORKVILLE,PGE";
zipArray[606] = "95614,COOL,PGE";
zipArray[607] = "95497,SEA RANCH,PGE";
zipArray[608] = "95615,COURTLAND,PGE";
zipArray[609] = "95501,EUREKA,PGE";
zipArray[610] = "95616,DAVIS,PGE";
zipArray[611] = "95503,EUREKA,PGE";
zipArray[612] = "95618,EL MACERO,PGE";
zipArray[613] = "95511,ALDERPOINT,PGE";
zipArray[614] = "95619,DIAMOND SPGS,PGE";
zipArray[615] = "95514,BLOCKSBURG,PGE";
zipArray[616] = "95620,DIXON,PGE";
zipArray[617] = "95519,MC KINLEYVL,PGE";
zipArray[618] = "95623,EL DORADO,PGE";
zipArray[619] = "95521,ARCATA,PGE";
zipArray[620] = "95625,ELMIRA,PGE";
zipArray[621] = "95524,BAYSIDE,PGE";
zipArray[622] = "95626,ELVERTA,PGE";
zipArray[623] = "95525,BLUE LAKE,PGE";
zipArray[624] = "95627,ESPARTO,PGE";
zipArray[625] = "95526,BRIDGEVILLE,PGE";
zipArray[626] = "95629,FIDDLETOWN,PGE";
zipArray[627] = "95527,BURNT RANCH,PGE";
zipArray[628] = "95631,FORESTHILL,PGE";
zipArray[629] = "95528,CARLOTTA,PGE";
zipArray[630] = "95632,GALT,PGE";
zipArray[631] = "95536,FERNDALE,PGE";
zipArray[632] = "95633,GARDEN VLY,PGE";
zipArray[633] = "95537,FIELDS LNDG,PGE";
zipArray[634] = "95634,GEORGETOWN,PGE";
zipArray[635] = "95540,FORTUNA,PGE";
zipArray[636] = "95635,GREENWOOD,PGE";
zipArray[637] = "95542,GARBERVILLE,PGE";
zipArray[638] = "95636,GRIZZLY FLAT,PGE";
zipArray[639] = "95545,HONEYDEW,PGE";
zipArray[640] = "95637,GUINDA,PGE";
zipArray[641] = "95546,HOOPA,PGE";
zipArray[642] = "95640,IONE,PGE";
zipArray[643] = "95547,HYDESVILLE,PGE";
zipArray[644] = "95641,ISLETON,PGE";
zipArray[645] = "95549,KNEELAND,PGE";
zipArray[646] = "95642,JACKSON,PGE";
zipArray[647] = "95550,KORBEL,PGE";
zipArray[648] = "95643,KELSEY,PGE";
zipArray[649] = "95551,LOLETA,PGE";
zipArray[650] = "95645,KNIGHTS LNDG,PGE";
zipArray[651] = "95552,MAD RIVER,PGE";
zipArray[652] = "95648,LINCOLN/Roseville,PGE";
zipArray[653] = "95553,MIRANDA,PGE";
zipArray[654] = "95650,LOOMIS,PGE";
zipArray[655] = "95554,MYERS FLAT,PGE";
zipArray[656] = "95651,LOTUS,PGE";
zipArray[657] = "95555,ORICK,PGE";
zipArray[658] = "95653,MADISON,PGE";
zipArray[659] = "95556,ORLEANS,PGE";
zipArray[660] = "95654,MARTELL,PGE";
zipArray[661] = "95558,PETROLIA,PGE";
zipArray[662] = "95656,MT AUKUM,PGE";
zipArray[663] = "95559,PHILLIPSVL,PGE";
zipArray[664] = "95658,NEWCASTLE,PGE";
zipArray[665] = "95659,NICOLAUS,PGE";
zipArray[666] = "95821,SACRAMENTO,PGE";
zipArray[667] = "95661,ROSEVILLE,PGE";
zipArray[668] = "95823,SACRAMENTO,PGE";
zipArray[669] = "95663,PENRYN,PGE";
zipArray[670] = "95837,SACRAMENTO,PGE";
zipArray[671] = "95664,PILOT HILL,PGE";
zipArray[672] = "95901,MARYSVILLE,PGE";
zipArray[673] = "95665,PINE GROVE,PGE";
zipArray[674] = "95910,ALLEGHANY,PGE";
zipArray[675] = "95666,PIONEER,PGE";
zipArray[676] = "95912,ARBUCKLE,PGE";
zipArray[677] = "95667,PLACERVILLE,PGE";
zipArray[678] = "95913,ARTOIS,PGE";
zipArray[679] = "95668,PLEASANT GRV,PGE";
zipArray[680] = "95914,BANGOR,PGE";
zipArray[681] = "95669,PLYMOUTH,PGE";
zipArray[682] = "95915,BELDEN,PGE";
zipArray[683] = "95672,RESCUE,PGE";
zipArray[684] = "95916,BERRY CREEK,PGE";
zipArray[685] = "95674,RIO OSO,PGE";
zipArray[686] = "95917,BIGGS,PGE";
zipArray[687] = "95675,RIVER PINES,PGE";
zipArray[688] = "95918,BROWNS VLY,PGE";
zipArray[689] = "95676,ROBBINS,PGE";
zipArray[690] = "95919,BROWNSVILLE,PGE";
zipArray[691] = "95677,ROCKLIN,PGE";
zipArray[692] = "95920,BUTTE CITY,PGE";
zipArray[693] = "95678,ROSEVILLE,PGE";
zipArray[694] = "95922,CAMPTONVILLE,PGE";
zipArray[695] = "95679,RUMSEY,PGE";
zipArray[696] = "95923,CANYONDAM,PGE";
zipArray[697] = "95681,SHERIDAN,PGE";
zipArray[698] = "95925,CHALLENGE,PGE";
zipArray[699] = "95682,CAMERON PARK,PGE";
zipArray[700] = "95926,CHICO,PGE";
zipArray[701] = "95684,SOMERSET,PGE";
zipArray[702] = "95928,CHICO/Clovis,PGE";
zipArray[703] = "95685,SUTTER CREEK,PGE";
zipArray[704] = "95930,CLIPPER MLS,PGE";
zipArray[705] = "95686,THORNTON,PGE";
zipArray[706] = "95931,COLLEGE CITY,PGE";
zipArray[707] = "95687,VACAVILLE,PGE";
zipArray[708] = "95932,COLUSA,PGE";
zipArray[709] = "95688,VACAVILLE,PGE";
zipArray[710] = "95934,CRESCENT MLS,PGE";
zipArray[711] = "95689,VOLCANO,PGE";
zipArray[712] = "95935,DOBBINS,PGE";
zipArray[713] = "95690,WALNUT GROVE,PGE";
zipArray[714] = "95936,DOWNIEVILLE,PGE";
zipArray[715] = "95691,W SACRAMENTO,PGE";
zipArray[716] = "95937,DUNNIGAN,PGE";
zipArray[717] = "95692,WHEATLAND,PGE";
zipArray[718] = "95938,DURHAM,PGE";
zipArray[719] = "95694,WINTERS,PGE";
zipArray[720] = "95939,ELK CREEK,PGE";
zipArray[721] = "95695,WOODLAND,PGE";
zipArray[722] = "95941,FORBESTOWN,PGE";
zipArray[723] = "95697,YOLO,PGE";
zipArray[724] = "95942,FOREST RANCH,PGE";
zipArray[725] = "95698,ZAMORA,PGE";
zipArray[726] = "95943,GLENN,PGE";
zipArray[727] = "95699,DRYTOWN,PGE";
zipArray[728] = "95944,GOODYRS BAR,PGE";
zipArray[729] = "95701,ALTA,PGE";
zipArray[730] = "95945,GRASS VALLEY,PGE";
zipArray[731] = "95703,APPLEGATE,PGE";
zipArray[732] = "95946,PENN VALLEY,PGE";
zipArray[733] = "95704,BAXTER,PGE";
zipArray[734] = "95947,GREENVILLE,PGE";
zipArray[735] = "95709,CAMINO,PGE";
zipArray[736] = "95948,GRIDLEY,PGE";
zipArray[737] = "95713,COLFAX,PGE";
zipArray[738] = "95949,GRASS VALLEY,PGE";
zipArray[739] = "95714,DUTCH FLAT,PGE";
zipArray[740] = "95950,GRIMES,PGE";
zipArray[741] = "95715,EMIGRANT GAP,PGE";
zipArray[742] = "95951,HAMILTON CTY,PGE";
zipArray[743] = "95717,GOLD RUN,PGE";
zipArray[744] = "95952,KEDDIE,PGE";
zipArray[745] = "95720,KYBURZ,PGE";
zipArray[746] = "95953,LIVE OAK,PGE";
zipArray[747] = "95721,LITTLE NORWY,PGE";
zipArray[748] = "95954,MAGALIA,PGE";
zipArray[749] = "95722,MEADOW VISTA,PGE";
zipArray[750] = "95955,MAXWELL,PGE";
zipArray[751] = "95726,POLLOCK PNS,PGE";
zipArray[752] = "95956,MEADOW VLY,PGE";
zipArray[753] = "95728,SODA SPRINGS,PGE";
zipArray[754] = "95957,MERIDIAN,PGE";
zipArray[755] = "95735,TWIN BRIDGES,PGE";
zipArray[756] = "95958,NELSON,PGE";
zipArray[757] = "95736,WEIMAR,PGE";
zipArray[758] = "95959,NEVADA CITY,PGE";
zipArray[759] = "95746,GRANITE BAY,PGE";
zipArray[760] = "95960,N SAN JUAN,PGE";
zipArray[761] = "95747,ROSEVILLE,PGE";
zipArray[762] = "95961,OLIVEHURST,PGE";
zipArray[763] = "95762,EL DORADO HL,PGE";
zipArray[764] = "95962,OREGON HOUSE,PGE";
zipArray[765] = "95765,ROCKLIN,PGE";
zipArray[766] = "95963,ORLAND,PGE";
zipArray[767] = "95776,WOODLAND,PGE";
zipArray[768] = "95965,OROVILLE,PGE";
zipArray[769] = "95966,OROVILLE,PGE";
zipArray[770] = "96055,LOS MOLINOS,PGE";
zipArray[771] = "95968,PALERMO,PGE";
zipArray[772] = "96056,MC ARTHUR,PGE";
zipArray[773] = "95969,PARADISE,PGE";
zipArray[774] = "96059,MANTON,PGE";
zipArray[775] = "95970,PRINCETON,PGE";
zipArray[776] = "96061,MILL CREEK,PGE";
zipArray[777] = "95971,QUINCY,PGE";
zipArray[778] = "96062,MILLVILLE,PGE";
zipArray[779] = "95972,RACKERBY,PGE";
zipArray[780] = "96063,MINERAL,PGE";
zipArray[781] = "95973,CHICO,PGE";
zipArray[782] = "96065,MONTGMRY CRK,PGE";
zipArray[783] = "95974,RICHVALE,PGE";
zipArray[784] = "96068,NUBIEBER,PGE";
zipArray[785] = "95975,ROUGH READY,PGE";
zipArray[786] = "96069,OAK RUN,PGE";
zipArray[787] = "95977,SMARTVILLE,PGE";
zipArray[788] = "96071,OLD STATION,PGE";
zipArray[789] = "95978,STIRLING CTY,PGE";
zipArray[790] = "96073,PALO CEDRO,PGE";
zipArray[791] = "95979,STONYFORD,PGE";
zipArray[792] = "96074,PASKENTA,PGE";
zipArray[793] = "95981,LA PORTE,PGE";
zipArray[794] = "96075,PAYNES CREEK,PGE";
zipArray[795] = "95982,SUTTER,PGE";
zipArray[796] = "96076,PLATINA,PGE";
zipArray[797] = "95983,TAYLORSVILLE,PGE";
zipArray[798] = "96078,PROBERTA,PGE";
zipArray[799] = "95984,TWAIN,PGE";
zipArray[800] = "96080,RED BLUFF,PGE";
zipArray[801] = "95986,WASHINGTON,PGE";
zipArray[802] = "96084,ROUND MTN,PGE";
zipArray[803] = "95987,WILLIAMS,PGE";
zipArray[804] = "96087,SHASTA,PGE";
zipArray[805] = "95988,WILLOWS,PGE";
zipArray[806] = "96088,SHINGLETOWN,PGE";
zipArray[807] = "95991,YUBA CITY,PGE";
zipArray[808] = "96089,SHASTA LAKE,PGE";
zipArray[809] = "95993,YUBA CITY,PGE";
zipArray[810] = "96090,TEHAMA,PGE";
zipArray[811] = "96001,REDDING,PGE";
zipArray[812] = "96092,VINA,PGE";
zipArray[813] = "96002,REDDING,PGE";
zipArray[814] = "96095,WHISKEYTOWN,PGE";
zipArray[815] = "96003,REDDING,PGE";
zipArray[816] = "96096,WHITMORE,PGE";
zipArray[817] = "96007,ANDERSON,PGE";
zipArray[818] = "96125,SIERRA CITY,PGE";
zipArray[819] = "96008,BELLA VISTA,PGE";
zipArray[820] = "96137,LAKE ALMANOR,PGE";
zipArray[821] = "96009,BIEBER,PGE";
zipArray[822] = "96011,BIG BEND,PGE";
zipArray[823] = "96013,BURNEY,PGE";
zipArray[824] = "96016,CASSEL,PGE";
zipArray[825] = "96019,SHASTA LAKE,PGE";
zipArray[826] = "96020,CHESTER,PGE";
zipArray[827] = "96021,CORNING,PGE";
zipArray[828] = "96022,COTTONWOOD,PGE";
zipArray[829] = "96028,FALL RVR MLS,PGE";
zipArray[830] = "96029,FLOURNOY,PGE";
zipArray[831] = "96033,FRENCH GULCH,PGE";
zipArray[832] = "96035,GERBER,PGE";
zipArray[833] = "96040,HAT CREEK,PGE";
zipArray[834] = "96047,IGO,PGE";
zipArray[835] = "96051,LAKEHEAD,PGE";
zipArray[836] = "96053,MC ARTHUR,PGE";

//************************************************************************************************************
//************************************************************************************************************
//************************************************************************************************************



	// ****************************************************************** 
	// Unique Registration Number 1kU892loQQuyw1983-kk
	//
	// vShoppingCart(tm) ver 5.0-nq relay (c) 1999-2001 All rights reserved.
	// This is a licensed and copyrighted work. It is NOT 'Shareware' or
	// 'Freeware'.  This page and its software may not be copied,
	// dissassembled or reverse engineered. Use of this software
	// assumes your argeement to all license terms and condtions.
	//
	// http://www.vShoppingCart.com
	//
	// For more information contact: info@vshoppingCart.com 
	//
	// Name: vShoppingCar.js
	//
	// Everything above this line can not be removed.
	//
	//
	// NO NEED TO CHANGE ANYTHING HERE. DO NOT EDIT THIS PAGE IN A
	// WYSIWYG HTML EDITOR. USE A TEXT EDITOR. 
	//****************************************************************** 

   
      
      // No need to change anything below this line.
      //*****************************************************
      

// alterError - fixes a rounding bug
function alterError(value) {
		//if (value<=0.99) {
		//	newDollars = '0';
		//} else {
		//	newDollars = parseInt(value);
		//}
		//newCents = parseInt((value+.0008 - newDollars)* 100);
		//if (eval(newCents) <= 9) newCents='0'+newCents;
		//newString = newDollars + '.' + newCents;
		//return (newString);

   oldDollars = parseInt(value);
   oldCents = parseInt((value - oldDollars)* 100);
   shiftSubCent = parseInt((((value - oldDollars)* 100) - oldCents)* 100);

   if (eval(shiftSubCent) >= 50)
   {
      // Round up one cent.
      if (eval(oldCents) >= 99)
      {
         oldCents = '0';
         oldDollars = eval(oldDollars + 1);
      }
      else
      {
         oldCents = eval(oldCents + 1);
      }
   }

   if (eval(oldCents) <= 9) oldCents='0'+oldCents;

   newString = oldDollars + '.' + oldCents;
   return (newString);
}

// Rounds the value to the nearest cent.
function roundCents(value) {

   //if (value<=0.99)
   //{
   //   oldDollars = '0';
   //}
   //else
   //{
      oldDollars = parseInt(value);
   //}

   //shiftCents = eval((value - oldDollars)* 100);
   oldCents = parseInt((value - oldDollars)* 100);
   shiftSubCent = parseInt((((value - oldDollars)* 100) - oldCents)* 100);

   if (eval(shiftSubCent) >= 50)
   {
      // Round up one cent.
      if (eval(oldCents) >= 99)
      {
         oldCents = '0';
         oldDollars = eval(oldDollars + 1);
      }
      else
      {
         oldCents = eval(oldCents + 1);
      }
   }

   if (eval(oldCents) <= 9) oldCents='0'+oldCents;

   newString = oldDollars + '.' + oldCents;
   return (eval(newString));
}


function GetCookie (name) {

  var arg = name + "=";

  var alen = arg.length;

  var clen = document.cookie.length;

  var i = 0;

  while (i < clen) {

    var j = i + alen;

    if (document.cookie.substring(i, j) == arg)

      return getCookieVal (j);

    i = document.cookie.indexOf(" ", i) + 1;

    if (i == 0) break; 

  }

  return null;

}

function getCookieVal (offset) {

  var endstr = document.cookie.indexOf (";", offset);

  if (endstr == -1)

    endstr = document.cookie.length;

  return unescape(document.cookie.substring(offset, endstr));

}

function SetCookie (name,value,expires,path,domain,secure) {

   var expdate = new Date ();

   expdate.setTime (expdate.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30 days from now 

   document.cookie = name + "=" + value +

    ((expires) ? "; expires=" + expires.toGMTString() : "; expires=" + expdate.toGMTString()) +

    ((path) ? "; path=" + path : "") +

    ((domain) ? "; domain=" + domain : "") +

    ((secure) ? "; secure" : "");

}


function DeleteCookie (name,path,domain) {

  if (GetCookie(name)) {

    document.cookie = name + "=." +

      ((path) ? "; path=" + path : "") +

      ((domain) ? "; domain=" + domain : "") +

      "; expires=Thu, 01-Jan-70 00:00:01 GMT";

  }

}


function ViewCookies()
{
   confirm(document.cookie);
}


function checkSVPzipCode(zipcode)
{
   var retValue = 0;

   for (var i = 0; i < svpZipArray.length; i++)
   {
      var zcode = svpZipArray[i].substring(0, 5);
      if (zcode == zipcode)
      {
         retValue = 1;
         break;
      }
   }

   return retValue;
}

// This routine will verify that the gift certificate id exists, and return the value associateed with the specified
// index of the array entry associated with the gift certificate id.  If the id cannot be found, returns null.

function getGiftCertInfo(giftCertID,  gciIndex)
{
   var giftCertFound = 0;
   var giftCertInfo = null;

   if (giftCertID.length != 19)
   {
      return null;
   }

   for (var i = 0; i < giftCertArray.length; i++)
   {
      var gciInfoIndex = 0;
      var gcID = giftCertArray[i].substring(0, 19);
      if (gcID == giftCertID)
      {
         // The Gift Certificate ID exists.
         if ( gciIndex == 0 )
         {
            giftCertInfo = gcID;
            break;  // Done.
         }

         // Cut out the requested value.
         var gcValueLen = 0;
         var gcValueStart = 20;
         for (var j = gcValueStart; j < giftCertArray[i].length; j++)
         {
            if (giftCertArray[i].substring(j,j+1) == ",")
            {
               ++gciInfoIndex;
               if (gciIndex == gciInfoIndex)
               {
                  giftCertInfo = giftCertArray[i].substring(gcValueStart, gcValueStart+gcValueLen);
                  break;
               }
               else
               {
                 gcValueStart = j+1;
                 gcValueLen = 0;
               }

            }
            else
            {
               ++gcValueLen;
            }
         }

         // Check the last index.
         if ( j == giftCertArray[i].length )
         {
            ++gciInfoIndex;
            if (gciIndex == gciInfoIndex)
            {
               giftCertInfo = giftCertArray[i].substring(gcValueStart, gcValueStart+gcValueLen);
            }
         }

         break;
      }
   }

   return giftCertInfo;
}


function redeemGiftCert(giftCertID)
{
   var num = "ID# " + giftCertID + " Not Found. Please contact us to validate.";
   var giftCertFound = 0;
   var gcID = null;
   var gcUnused = 'N';
   var gcValue = 0;
   var gcType = 0;

   if (giftCertID.length != 19)
   {
      confirm(num);
      return;
   }

   gcID = getGiftCertInfo(giftCertID, gciGiftCertIDIndex);
   if (gcID != null)
   {
      // Found a Gift Certificate.  Get the type.
      gcType = getGiftCertInfo(giftCertID, gciTypeIndex);

      // Make sure the certificate is unused.
      gcUnused = getGiftCertInfo(giftCertID, gciUnusedIndex);
      if (gcUnused == 'Y')
      {
         // We have not processed it yet. Make sure user did not already redeem it.
         gcValue = getGiftCertInfo(giftCertID, gciValueIndex);
         if (gcValue > 0)
         {
            var gcUsed = 'Y';
            var gcReedeemID = getNoliCoInfo(GiftCertIndex);
            if (gcReedeemID != null)
            {
               gcUsed = getNoliCoInfo(GiftCertUsedIndex);
               if (gcUsed == 'Y')
               {
                  gcValue = 0;  //It is used.
                  if (gcType == gciTypeGift)
                  {
                     num = "Gift Certificate " + giftCertID + " Not available. Please contact us to validate.";
                  }
                  else if (gcType == gciTypeStoreCredit)
                  {
                     num = "Store Credit ID " + giftCertID + " Not available. Please contact us to validate.";
                  }
                  else if (gcType == gciTypeDiscount)
                  {
                     num = "Discount Coupon " + giftCertID + " Not available. Please contact us to validate.";
                  }
                  else
                  {
                     num = "ID " + giftCertID + " Not valid. Please contact us to validate.";
                  }
               }
            }
         }

         if (gcValue > 0)
         {
            var redeemcheck = 0;
            if (gcType == gciTypeGift)
            {
               redeemcheck = confirm('Your Gift Certificate '+gcID+' is valid in the amount of $'+ gcValue +'. Do you want to want to redeem your Gift Certificate now?');
            }
            else if (gcType == gciTypeStoreCredit)
            {
               redeemcheck = confirm('Your Store Credit ID '+gcID+' is valid in the amount of $'+ gcValue +'. Do you want to want to redeem your Store Credit now?');
            }
            else if (gcType == gciTypeDiscount)
            {
               redeemcheck = confirm('Your '+ gcValue +'% Discount Coupon '+gcID+' is valid. Do you want to want to redeem your Discount Coupon now?');
            }
            else
            {
               confirm('Your ID '+gcID+' is is not a valid type.');
               return;
            }

            if (redeemcheck)
            {
               // Insert Gift Cert into NoliCoInfo Cookie.
               modifyNoliCoInfo(GiftCertIndex, gcID);
               modifyNoliCoInfo(GiftCertUsedIndex, 'N');
               window.location.href=document.location;
               return;
            }
            else
            {
               if (gcType == gciTypeGift)
               {
                  confirm("Gift Certificate " + giftCertID + " is still available.");
               }
               else if (gcType == gciTypeStoreCredit)
               {
                  confirm("Store Credit ID " + giftCertID + " is still available.");
               }
               else if (gcType == gciTypeDiscount)
               {
                  confirm("Discount Coupon " + giftCertID + " is still available.");
               }
               else
               {
                  confirm('Your ID '+gcID+' is is not a valid type.');
                  return;
               }
               modifyNoliCoInfo(GiftCertIndex, "");
               modifyNoliCoInfo(GiftCertUsedIndex, "");
               window.location.href=document.location;
               return;
            }
         }
      }
   }

   confirm(num);
}


function showZipCode(zipcode)
{
   var num = "Unfortunately there are no instant rebates available in your area.";
   var zipcodeFound = 0;

   if (zipcode.length < 5)
   {
      num = "Please enter a valid 5 digit zipcode.";
      if ( !confirm(num) )
      {
         modifyZipcode("", "", "");
         window.location.href=document.location;
      }
      return;
   }

   if (enableRebate == 1)
   {
      num = "Good News!  Customers in the " + zipcode + " area are eligible for an instant rebate!";
   }

   for (var i = 0; i < zipArray.length; i++)
   {
      var zcode = zipArray[i].substring(0, 5);
      if (zcode == zipcode)
      {
         // Cut out the city name.
         var citylen = 0;
         for (var j = 6; j < zipArray[i].length; j++)
         {
            if (zipArray[i].substring(j,j+1) == ",")
            {
               break;
            }
            ++citylen;
         }

         zipcodeFound = 1;

         if (enablePGERebate == 1)
         {
            var num = "Good News! " + zipArray[i].substring(6, 6+citylen) + " customers are eligible for the PG&E rebate.";
            modifyZipcode(zipArray[i].substring(6, 6+citylen), "CA", zipcode);
            rebateAvailable = 1;
            break;
         }
         else if (enableRebate == 1)
         {
            var num = "Good News! " + zipArray[i].substring(6, 6+citylen) + " customers are eligible for an instant rebate.";
            modifyZipcode(zipArray[i].substring(6, 6+citylen), "CA", zipcode);
            rebateAvailable = 1;
            break;
         }
         else
         {
            var num = "Unfortunately, there are no instant rebates available in " + zipArray[i].substring(6, 6+citylen);
            modifyZipcode(zipArray[i].substring(6, 6+citylen), "CA", zipcode);
            rebateAvailable = 0;
            break;
         }
      }
   }

   if (zipcodeFound == 0)
   {
      // PG&E Rebate does not apply.  Check for Silicon Valley Power zipcode.
      zipcodeFound = checkSVPzipCode(zipcode);
      if (zipcodeFound == 1)
      {
         modifyZipcode("", "CA", zipcode);
         num = "Good News!  We offer an instant rebate of up to 10% for Silicon Valley Power customers!";
      }
      else
      {
         modifyZipcode("", "", zipcode);
      }
   }

   if ( !confirm(num) )
      modifyZipcode("", "", "");
   window.location.href=document.location;
}


function resetTaxable(taxable)
{
     if (taxable == 'y') taxable = 'Y';
     if (taxable == 'n') taxable = 'N';

     if ( (taxable != 'Y') && (taxable != 'N') )
     {
        var taxcheck = confirm('State Sales Tax Question: Are You A Resident Of ' + taxstate+'? Press "Ok" For Yes. Otherwise Press "Cancel" For No.');
        if (taxcheck)
        {
           taxable = 'Y';
        }
        else
        {
           taxable = 'N';
        }
     }
     modifyTaxable(taxable);
     window.location.href=document.location;
}


function checkZipCode(zipcode)
{
   var retValue = 0;

   for (var i = 0; i < zipArray.length; i++)
   {
      var zcode = zipArray[i].substring(0, 5);
      if (zcode == zipcode)
      {
         retValue = 1;
         break;
      }
   }

   return retValue;
}


// tempDiscontinue - Alerts that item is out of stock and does not add it to the shopping cart.
function tempDiscontinue(newItem, newPrice, newQuantity, colorTemp) {

     alert('Our '+newItem+' has been temporarily discontinued.');
}


// outOfStock - adds an item to the shopping basket but warns that item is out of stock.
function outOfStock(newItem, newPrice, newQuantity, colorTemp) {
     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }

     if (colorTemp != null)
     {
       var addcheck = confirm('We are out of stock of '+newItem+', '+colorTemp+'. Do you want to backorder '+newQuantity+' anyway?');
     }
     else
     {
       var addcheck = confirm('We are out of stock of '+newItem+'. Do you want to backorder '+newQuantity+' anyway?');
     }

     if (addcheck)
     {
          //document.cookie="NoliCoShoppingCart="+document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]; expires=Friday, 31-Dec-2080 08:00:00 GMT";
          if (colorTemp != null)
          {
            SetCookie ("NoliCoShoppingCart", document.cookie.substring(start, end)+"["+newItem+"_"+colorTemp+"|"+newPrice+"|"+newQuantity+"]")
          }
          else
          {
            SetCookie ("NoliCoShoppingCart", document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]")
          }
     }

     window.location.href=document.location;

     if (vbasketTransaction){
        window.location.href='vbasket.htm';
     }

     if ( parent.frames[1] != null )
     {
        with (parent.frames[1]){
            document.location='shopping_cart.htm';
        }
     }
        
}


// buyItem - adds an item to the shopping basket
function buyGiftCertificate(newItem, newPrice, newQuantity) {
     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }

     if (newPrice < 10)
     {
        var mincheck = confirm('Minimum Gift Certificate is $10.00. Increase to $10.00?');

        if (mincheck)
        {
          newPrice = 10.00;
        }
        else
        {
           return;
        }
     }

     var addcheck = confirm('Add $'+newPrice+' '+newItem+' to shopping cart?');

     if (addcheck)
     {
       //document.cookie="NoliCoShoppingCart="+document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]; expires=Friday, 31-Dec-2010 08:00:00 GMT";
       SetCookie ("NoliCoShoppingCart", document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]")
       window.location.href='vbasket.htm';
     }


     if ( parent.frames[1] != null )
     {
        with (parent.frames[1]){
           document.location='shopping_cart.htm';
        }
     }
}

// buyItem - adds an item to the shopping basket
function buyItem(newItem, newPrice, newQuantity, colorTemp) {
     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }

     //if (addcheck)
     //{
          //document.cookie="NoliCoShoppingCart="+document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]; expires=Friday, 31-Dec-2080 08:00:00 GMT";
          if (colorTemp != null)
          {
            SetCookie ("NoliCoShoppingCart", document.cookie.substring(start, end)+"["+newItem+"_"+colorTemp+"|"+newPrice+"|"+newQuantity+"]")
          }
          else
          {
            SetCookie ("NoliCoShoppingCart", document.cookie.substring(start, end)+"["+newItem+"|"+newPrice+"|"+newQuantity+"]")
          }
     //}

     window.location.href=document.location;

     if (colorTemp != null)
     {
       var addcheck = confirm('Added '+newQuantity+' of '+newItem+', '+colorTemp+', to shopping cart. Would you like to view your shopping cart now?');
     }
     else
     {
       var addcheck = confirm('Added '+newQuantity+' of '+newItem+' to shopping cart. Would you like to view your shopping cart now?');
     }

     if (addcheck){
        //document.location==history.back();
        window.location.href='vbasket.htm';
     }

     if (vbasketTransaction){
        document.location==history.back();
        window.location.href='vbasket.htm';
     }

     if ( parent.frames[1] != null )
     {
           document.location='shopping_cart.htm';
     }

}


// modifyZipcode - adds/modifies customer zipcode, City, and State to/in the NoliCoInfo cookie.
function modifyZipcode(City, State, zipCode) 
{
     modifyNoliCoInfo(CityIndex, City);
     modifyNoliCoInfo(StateIndex, State);
     modifyNoliCoInfo(zipCodeIndex, zipCode);
}


// modifyTaxable - adds/modifies customer tax status to/in the NoliCoInfo cookie.
function modifyTaxable(taxable)
{
     modifyNoliCoInfo(taxableIndex, taxable);
}


// modifyNoliCoInfo - adds/modifies the NoliCoInfo cookie based on the specified index and contents.
function modifyNoliCoInfo(nciIndex, nciContent) 
{
     var CookieName = "NoliCoInfo";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     var blankInfo = null;
     var expdate = new Date ();

     expdate.setTime (expdate.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30 days from now 

     if (nciContent == null)
     {
        // Nothing to do.
        return;
     }

     if ( (nciIndex < 0) || (nciIndex > MaxIndex) )
     {
        // Invalid index.
        return;
     }

     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }

     // First build a blank info string with the current item in case it is needed.
     blankInfo = "["
     for ( i = 0; i < MaxIndex; i++ )
     {
        if ( i == nciIndex )
        {
           blankInfo = blankInfo+nciContent;
        }

        if (i < MaxIndex)
        {
           blankInfo = blankInfo+'|';
        }
     }
     if (i == MaxIndex)
     {
        if ( i == nciIndex )
        {
           blankInfo = blankInfo+nciContent;
        }
     }

     blankInfo = blankInfo+']';

     if (cookieFound) 
     {
        start = end + 1;
        end = document.cookie.indexOf(";",start);
        if (end < start)
           end = document.cookie.length;

        var fullinfo = document.cookie.substring(start,end);
        var infoIndex = 0;
        var itemstart = 0;
        var fullstart = 0;
        var newInfo = null;
        for ( i = 0; i <= end; i++)
        {
           if (fullinfo.substring(i,i+1) == '[')
           {
              // Start of info.
              infoIndex = 0;
              fullstart = i;
              itemstart = i+1;
           }
           else if (fullinfo.substring(i,i+1) == ']')
           {
              // End of info.
              if (infoIndex < MaxIndex)
              {
                 // NoliCoInfo corrupt.
                 newInfo = blankInfo;
              }
              else if (infoIndex == nciIndex)
              {
                 newInfo = fullinfo.substring(fullstart, itemstart)+nciContent+fullinfo.substring(i, end);
              }
              else
              {
                 newInfo = fullinfo.substring(fullstart, end);
              }

              break;
           }
           else if (fullinfo.substring(i,i+1) == '|')
           {
              // Next info item.
              infoIndex++;
              if (infoIndex == nciIndex)
              {
                 itemstart = i+1;
              }
              if (infoIndex > nciIndex)
              {
                 newInfo = fullinfo.substring(fullstart, itemstart)+nciContent+fullinfo.substring(i, end);

                 // Done
                 break;
              }
           }
        }

        if (newInfo == null)
        {
           newInfo = blankInfo;
        }
     }
     else
     {
        newInfo = blankInfo;

     }

     SetCookie ("NoliCoInfo", newInfo, expdate);
}


function getNoliCoInfo(nciIndex) 
{
     var CookieName = "NoliCoInfo";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var indexStart = 0;
     var cookieString = document.cookie;
     var i = 0;
     var indexInfo = null;

     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) 
     {
        start = end + 1;
        end = document.cookie.indexOf(";",start);
        if (end < start)
           end = document.cookie.length;

        var fullinfo = document.cookie.substring(start,end);
        var infoIndex = 0;
        for ( i = 0; i <= end; i++)
        {
           if (fullinfo.substring(i,i+1) == '[')
           {
              // Start of info. Scan past existing info upto the taxable info.
              infoIndex = 0;
              fullstart = i;
           }
           else if (fullinfo.substring(i,i+1) == ']')
           {
              // End of info.
              if (infoIndex == nciIndex)
              {
                 indexInfo = fullinfo.substring(indexStart, i);
              }
              else
              {
                 indexInfo = null;
              }
              break;
           }
           else if (fullinfo.substring(i,i+1) == '|')
           {
              // Next info item.
              infoIndex++;
               if (infoIndex == nciIndex)
              {
                 indexStart = i+1;
              }
              if (infoIndex > nciIndex)
              {
                 indexInfo = fullinfo.substring(indexStart, i);

                 // Done
                 break;
              }
           }
        }
     }
     else
     {
        indexInfo = null;
     }

     return(indexInfo);
}


// showItems() - displays shoppingcart contents in a drop down select array
function showItems() {
     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0
     var productTotal = 0;
     var serviceItem = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
      }		
      fulllist = document.cookie.substring(start, end);
		subtotal = 0;
		howmany = 0;
		document.writeln('<FORM><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><select><option>Click For ShoppingCart Contents</OPTION>');
		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				itemstart = i+1;
				thisitem = 1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				thequantity = fulllist.substring(itemstart, itemend);
				itemtotal = 0;
				howmany = howmany + 1;
				itemtotal = (eval(theprice*thequantity));
				temptotal = itemtotal * 100;

                                                          // Determine if item is a service or a product.
                                                          serviceItem = checkServiceType(theitem);
                                                          if (serviceItem == 0)
                                                          {
                                                             productTotal = productTotal + itemtotal;
                                                          }

				subtotal = subtotal + itemtotal;
				itemlist=itemlist+1;
				document.write('<OPTION>'+thequantity+' -   '+theitem+'</OPTION>');
			} else if (fulllist.substring(i,i+1) == '|') {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) theprice = fulllist.substring(itemstart, i);
				if (thisitem==3) theoption = fulllist.substring(itemstart, i);
				thisitem++;
				itemstart=i+1;
				}
		}
		//document.writeln('</SELECT><BR><CENTER><FONT SIZE="1" COLOR="#000000" FACE="Arial, Helvetica, sans-serif">');
		document.writeln('</SELECT><BR><CENTER><FONT SIZE="1" COLOR="#FFFFFF" FACE="Arial, Helvetica, sans-serif">');
		if (productTotal < freeshipping)
		{
		   document.writeln('&nbsp;'+ howmany +'&nbsp;Item(s)&nbsp;&nbsp;Sub Total: $'+ alterError(subtotal) +'</FONT></CENTER></TD></TR></TABLE></FORM>');
		}
		else
		{
		   document.writeln('&nbsp;'+ howmany +'&nbsp;Item(s)&nbsp;&nbsp;Sub Total: $'+ alterError(subtotal) +'&nbsp;- Free Shipping!</FONT></CENTER></TD></TR></TABLE></FORM>');
		}
}



function checkProductRebate(itemDesc)
{
   var descIndex = 0;
   var descStart = 0;
   var descEnd = 0;
   var rebateValue = "0.00";

   for (var producti = 0; producti < productArray.length; producti++)
   {
      descStart = 0;
      descIndex = 0;

      // Scan through the array element to get the description.
      for (var productj = 0; productj < productArray[producti].length; productj++)
      {
         if (productArray[producti].substring(productj,productj+1) == ",")
         {
            if (descIndex == 0)
               descStart = productj+1;

            if (descIndex == 1)
            {
               descEnd = productj;

               // Got the description.
               break;
            }

            descIndex++
         }
      }

      if (itemDesc == productArray[producti].substring(descStart,descEnd))
      {
         // Found the item.  Get rebate value.
         rebateValue = productArray[producti].substring(productArray[producti].length-12,productArray[producti].length-7);
         break;
      }
   }

   return(rebateValue);
}

function checkItemSale(itemDesc)
{
   var descIndex = 0;
   var descStart = 0;
   var descEnd = 0;
   var salePercent = 0.0000;

   for (var producti = 0; producti < productArray.length; producti++)
   {
      descStart = 0;
      descIndex = 0;

      // Scan through the array element to get the description.
      for (var productj = 0; productj < productArray[producti].length; productj++)
      {
         if (productArray[producti].substring(productj,productj+1) == ",")
         {
            if (descIndex == 0)
               descStart = productj+1;

            if (descIndex == 1)
            {
               descEnd = productj;

               // Got the description.
               break;
            }

            descIndex++
         }
      }

      if (itemDesc == productArray[producti].substring(descStart,descEnd))
      {
         // Found the item.  Get rebate value.
         salePercent = productArray[producti].substring(productArray[producti].length-6,productArray[producti].length);
         break;
      }
   }

   return(salePercent);
}

// This routine will return 1 if the item specified is a Service, 0 if not.  We should not apply shipping or rebates to services!
function checkServiceType(itemDesc)
{
   var descIndex = 0;
   var descStart = 0;
   var descEnd = 0;
   var retVal = 0;

   for (var producti = 0; producti < serviceArray.length; producti++)
   {
      descStart = 0;
      descIndex = 0;

      // Scan through the array element to get the description.
      for (var productj = 0; productj < serviceArray[producti].length; productj++)
      {
         if (serviceArray[producti].substring(productj,productj+1) == ",")
         {
            if (descIndex == 0)
               descStart = productj+1;

            if (descIndex == 1)
            {
               descEnd = productj;

               // Got the description.
               break;
            }

            descIndex++
         }
      }

      if (itemDesc == serviceArray[producti].substring(descStart,descEnd))
      {
         // Found the item.  Item must be a service!
         retVal = 1;
         break;
      }
   }

   return(retVal);
}

// Get CustID Cookie
function getCookie(name)
{
        var cookie = " " + document.cookie;
        var search = " " + name + "=";
        var setStr = null;
        var offset = 0;
        var end = 0;

        if (cookie.length > 0) {
           offset = cookie.indexOf(search);
           if (offset != -1) {
              offset += search.length;
              end = cookie.indexOf(";", offset)
              if (end == -1) {
                 end = cookie.length;
              }
              setStr = unescape(cookie.substring(offset, end));
           }
        }
        return(setStr);
}
	

//Show vbuy.htm contents: Payment options: 0 = pay by paypal, 1 = pay by credit, 2 = pay by check, 3 = pay by email.
function showvbuy(paymentOption, checkTaxInfo) {
     var itemRebate = "0.00";
     var itemDiscount = 0.0000;
     var itemSalePercent = 0.0000;
     var itemSaleAmount = 0;
     var ncRebatePercentage = 0.0000;
     var totalRebate = 0;
     var totalDiscount = 0;
     var orderRebate = 0;
     var orderDiscount = 0;
     var orderSaleAmount = 0;
     var volumeDiscount = 0;
     var volumeRebate = 0;
     var preRebateTotal = 0;
     var taxableInfo = "N";
     var serviceItem = 0;
     var serviceTotal = 0;
     var productTotal = 0;
     var SaleRebate = 0;

     // Tax function
     var taxcharge = "0";
     var taxcheck = 0;
     var rebateAvailable = 0;
     var svpRebateAvailable = 0;

     var zipCodeInfo = getNoliCoInfo(zipCodeIndex);

     if ( (zipCodeInfo != null) && (zipCodeInfo.length == 5) )
     {
        rebateAvailable = checkZipCode(zipCodeInfo);
        svpRebateAvailable = checkSVPzipCode(zipCodeInfo);
        ncRebatePercentage = 0.0500;
     }

     // Get tax info from cookie.
     taxableInfo = getNoliCoInfo(taxableIndex);
     if (taxableInfo == 'Y')
     {
        taxcheck = 1;
        taxcharge = taxrate;
     }
     else if (taxableInfo != 'N')
     {
        // Currently, if the rebate applies the customer must live in California, so don't bother asking.
        if ((rebateAvailable == 0) && (svpRebateAvailable == 0))
           var taxcheck = confirm('State Sales Tax Question: Are You A Resident Of ' + taxstate+'? Press "Ok" For Yes. Otherwise Press "Cancel" For No.');
        else
           taxcheck = 1;
        if (taxcheck)
        {
           taxcharge = taxrate;
           modifyTaxable("Y");
        }
        else
        {
           modifyTaxable("N");
        }
     }

     // Check to see if the customer is redeeming a valid gift certificate.
     var gcUsed = 'Y';
     var gcUnused = 'N';
     var gcValue = 0;
     var gcType = 0;
     var gcId = getNoliCoInfo(GiftCertIndex);
     if (gcId != null)
     {
        gcUsed = getNoliCoInfo(GiftCertUsedIndex);
        if (gcUsed == 'N')
        {
           // See if certificate is still valid.
           gcUnused = getGiftCertInfo(gcId, gciUnusedIndex);
           if (gcUnused == 'Y')
           {
              gcType = getGiftCertInfo(gcId, gciTypeIndex);
              gcValue = getGiftCertInfo(gcId, gciValueIndex);
           }
        }
     }

     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;

     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }

     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }

     var ItemsOrdered = document.cookie.substring(start,end);
     fulllist = document.cookie.substring(start, end);
     totprice = 0;
     totpricenoship = 0;
     document.writeln('<TABLE CELLSPACING=1 CELLPADDING=3 BGCOLOR="' + tablebodycolor + '">');
     document.writeln('<TR bgcolor=' + tableheadcolor + '><TD><b><font size=3 color=' + tablefontcolor + '>Item</FONT></B></TD>');
     document.writeln('<TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Quantity</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Cost Each</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + ' >Sub Total</FONT></B></TD></TR>');
     //document.writeln('<FONT SIZE=3 COLOR=' + otherFontColor + '>');
     itemlist = 0;
     numberofitems = 0;
     for (var i = 0; i<= fulllist.length; i++) {
        if (fulllist.substring(i,i+1) == '[') {
           thisitem = 1;
           itemstart = i+1;
        } else if (fulllist.substring(i,i+1) == ']') {
           itemend = i;

           // Determine if item is a service or a product.
           serviceItem = checkServiceType(theitem);

           itemDiscount = ncRebatePercentage;
           itemRebate = checkProductRebate(theitem);
           if (itemRebate > 0)
           {
              if ((rebateAvailable == 0) || (enablePGERebate == 0))
              {
                 itemRebate = "0.00";	// No PG&E Rebate
              }

              if (svpRebateAvailable == 1)
              {
                 itemDiscount = 0.1000;
              }
              else
              {
                 itemDiscount = ncRebatePercentage;
              }
           }
           else
           {
              if (svpRebateAvailable == 1)
              {
                 itemDiscount = 0.0500;
              }              
           }

           thequantity = fulllist.substring(itemstart, itemend);

           itemtotal = 0;
           itemtotal = (eval(theprice*thequantity));

           itemSalePercent = checkItemSale(theitem);

           if (serviceItem == 0)
           {
              totalRebate = (eval(itemRebate*thequantity));
              totalDiscount = (eval(itemDiscount*itemtotal));
              //totalDiscount = roundCents(totalDiscount);

              temptotal = itemtotal * 100;
              orderRebate = orderRebate + totalRebate;
              if (orderRebate > 30)
                 orderRebate = 30;

              orderDiscount = orderDiscount + totalDiscount;

              itemSaleAmount = (eval(itemSalePercent*itemtotal));
              orderSaleAmount = orderSaleAmount + itemSaleAmount;
           }
           else
           {
              serviceTotal = serviceTotal + itemtotal;
           }

           totprice = totprice + itemtotal;
           itemlist = itemlist + 1;
           numberofitems = (numberofitems + parseInt(thequantity,10));
           document.write('<TR><TD><FONT SIZE=3 COLOR=' + otherFontColor + '>'+theitem+'</FONT></TD>');
           document.write('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+thequantity+'</FONT></TD>');
           document.write('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+theprice+'</FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+alterError(itemtotal)+'</FONT></TD></TR>');
           //document.writeln('< ALIGN=RIGHT>'+theprice+'</TD><TD ALIGN=RIGHT>'+alterError(itemtotal)+'</TD></TR>');
        } else if (fulllist.substring(i,i+1) == '|') {
           if (thisitem==1) theitem = fulllist.substring(itemstart, i);
           if (thisitem==2) theprice = fulllist.substring(itemstart, i);
           thisitem++;
           itemstart=i+1;
        }
     }

     productTotal = totprice - serviceTotal;

     // Check Rebate
     if ( orderRebate == 0 )
     {
          // Give automatic 5% rebate.
          orderRebate = (eval(productTotal * autoRebate));
          orderRebate = roundCents(orderRebate);
     }

     orderDiscount = roundCents(orderDiscount);

     // Volume discounts figured here.
     if (productTotal >= 1000)
     {
        volumeDiscount = 0.1500
     }
     else if (productTotal >= 750)
     {
        volumeDiscount = 0.1000
     }
     else if (productTotal >= 500)
     {
        volumeDiscount = 0.0500
     }

     // Check Volume discount
     if ( volumeDiscount > 0 )
     {
          volumeRebate = (eval(productTotal * volumeDiscount));
          volumeRebate = roundCents(volumeRebate);
     }

     // Compute shipping charge before adding in tax.
     if ( (productTotal > freeshipping) || (productTotal == 0) )
        shippingcharge = 0;
     else if (productTotal < shippingcut)
        shippingcharge = shipping1;
     else if (flatrate == 0)
        shippingcharge = (eval(shipping * numberofitems));
     else if (flatrate == 1)
        shippingcharge = shipping;
     else
        shippingcharge = (eval(shippingPercentage * productTotal));

     // Print Tax       
     var subtax=0;
     var taxrebate = 0;
     subtax = (eval(productTotal * taxcharge));
     subtax = roundCents(subtax);
     totprice = totprice + subtax;

     document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Tax</B> ('+taxstate+')</FONT></TD>');
     document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+alterError(subtax)+'</FONT></TD></TR>');

     //if (totprice<1) shippingcharge = 0;

     // Tax rebate for California
     if (subtax > 0)
     {
        if (subtax < shippingcharge)
        {
           taxrebate = subtax;
        }
        else
        {
           taxrebate = shippingcharge;
        }

        totprice = totprice - taxrebate;

        if (taxrebate > 0)
        {
           document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Tax Rebate</B> ('+taxstate+')</FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(taxrebate)+'<FONT></TD></TR>');
        }
     }

     totpricenoship = totprice;
     totprice = totprice + shippingcharge;

     preRebateTotal = totprice;

     totprice = totprice - orderRebate;
     totprice = totprice - orderDiscount;
     totprice = totprice - volumeRebate;

     // Check Sale discount
     if ( saleOn > 0 )
     {
        SaleRebate = (eval(productTotal  * salePercent ));
        SaleRebate = roundCents(SaleRebate);
     }

     SaleRebate = SaleRebate + orderSaleAmount;

     totprice = totprice - SaleRebate;

     totpricenoship = totpricenoship - SaleRebate;
     totpricenoship = totpricenoship - orderRebate;
     totpricenoship = totpricenoship - orderDiscount;
     totpricenoship = totpricenoship - volumeRebate;

     if (gcValue > 0)
     {
        if (gcType == gciTypeDiscount)
        {
           gcValue = (gcValue / 100);
           gcValue = (eval(productTotal  * gcValue));
           gcValue = roundCents(gcValue);
        }

        if (gcValue <= totprice)
        {
           totprice = totprice - gcValue;
        }
        else
        {
           totprice = 0;
        }

        if (gcValue <= totpricenoship)
        {
           totpricenoship = totpricenoship - gcValue;
        }
        else
        {
           totpricenoship = 0;
        }
     }

     var ID="";
     ID = getCookie("CustID");
     // Get CustID Cookie - End
     document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Shipping</B></FONT></TD>');
     document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+alterError(shippingcharge)+'</FONT></TD></TR>');
     if ((orderRebate > 0) || (orderDiscount > 0) || (volumeRebate > 0) || ( SaleRebate > 0 ) || (gcValue > 0))
     {
        document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Subtotal</B></FONT></TD>');
        document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+alterError(preRebateTotal)+'</FONT></TD></TR>');
        if (orderRebate > 0)
        {
           document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less PG&E Rebate</B></FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(orderRebate)+'</FONT></TD></TR>');
        }
        if (orderDiscount > 0)
        {
           document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less NoliCo Rebate</B></FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(orderDiscount)+'</FONT></TD></TR>');
        }
        if (volumeRebate > 0)
        {
           document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Volume Discount</B></FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(volumeRebate)+'</FONT></TD></TR>');
        }
        if (SaleRebate > 0)
        {
           document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Sale Discount</B></FONT></TD>');
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(SaleRebate)+'</FONT></TD></TR>');
        }
        if (gcValue > 0)
        {
           if (gcType == gciTypeGift)
           {
              document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Gift Certificate Credit</B></FONT></TD>');
           }
           else if (gcType == gciTypeStoreCredit)
           {
              document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Store Credit</B></FONT></TD>');
           }
           else if (gcType == gciTypeDiscount)
           {
              document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>Less Discount Coupon</B></FONT></TD>');
           }
           else
           {
              document.write('<TR><TD COLSPAN=3><FONT SIZE=3 COLOR=' + otherFontColor + '><B>ID Type is Invalid</B></FONT></TD>');
           }
           document.writeln('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>-'+alterError(gcValue)+'</FONT></TD></TR>');
        }
     }

     if (paymentOption == payByPayPal)
     {
		   document.writeln('<TR><TD BGCOLOR=' + tableheadcolor + ' COLSPAN=3><FONT COLOR=' + tablefontcolor + '><B>Total To Be Charged</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>$'+alterError(totprice)+'</B></FONT></TD></TR>');
		   document.write('<FORM METHOD="POST" ACTION="https://www.paypal.com/cgi-bin/webscr">');
		   document.write('<INPUT TYPE="hidden" NAME="cmd" VALUE="_xclick">');
		   document.write('<INPUT TYPE="hidden" NAME="business" VALUE="' + business + '">');
		   document.write('<INPUT TYPE="hidden" NAME="item_name" VALUE="' + fulllist + '">');
		   document.write('<INPUT TYPE="hidden" NAME="item_number" value="' + ID + '">');
		   document.write('<INPUT TYPE="hidden" NAME="amount" VALUE="' + alterError(totpricenoship) + '">');
		   document.write('<INPUT TYPE="hidden" NAME="shipping" VALUE="' + alterError(shippingcharge) + '">');
		   document.write('<INPUT TYPE="hidden" NAME="return" VALUE="' + returnURL + '">');
		   document.write('<INPUT TYPE="hidden" NAME="cancel_return" VALUE="' + cancelReturnURL + '">');
		   // The following line will be good if I have a secure server to put my picture on!
		   //document.write('<INPUT TYPE="hidden" NAME="image_url" VALUE="http://www.nolico.com/saveenergy/bnradd2.gif">');

		   document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Order Number = ' + ID +'</B></FONT><P>');
		   document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="images/x-click-but5.gif"><P>');
		   //document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="images/accept1.gif" WIDTH=84 HEIGHT=38 ALIGN=BOTTOM><P>');
		
		   // The following line will be good for my logo when perfected.
		   //document.writeln('<INPUT TYPE="image" NAME="submit_order" SRC="bnradd2.gif" WIDTH=143 HEIGHT=41 ALIGN=BOTTOM>');
     }
     else if (paymentOption == payByCredit)
     {
		   document.writeln('<TR><TD BGCOLOR=' + tableheadcolor + ' COLSPAN=3><FONT COLOR=' + tablefontcolor + '><B>Total To Be Charged</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>$'+alterError(totprice)+'</B></FONT></TD></TR>');
		   document.write('<FORM METHOD=POST ACTION="https://secure.quickcommerce.net/gateway/transact.dll">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Version" VALUE="3.0">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Login" VALUE="y49wtdu">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Show_Form" VALUE="PAYMENT_FORM">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Amount" VALUE="'+alterError(totprice)+'">');

		   //document.write('<INPUT TYPE=HIDDEN NAME="x_Cust_ID" VALUE="' + ID + '">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Description" VALUE="' + fulllist + '">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Invoice_Num" VALUE="' + ID + '">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Receipt_Link_Method" VALUE="LINK">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Receipt_Link_Text" VALUE="Click here to Continue">');

		   //document.write('<INPUT TYPE=HIDDEN NAME="x_Receipt_Link_URL" VALUE="'+ returnURL +'">');

		   document.write('<INPUT TYPE=HIDDEN NAME="x_Header_Html_Payment_Form" VALUE="Noli Control Systems Secure Payment Form">');

		   document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Order Number = ' + ID +'</B></FONT><P>');
		   document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="secure_lock_2.gif">');
		   document.write('<INPUT TYPE=SUBMIT VALUE="Click here for secure payment form">');
		   document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="secure_lock_2.gif"><P>');

		   //document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="images/x-click-but5.gif"><P>');
		   document.writeln('<INPUT TYPE=IMAGE NAME=submit_order SRC="images/accept1.gif" WIDTH=84 HEIGHT=38 ALIGN=BOTTOM><P>');
		
		   // The following line will be good for my logo when perfected.
		   //document.writeln('<INPUT TYPE="image" NAME="submit_order" SRC="bnradd2.gif" WIDTH=143 HEIGHT=41 ALIGN=BOTTOM>');
     }
     else if (paymentOption == payByCheck)
     {
		   // Pay by check option.
		   document.writeln('<TR><TD BGCOLOR=' + tableheadcolor + ' COLSPAN=3><FONT COLOR=' + tablefontcolor + '><B>Total To Be Paid By Check</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>$'+alterError(totprice)+'</B></FONT></TD></TR>');
		   document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Order Number = ' + ID +'</B></FONT><P>');
		   document.writeln('<FONT COLOR=' + tablefontcolor + '><B>Make your check for <B>$'+alterError(totprice)+'</B> payable to: Noli Control Systems</B></FONT>');
     }
     else if (paymentOption == payByEmail)
     {
        // Pay by email option.
        document.writeln('<TR><TD BGCOLOR=' + tableheadcolor + ' COLSPAN=3><FONT COLOR=' + tablefontcolor + '><B>Total To Be Paid By Email</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>$'+alterError(totprice)+'</B></FONT></TD></TR>');
        document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Order Number = ' + ID +'</B></FONT><P>');
        document.writeln('<FONT COLOR=' + tablefontcolor + '><B>We will email you a quote for payment of: <B>$'+alterError(totprice)+'</B> payable to: Noli Control Systems</B></FONT>');
     }
     else
     {
        // No option to pay.  Recalculating totals only.
        document.writeln('<TR><TD BGCOLOR=' + tableheadcolor + ' COLSPAN=3><FONT COLOR=' + tablefontcolor + '><B>Total:</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>$'+alterError(totprice)+'</B></FONT></TD></TR>');
        document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Order Number = ' + ID +'</B></FONT><P>');

        if (totprice <= 0)
        {
           document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>No payment is due! Please click on the "Continue" button below.</B></FONT><P>');
           document.writeln('<FORM ACTION="check_order_info.htm" METHOD=GET> <INPUT TYPE=SUBMIT NAME=Submit VALUE="Continue"> </FORM>');
        }
        else
        {
           document.writeln('</TABLE><CENTER><FONT COLOR=' + tablefontcolor + '><B>Click on your preferred payment option above.</B></FONT><P>');
        }
     }

     document.writeln('</CENTER></FORM>');
}

	
//Show vbasket.htm contents	
function showvbasket() 
{
     var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }
		fulllist = document.cookie.substring(start, end);
		totprice = 0;
		document.writeln('<FORM NAME="updateform">');
		document.writeln('<INPUT TYPE="button" NAME="clear" VALUE="Clear Entire ShoppingCart" ONCLICK="clearBasket()"><P>');
		document.writeln('<TABLE CELLSPACING=1 CELLPADDING=3 BGCOLOR="' + tablebodycolor + '">');
		document.writeln('<TR bgcolor=' + tableheadcolor + '><TD><b><font size=3 color=' + tablefontcolor + '>Item</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Quantity</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Cost Each</FONT></B></TD>');
		document.writeln('<TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Sub Total </FONT></B><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Delete Item</FONT></B></TD></TR>');
		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				itemstart = i+1;
				thisitem = 1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				thequantity = fulllist.substring(itemstart, itemend);
				itemtotal = 0;
				itemtotal = (eval(theprice*thequantity));
				temptotal = itemtotal * 100;
				totprice = totprice + itemtotal;
				itemlist=itemlist+1;
				document.write('<TR><TD><FONT SIZE=3 COLOR=' + otherFontColor + '>'+theitem+'</FONT></TD>');
				document.write('<TD ALIGN=RIGHT><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=5><BR><FONT SIZE=1 COLOR=' + tablefontcolor + '><A HREF="javascript:amendItem('+itemlist+',document.updateform.quant'+itemlist+'.value)"><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif">Change This Quantity</A></FONT></TD>');
				document.write('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '>'+theprice+'</FONT></TD><TD ALIGN=RIGHT><FONT SIZE=3 COLOR=' + otherFontColor + '><B>'+alterError(itemtotal)+'</B></FONT></TD><TD><FONT SIZE=1><a href="javascript:removeItem('+itemlist+')"<CENTER><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif">Delete This Item</FONT></CENTER></a></TD></TR>');
				//document.write('<TD ALIGN=RIGHT>'+theprice+'</TD><TD ALIGN=RIGHT><B>'+alterError(itemtotal)+'</B></TD><TD><FONT SIZE=1><a href="javascript:removeItem('+itemlist+')"<CENTER><IMG SRC="images/delete_item.gif" BORDER=0></CENTER></A></FONT></TD></TR>');
			} else if (fulllist.substring(i,i+1) == '|') {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) theprice = fulllist.substring(itemstart, i);
				thisitem++;
				itemstart=i+1;
			}
		}
		document.writeln('<TR><TD COLSPAN=3 BGCOLOR=' + tableheadcolor + '><FONT COLOR=' + tablefontcolor + '><B>Sub Total</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>'+alterError(totprice)+'</B></FONT></TD><TD  BGCOLOR=' + tableheadcolor + '></TD></TR>');
		document.writeln('</TABLE></FORM>');
		document.writeln('');
	}
	
	
//Show vbasket.htm contents	
function showcontents() {
	 var CookieName = "NoliCoShoppingCart";
     var cookieFound = false;
     var start = 0;
     var end = 0;
     var cookieString = document.cookie;
     var i = 0;
     while (i <= cookieString.length) {
       start = i;
       end = start + CookieName.length;
       if (cookieString.substring(start,end) == CookieName) {
         cookieFound = true;
        break;
       }
       i++;
     }
     if (cookieFound) {
       start = end + 1;
       end = document.cookie.indexOf(";",start);
       if (end < start)
         end = document.cookie.length;
       document.cookie.substring(start,end);
     }
		fulllist = document.cookie.substring(start, end);
		totprice = 0;
		document.writeln('<FORM NAME="updateform">');
		document.writeln('<TABLE CELLSPACING=1 CELLPADDING=3 BGCOLOR="' + tablebodycolor + '">');
		document.writeln('<TR bgcolor=' + tableheadcolor + '><TD><b><font size=3 color=' + tablefontcolor + '>Item</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Quantity</FONT></B></TD><TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Cost Each</FONT></B></TD>');
		document.writeln('<TD><B><FONT SIZE=3 COLOR=' + tablefontcolor + '>Sub Total </FONT></B></TR>');
		//document.writeln('<FONT SIZE=3 COLOR="#000000">');
		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				itemstart = i+1;
				thisitem = 1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				thequantity = fulllist.substring(itemstart, itemend);
				itemtotal = 0;
				itemtotal = (eval(theprice*thequantity));
				temptotal = itemtotal * 100;
				totprice = totprice + itemtotal;
				itemlist=itemlist+1;
				document.write('<TR><TD><FONT SIZE=3 COLOR="#000000">'+theitem+'</FONT></TD>');
				//document.write('<TD ALIGN=RIGHT><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=5><BR></TD>');
				document.write('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR="#000000">'+thequantity+'</FONT></TD>');
				document.write('<TD ALIGN=RIGHT><FONT SIZE=3 COLOR="#000000">'+theprice+'</FONT></TD><TD ALIGN=RIGHT><FONT SIZE=3 COLOR="#000000"><B>'+alterError(itemtotal)+'</B></FONT></TD></TR>');
			} else if (fulllist.substring(i,i+1) == '|') {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) theprice = fulllist.substring(itemstart, i);
				thisitem++;
				itemstart=i+1;
			}
		}
		//document.writeln('</FONT>');

		document.writeln('<TR><TD COLSPAN=3 BGCOLOR=' + tableheadcolor + '><FONT COLOR=' + tablefontcolor + '><B>Sub Total</B></FONT></TD><TD BGCOLOR=' + tableheadcolor + ' ALIGN=RIGHT><FONT COLOR=' + tablefontcolor + '><B>'+alterError(totprice)+'</B></FONT></TD><TD  BGCOLOR=' + tableheadcolor + '></TD></TR>');
		document.writeln('</TABLE></FORM>');
		document.writeln('');
	}
	
	
//adjust quantity of vbasket.htm
function amendItem(itemno, newquant) 
{
     if ( newquant == 0)
     {
        if (confirm('Remove this item?'))
        {
           removeItem(itemno)
        }
     }
     else
     {
        newItemList = null;
        itemlist = 0;
        for (var i = 0; i <= fulllist.length; i++)
        {
           if (fulllist.substring(i,i+1) == '[')
           {
              thisitem = 1;
              itemstart = i+1;
              fullstart = i+1;
           }
           else if (fulllist.substring(i,i+1) == ']')
           {
              itemend = i;
              itemlist=itemlist+1;
              if (itemlist != itemno)
              {
                 newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
              }
              else
              {
                 newItemList = newItemList + '['+theitem+'|'+theprice+'|'+newquant+']';
              }
           }
           else if (fulllist.substring(i,i+1) == '|')
           {
              if (thisitem==1) theitem = fulllist.substring(itemstart, i);
              if (thisitem==2) theprice = fulllist.substring(itemstart, i);
              thisitem++;
              itemstart=i+1;
           }
        }

        index = document.cookie.indexOf("NoliCoShoppingCart");
        //document.cookie="NoliCoShoppingCart="+newItemList+"; expires=Friday, 31-Dec-2010 08:00:00 GMT";
        SetCookie("NoliCoShoppingCart", newItemList);
     }
	
     self.location = "vbasket.htm";
     if ( parent.frames[1] != null )
     {
        with (parent.frames[1])
        {
            document.location='shopping_cart.htm';
        }
     }
}
	
	
//Remove item from vbasket.htm	
function removeItem(itemno) {
     newItemList = null;
     itemlist = 0;
     for (var i = 0; i <= fulllist.length; i++) {
        if (fulllist.substring(i,i+1) == '[') {
             itemstart = i+1;
        } else if (fulllist.substring(i,i+1) == ']') {
             itemend = i;
             theitem = fulllist.substring(itemstart, itemend);
             itemlist=itemlist+1;
             if (itemlist != itemno) {
                  newItemList = newItemList+'['+fulllist.substring(itemstart, itemend)+']';
             }
        }
     }
     index = document.cookie.indexOf("NoliCoShoppingCart");
     //document.cookie="NoliCoShoppingCart="+newItemList+"; expires=Friday, 31-Dec-2090 08:00:00 GMT";
     SetCookie("NoliCoShoppingCart", newItemList);

     self.location = "vbasket.htm";
     if ( parent.frames[1] != null )
     {
        with (parent.frames[1])
        {
            document.location='shopping_cart.htm';
        }
     }
}


// clearBasket() - removes all items from the basket
function clearBasket() 
{
     if (confirm('Are you sure you want to REMOVE everything from your ShoppingCart?'))
     {
        //index = document.cookie.indexOf("NoliCoShoppingCart");
        //document.cookie="NoliCoShoppingCart=.";
        SetCookie("NoliCoShoppingCart", ".");

        self.location = "vbasket.htm";

        if ( parent.frames[1] != null )
        {
           with (parent.frames[1])
           {
              document.location='shopping_cart.htm';
           }
        }
     }
}

// thankYouClear() - removes all items from the basket
function thankYouClear() 
{
     if (confirm('Would you like us to clear your order from your ShoppingCart now?'))
     {
        //index = document.cookie.indexOf("NoliCoShoppingCart");
        //document.cookie="NoliCoShoppingCart=.";
        SetCookie("NoliCoShoppingCart", ".");

        //self.location = "thank_you.htm";

        if ( parent.frames[1] != null )
        {
           with (parent.frames[1])
           {
              document.location='shopping_cart.htm';
           }
        }
     }
}

//-->

