/*
	This function randomly rotates banner images while using an array to associate the correct links to them.
	No idea where this function originated, just gave it a tidy up. GH - solriche.co.uk 2011
*/
function rotate_banner_image(){ 

	var link = new Array(
		"www.ttc-hosting.co.uk/contact/email_ttc.php",
		"www.co-opnet.coop",
		"www.co-operative.coop"
		);
		
	var image = new Array(
		"ttc_hosting.png",
		"co-opnet_advertise.png",
		"co-op_join.png"
		);
		
	var text = new Array(
		"TTC-Hosting, Web haosting at the best prices",
		"Advertise with Co-opnet",
		"Join the Co-operative Movement"
		);
	
	var next_file = Math.round(Math.random()*(link.length-1)); //this gets the image matched with each element of the link array. The -1 is for initial loading of the image
	//The URL may have to be an absolute path depending on where the function is called from
document.write('<div style="position: absolute; top: 2.5em; right: 1em;" class="banner_container"><a href="http://'+link[next_file]+'""><img id="banner" src="http://co-opnet.coop/styles/afterburner/banner/'+image[next_file]+'" width="240" height="48"  alt="'+text[next_file]+'" title="'+text[next_file]+'"/></a></div>');/**/
}
/*
	Usage
	In the head of overall_header.html insert - 
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/image_rotate.js"></script>
	To call in the HTML place the following function call in the page where you want the images to appear - template/overall_header.html.
	<script type="text/javascript">rotate_banner_image();</script>
*/
