function getimg(grp)
{
   var imag = new Array(74);// set this to array length  ie one more than highest imag reference
   for (i=0; i <imag.length; i++)
     imag[i]=new Array(2)
   var imglst = new Array(7);
   var index1 = "";
   var index2 = "";
   var index3 = "";
   var ind =0;

   var  prefx ="All";
   if (grp == 0)
   {  prefx = "All"; }
   if (grp ==1)
   {  prefx = "arch_";}
   if (grp ==2)
   {  prefx = "elec_";}
   if (grp ==3)
   {  prefx = "cop_";}
    if (grp ==4)
   {  prefx = "antimic_";}
     if (grp ==5)
   {  prefx = "member_";}
     if (grp ==6)
   {  prefx = "brass_";}
   
   
// set up image array:  title in imag[i][0] and alt text in imag[i][1]
// note alt ext not yet used
   imag[0][0] = "cop_0.jpg"; //image file name - no path!
   imag[0][1] = "Copper plumbing has a track record going back to Egyptian times for the conveyance of clean drinking water"; //image ALT text
   imag[1][0] = "cop_1.jpg";
   imag[1][1] = "Continuous cast wire rod for processing into cable and wires";
   imag[2][0] = "cop_2.jpg";
   imag[2][1] = "One Euro coin is bi-metallic - made from two copper alloys";
   imag[3][0] = "cop_3.jpg";
   imag[3][1] = "Statue of Liberty - clad in 75 tonnes of copper";
   imag[4][0] = "cop_4.jpg";
   imag[4][1] = "Bales of scrap copper ready to be remelted and turned into new copper products.";
   imag[5][0] = "cop_5.jpg";
   imag[5][1] = "Copper is a vital nutrient for good health";
   imag[6][0] = "cop_6.jpg";
   imag[6][1] = "Contemporary copper bowl - Design Competition entry";
   imag[7][0] = "cop_7.jpg";
   imag[7][1] = "Copper cladding prevents biofouling on the hull of the Copper Mariner boat";
   imag[8][0] = "cop_8.jpg";
   imag[8][1] = "Copper is essential for technology";
   imag[9][0] = "cop_9.jpg";
   imag[9][1] = "Coils of brass sheet and strip";
   imag[10][0] = "cop_10.jpg";
   imag[10][1] = "Brass extrusions are available in a range of different profiles";
   imag[11][0] = "cop_11.jpg";
   imag[11][1] = "cop_11.jpg";
   imag[12][0] = "cop_12.jpg";
   imag[12][1] = "Slab of copper alloy heated prior to hot- and cold-rolling to produce plate, sheet, strip and foil";
   imag[13][0] = "cop_13.jpg";
   imag[13][1] = "Cuprobraze copper and brass automotive radiators are light, efficient and durable";
   imag[14][0] = "cop_14.jpg";
   imag[14][1] = "cop_14.jpg";
   imag[15][0] = "cop_15.jpg";
   imag[15][1] = "Offshore platform";
   imag[16][0] = "cop_16.jpg";
   imag[16][1] = "High-speed trains need 10 tonnes of copper per kilometre of track";
   imag[17][0] = "cop_17.jpg";
   imag[17][1] = "Ship's propeller made from aluminium bronze for corrosion and biofouling resistance";
   imag[18][0] = "cop_18.jpg";
   imag[18][1] = "Copper interconnections in a microchip";
   imag[19][0] = "cop_19.jpg";
   imag[19][1] = "Bingham Canyon copper mine, Salt Lake City, Utah, USA";
   imag[20][0] = "cop_20.jpg";
   imag[20][1] = "Copper cathodes being lifted out of electrolytic cells at a refinery";
   imag[21][0] = "cop_21.jpg";
   imag[21][1] = "Malachite - a green copper carbonate mineral";
   imag[22][0] = "arch_0.jpg";
   imag[22][1] = "Munich Service Centre – a copper facade with a  surface pattern of closed and perforated copper";
   imag[23][0] = "arch_1.jpg";
   imag[23][1] = "Laajasalo Church, Helsinki, Finland – copper has been used in 'strata'";
   imag[24][0] = "arch_2.jpg";
   imag[24][1] = "Battersea Park Boathouse, London  - clad in long strip copper without transverse joints";
   imag[25][0] = "arch_3.jpg";
   imag[25][1] = "Brewery Square, Clerkenwell, London - clad with pre-patinated rainscreen panels";
   imag[26][0] = "arch_4.jpg";
   imag[26][1] = "Curtain Road, London - copper is intended as a metaphor for the material's impact on telecommunications.";
   imag[27][0] = "arch_5.jpg";
   imag[27][1] = "Duke of York’s Headquarters, London - three levels of shallow pitched copper roofing.";
   imag[28][0] = "arch_6.jpg";
   imag[28][1] = "The Core, Eden Project, Cornwall – the roof is made from copper from a single source – one of the world’s most sustainable mines, in Kennecott, Utah";
   imag[29][0] = "elec_0.jpg";
   imag[29][1] = "Electric arc";
   imag[30][0] = "elec_1.jpg";
   imag[30][1] = "True RMS metering";
   imag[31][0] = "elec_2.jpg";
   imag[31][1] = "Copper busbar";
   imag[32][0] = "elec_3.jpg";
   imag[32][1] = "Power cable";
   imag[33][0] = "elec_4.jpg";
   imag[33][1] = "Lead frame";
   imag[34][0] = "elec_5.jpg";
   imag[34][1] = "The generator in a 1.5MW wind turbine needs 3.4 tonnes of copper to convert the wind energy to electricity";
   imag[35][0] = "elec_6.jpg";
   imag[35][1] = "Resin-cast transformer";
   imag[36][0] = "elec_7.jpg";
   imag[36][1] = "Thermographic image of electric motor";
   imag[37][0] = "elec_8.jpg";
   imag[37][1] = "3-phase transformer";
   imag[38][0] = "elec_9.jpg";
   imag[38][1] = "Copper busbar";
   imag[39][0] = "arch_7.jpg";
   imag[39][1] = "Frances Gardner House, University College London -clad in pre-oxidised copper in long horizontal strips";	
   imag[40][0] = "arch_8.jpg";
   imag[40][1] = "Westfield Student Village, Queen Mary University, London – two different styles of copper cladding";	
   imag[41][0] = "arch_9.jpg";
   imag[41][1] = "Codelco Building, Chile - a copper mesh skin provides solar shading in this desert location";	
   imag[42][0] = "arch_10.jpg";
   imag[42][1] = "BBC Home Front in the Garden  - this sculptural garden shelter for a private London house forms a crab-shaped copper cocoon.";	 
   imag[43][0] = "arch_11.jpg";
   imag[43][1] = "Peckham Library, London  - three elevations are clad in pre-patinated copper sheet";	
   imag[44][0] = "arch_12.jpg";
   imag[44][1] = "Popstage Mezz, Breda, Netherlands";
   imag[45][0] = "arch_13.jpg";
   imag[45][1] = "Radisson Hotel, Glasgow - a dramatic curved copper screen is the dominant design element of Glasgow's new, award-winning Radisson SAS Hotel.";	
   imag[46][0] = "arch_14.jpg";
   imag[46][1] = "Urbis, Manchester - clad in pre-patinated copper to blend with the green hue of the glass";	  
   imag[47][0] = "antimic_0.jpg";
   imag[47][1] = "Brass taps and grab rail";	
   imag[48][0] = "antimic_1.jpg";
   imag[48][1] = "MRSA cannot survive on copper";
   imag[49][0] = "antimic_2.jpg";
   imag[49][1] = "Brass pull handles";
   imag[50][0] = "antimic_3.jpg";
   imag[50][1] = "Brass push plates";
   imag[51][0] = "antimic_4.jpg";
   imag[51][1] = "Copper over-bed table";
   imag[52][0] = "antimic_5.jpg";
   imag[52][1] = "Brass pen";
   imag[53][0] = "antimic_6.jpg";
   imag[53][1] = "Brass trolley";
   
   imag[54][0] = "member_0.jpg";
   imag[54][1] = "BHP Billiton";	
   imag[55][0] = "member_1.jpg";
   imag[55][1] = "BNFMF";
   imag[56][0] = "member_2.jpg";
   imag[56][1] = "Aurubis UK Ltd";
   imag[57][0] = "member_3.jpg";
   imag[57][1] = "IBP Conex";
   imag[58][0] = "member_4.jpg";
   imag[58][1] = "KME Yorkshire";
   imag[59][0] = "member_5.jpg";
   imag[59][1] = "Luvata Sales Oy (UK)";
   imag[60][0] = "member_6.jpg";
   imag[60][1] = "Mueller Europe Ltd";
   imag[61][0] = "member_7.jpg";
   imag[61][1] = "Leaf Business UK";
   imag[62][0] = "member_8.jpg";
   imag[62][1] = "Rio Tinto London Ltd";
   imag[63][0] = "member_9.jpg";
   imag[63][1] = "Sanha UK Ltd";
   imag[64][0] = "member_10.jpg";
   imag[64][1] = "Southern Peru Copper Corporation";	
   imag[65][0] = "member_11.jpg";
   imag[65][1] = "Wieland-Werke (UK) Ltd";
   imag[66][0] = "member_12.jpg";
   imag[66][1] = "Codelco Services Ltd";
   imag[67][0] = "member_13.jpg";
   imag[67][1] = "Pegler Yorkshire Group";
   imag[68][0] = "brass_0.jpg";
   imag[68][1] = "Brass extrusions are available in a range of different profiles";
   imag[69][0] = "brass_1.jpg";
   imag[69][1] = "Brass trolley";
   imag[70][0] = "brass_2.jpg";
   imag[70][1] = "Cuprobraze copper and brass automotive radiators are light, efficient and durable";
   imag[71][0] = "brass_3.jpg";
   imag[71][1] = "Coils of brass sheet and strip";
   imag[72][0] = "brass_4.jpg";
   imag[72][1] = "Antimicrobial brass taps";
   imag[73][0] = "brass_5.jpg";
   imag[73][1] = "Brass window frame section";
  

   <!-- generates 3 unique random integer values for index 1, index2 and index3 -->
   index1 = Math.floor(Math.random() * imag.length);
   while ((prefx!='All' && imag[index1][0].indexOf(prefx)!=0) || (prefx=='All' && imag[index1][0].indexOf('member_')==0))
   {
      index1 = Math.floor(Math.random() * imag.length);
   }
   index2 = index1;
 //  alert(ind);
 //  alert(prefx);
 //  alert(imag[index1][0]);
   while ((prefx!='All' && (imag[index2][0].indexOf(prefx)!=0)) || (prefx=='All' && imag[index2][0].indexOf('member_')==0) || (index2 == index1))
   {
      index2 = Math.floor(Math.random() * imag.length);
   }
   index3 = index1;
   while  ((prefx!='All' && (imag[index3][0].indexOf(prefx)!=0)) || (prefx=='All' && imag[index3][0].indexOf('member_')==0)  || (index3 == index2) || (index3 == index1))
   {
      index3 = Math.floor(Math.random() * imag.length);
   }
   imglst[0] = "/images/" + imag[index1][0];
   imglst[1] = "/images/" + imag[index2][0];
   imglst[2] = "/images/" + imag[index3][0];
   imglst[3] = imag[index1][1];
   imglst[4] = imag[index2][1];
   imglst[5] = imag[index3][1];
   return imglst;
}
