

// swaps a css class of a specified id

function swap(ctrl, cls_off, cls_on, dir) 
{		


	//get reference to calee box
	var elm=document.getElementById(ctrl);

	//check type of call (1: up (onmouseover), 0: down (onmouseout))
	if(dir == 0){
		elm.className = cls_on;
	}else{
		elm.className = cls_off;
	}
}


// picks a random image among the three existing for the home page

function randBanner() {
	var prefix = 'assets/img/homeBanner990x270_';
	var chosenImageNumber = (Math.round(Math.random() * 10)) %3 ;
	imagePath = prefix + chosenImageNumber + '.jpg';
	window.document.writeln("<img src='" + imagePath + "' alt='read more about Evolution Group PLC' usemap='#homeBannerLink' />");
}


