// Javascript file for randon index image

function setRandomImage()
{
	// Advanced Random Images Start
	// Copyright 2001-2002 All rights reserved, by Paul Davis - www.kaosweaver.com
	
	// Updated by Rob Ingram @ Jupiter
	
	var j,d="",l="",m="",p="",q="",z="",KW_ARI= [];
	
	var rndImage = document.createElement( 'img' ) ;
	
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_building.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_laptop.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_people.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_roof_tops.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_scaffolding.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_shopping_bag.jpg';
	KW_ARI[KW_ARI.length]='images/rotating_images/home_banner_trees.jpg';
	j=parseInt(Math.random()*KW_ARI.length, 10);
	j=(isNaN(j))?0:j;
	
	//document.write("<img src='../"+KW_ARI[j]+"'>");
	
	rndImage.setAttribute( 'class', '' ) ;
	rndImage.setAttribute( 'name', 'brand_image' ) ;
	rndImage.setAttribute( 'src', KW_ARI[j] ) ;
	rndImage.setAttribute( 'alt', 'Freeth Cartwright' ) ;
	document.getElementById( 'brand_image' ).appendChild( rndImage ) ;
	
	// Advanced Random Images End
}

safeAddOnload(setRandomImage);
	
