
var arrCRBG = new Array();
arrCRBG[0]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/Hub_coaching_for_life.jpg') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/hub-coach.gif\" width=\"168px\" height=\"25px\" alt=\"Get sporty\"><p>Improve your coaching and communication skills<br /><a href=\"/Responsiblebusiness/Supportingourcommunities/Learningandskills/London2012/Coachingforlife/Default.aspx\" title=\"Find out more\">Find out more</a></p></div></div>";

arrCRBG[1]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/home_windforchange.gif') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/home_fly.gif\" width=\"62px\" height=\"32px\" alt=\"Fly\"><p>Find out more about our wind farm project<br /><a href=\"/Responsiblebusiness/Protectingourenvironment/Windforchangeproject/index.htm\" title=\"Find out more\">Find out more</a></p></div></div>";

arrCRBG[2]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/home-internet-rangers.gif') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/home_rangers.gif\" width=\"102px\" height=\"35px\" alt=\"Rangers!\"><p>The search is on to find the BT Internet Ranger of the year<br /><a href=\"http://www.btinternetrangers.co.uk\" title=\"Find out more\">Find out more</a></p></div>";

arrCRBG[3]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/Hub_Big_Voice.jpg') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/hub-ideas.gif\" width=\"168px\" height=\"25\" alt=\"Big Voice\"><p>How could your community become a better place?<br /><a href=\"/Responsiblebusiness/Supportingourcommunities/Learningandskills/London2012/BigVoice/default.aspx\" title=\"Find out more\">Find out more</a></p></div></div>";

arrCRBG[4]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/Home_evaluating_impact_of_ICT.gif') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/Carbon_impact.gif\" width=\"168px\" height=\"25px\" alt=\"Carbon Impact\"><p>Read the latest GeSI report Evaluating the Carbon-Reducing Impacts of ICT<br /><a href=\"/Responsiblebusiness/Protectingourenvironment/EvaluatingtheCarbon-ReducingImpactsofICT/index.htm\" title=\"Find out more\">Find out more</a></p></div>";

//arrCRBG[5]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/home-sustainability-report.gif') no-repeat scroll left bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/sustainability-report.gif\" width=\"145px\" height=\"52px\" alt=\"Report\"><p>Take a look at our on-line report<br /><a href=\"/Responsiblebusiness/Ourstory/Sustainabilityreport/index.aspx\" title=\"Find out more\">Find out more</a></p></div></div>";

arrCRBG[5]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/resp-bus-landing-page-image.png') no-repeat scroll 30px 70px;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/sustainability-report-label.gif\" width=\"140px\" height=\"56px\" alt=\"Report\"><p><a href=\"/Responsiblebusiness/Ourstory/Sustainabilityreport/index.aspx\" title=\"Find out more\">Find out more</a></p></div></div>";

arrCRBG[6]="<div id=\"crrandomimage\" style=\"background:url('/templates/images10/hubimages/sustainability-partner-image.gif') no-repeat scroll 50px bottom;\"><div id=\"crrandomimagetext\"><img src=\"/templates/images10/hubimages/London-2012-label.gif\" width=\"140px\" height=\"32px\" alt=\"London 2012\"><p>BT is a Sustainability Partner for the London 2012 Olympic and Paralympic Games<br /><a href=\"/Responsiblebusiness/Supportingourcommunities/Learningandskills/London2012/index.htm\" title=\"Find out more\">Find out more</a></p></div></div>";

function GetRandomCRBG()
{ 
	if(arrCRBG==null || arrCRBG.length == 0) return;
	var iRandomBGIndex=Math.floor(Math.random()*arrCRBG.length);
	if($("#crhomeright").length > 0)
	{
		$("#crhomeright").html(arrCRBG[iRandomBGIndex]);
	}
}


$(document).ready(
  function(){ 
  
	GetRandomCRBG();	
       
	if($("#crhomebottom_poll").length > 0)
			$("#crhomebottom_poll").load("/Responsiblebusiness/poll/poll.aspx/");
	if($("#crpolllatest").length > 0)
		$("#crpolllatest").load("/responsiblebusiness/poll/poll.aspx/");
	if($("#blogLatestPost").length > 0)
		$("#blogLatestPost").load("/Responsiblebusiness/Ourstory/blog/default.aspx a.taggedlink:first", function() { $("#blogLatestPost").html($("#blogLatestPost").text()); });
	if($("#crsitesheader").length > 0)
		$("#crsitesheader").load("/responsiblebusiness/poll/poll.aspx/");
	 
	// hide toggle divs on faqs page 
	$('.toggle').hide();
 
	// capture clicks on the faqs toggle links
	$('a.toggleLink').click(function() {
	 
	// change the link depending on whether the element is shown or hidden
	if($(this).attr("id") == "selectedQuestion")
	{
	   $(this).removeAttr("id");
	}
	else
	{
	   $(this).attr("id", "selectedQuestion");
	}
	// toggle the display
	$(this).next('.toggle').toggle('fast');
	 
	// return false so any link destination is not followed
	return false;
	});
	
});
