// Java Document for badge sponsorship
<!--
var thevents = new Array (["sg_flag.GIF","23rd April","ST Georges Day Service"],["lions_walk.JPG","May","Lions Walk"],["THANX.GIF","23rd May","Annual Awards Evening"],["books.GIF","9th June","Book Sale"],["tent.JPG","7th July","Group Fun Day"],["h_fest.jpg","September","Harvest Festival"],["quizpic.GIF","13th October","Quiz Night"],["fireworks2.GIF","2nd November","Fireworks Night"],["books.GIF","3rd November","Book Sale"],["poppy.jpg","11th November","Remembrance Day Parade"],["letterbox.GIF","16th December","Xmas Post"]);
var thebdgs = new Array (["cu-as-diy.gif","Cub","DIY","Hayling Hardware"],["sc-as-diy.gif","Scout","DIY","Hayling Hardware"],["cu-as-bore.gif","Cub","Book Reader","Hayling Bookshop"],["sc-as-li.gif","Scout", "Librarian", "Hayling Bookshop"],["sc-as-wr.gif","Scout", "Writer", "Hayling Bookshop"],["cu-as-hohe.gif","Cub", "Home Help","Helping Hands Allcare"],["be-as-anfr.gif", "Beaver", "Animal Friend", "Animal Magic"],["cu-as-anca.gif", "Cub", "Animal Carer", "Animal Magic"],["be-as-im.gif","Beaver", "Imagination", "Mill Rythe Holiday Resort"],["cu-as-en.gif","Cub", "Entertainer", "Mill Rythe Holiday Resort"],["sc-as-en.gif","Scout", "Entertainer", "Mill Rythe Holiday Resort"],["ex-as-pear.gif","Explorer", "Performing Arts", "Mill Rythe Holiday Resort"],["sc-as-lisa.gif","Scout", "Lifesaver", "Mill Rythe Holiday Resort"],["ex-as-lisa.gif","Explorer", "Lifesaver", "Mill Rythe Holiday Resort"],["sc-as-caco.gif","Scout", "Camp Cook", "Mill Rythe Holiday Resort"],["cu-as-comm.gif", "Cub", "Communicator", "Bentley Walker"],["sc-as-comm.gif", "Scout", "Communicator", "Bentley Walker"],["sc-as-el.gif", "Scout", "Electronics", "Bentley Walker"],["sc-as-an.gif","Scout", "Angler","Paiges Fishing Tackle"],["sc-as-mech.gif","Scout", "Mechanic", "Solent Motor Services"],["ex-as-scsk.gif","Explorer", "Scouting Skills", "Group Committee"],["be-cs-frch.gif","Beaver", "Friendship Challenge", "Hugh Hickman Estate Agent"],["cu-cs-cach.gif","Cub", "Caring Challenge", "Hugh Hickman Estate Agent"],["ex-as-co.gif","Explorer", "Community Challenge", "Hugh Hickman Estate Agent"],["be-as-hefi.gif","Beaver", "Health and Fitness","Jacqui Gray - Homeopath"],["cu-cs-fich.gif","Cub", "The Fitness Challenge","Jacqui Gray - Homeopath"],["sc-cs-fich.gif","Scout", "The Fitness Challenge","Jacqui Gray - Homeopath"],["cu-as-ch.gif","Cub", "Chef","Cottage Cuisine"],["sc-as-ch.gif","Scout", "Chef","Cottage Cuisine"],["sc-as-mech.gif","Scout", "Mechanic", "Simon Rigden"],["cu-cs-coch.gif","Cub", "Community Challenge","Iris and John Cottle"],["sc-cs-coch.gif","Scout", "Community Challenge", "Hayling Lions"], ["cu-as-myfa.gif", "Cub", "My Faith", "Julian Dyer Home Improvements"]);
var curpic=0;
var sctlbl = "Scout";
var imgfn = "/sponsorship/badge_sponsorship/images/";
var arrln = thebdgs.length;
var crrln=arrln-1;
var geventln = thevents.length;
var geventct = geventln-1;
var geventfn = "/new_events/images/";
var gevent=0;
var rohevent=0;
var roh_fn = "/general/roh/holder_images/";
var rohcnt = 20;
//alert ("length test is  " + arrln);
  function randpic() {
    curpic = Math.floor(Math.random()* arrln);
    fil_img = imgfn + thebdgs[curpic][0];
	document.getElementById('bdge_img').src = fil_img;
	document.getElementById('bdge_wds').innerHTML = thebdgs[curpic][1] + "s - " + thebdgs[curpic][2] + "<br /> <br />" + thebdgs[curpic][3];
  }
function randroh() {
   rohevent++;
   if (rohevent > rohcnt) { rohevent=1; }
   rohfil_img = roh_fn + "pic" + rohevent + ".jpg";
   document.getElementById('roh_image').src = rohfil_img;   
}
function randgev() {
	gevent++
	if (gevent > geventct) { gevent=0; }
	gevent_img = geventfn + thevents[gevent][0];
	document.getElementById('event_mth').innerHTML = thevents[gevent][1];
    document.getElementById('event_img').src = gevent_img;	
	document.getElementById('event_what').innerHTML = thevents[gevent][2];
}
function showtime() {
   var timed=setInterval("randpic()",3000);
   var roh_timed=setInterval(randroh,2000);    
   var gev_timed=setInterval(randgev,2000);
}    
-->

