<!--
// 										//
// Random images for the homepage		//
// Valid source material: .jpg & .swf	//
// v1.3 sagba 26.01.07					//
//										//

// Path to published location of images used
var path = "/cymraeg/styles/welsh/images/";
// Rx publishing variables
var prefix = "banner-img-";

var pathF = "/images/";
// Rx publishing variables
var prefixF = "image-ad-"
var suffixF = "-web";

// Store the elements in arrays
// Create array of images
images = new Array();

// Images used
	// Image name should be the Content ID
	// taken from the published item in Rx
images[0] = new Array('02','jpg','','Myfyrwraig yn gweithio yn llyfrgell','25','71','','');
images[1] = new Array('03','jpg','','Myfyrwyr tu allan adeilad y Dynoliaethau','25','71','','');
images[2] = new Array('04','jpg','','Ymchwilydd yn y llyfrgell','25','71','','');
images[3] = new Array('05','jpg','','Seminar','25','71','','');
images[4] = new Array('06','jpg','','Silffoedd yn y llyfrgell','25','71','','');
images[5] = new Array('07','jpg','','Canolfan y Mileniwm, Bae Caerdydd','25','71','','');
images[6] = new Array('08','jpg','','Nenlinell Bae Caerdydd','25','71','','');
images[7] = new Array('09','jpg','','Stadiwm y Mileniwm, Caerdydd','25','71','','');
images[8] = new Array('10','jpg','','Canolfan y Mileniwm, Bae Caerdydd','25','71','','');

// images[x] = new Array(
		// 0 - name			- file name
		// 1 - extension	- jpg/swf
		// 2 - alt eng		- string
		// 3 - alt cym		- string
		// 4 - width		- .swf only value
		// 5 - height		- .swf only value
		// 6 - version		- .swf only value
		// 7 - background	- .swf only value

// Amend tag to reflect location of lang attribute
			var	langID = 3 // Welsh
// Randomiser 
	i = Math.floor(Math.random() * images.length);
	
	function randomImg()
	{
		// Hides the image which is displayed if JavaScript is not available
		var noJSimg = document.getElementById('nojs');
			//	noJSimg.setAttribute('style', 'display:none;');
			noJSimg.style.display='none';
			document.write("<img src=\""+path+prefix+images[i][0]+"."+images[i][1]+"\" alt=\""+images[i][langID]+"\" class=\"floatRight\" />");
	}
//
//-->
