function preloadImages()
{
	var imageUrls = get_images();
	var pic = new Array(imageUrls.length);
	var logo = new Array(imageUrls.length);
	for (i=0;i<imageUrls.length;i++) {
		pic[i] = new Image();
		pic[i].src = "/images/map_rollovers/" + imageUrls[i]+".gif";
		logo[i] = new Image();
		logo[i].src = "/images/country_logos/" + imageUrls[i]+".gif";
	}
}
function LMap_On(img, line) {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('left_map').src = "/images/map_rollovers/" + img+".gif";
		change_text(line);
		change_img(img);
	}
}
function RMap_On(img, line) {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('right_map').src = "/images/map_rollovers/" + img+".gif";
		change_text(line);
		change_img(img);
	}
}
function CMap_On(img, line) {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('centre_map').src = "/images/map_rollovers/" + img+".gif";
		change_text(line);
		change_img(img);
	}
}
function LMap_Off() {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('left_map').src = "/images/mapleft.gif";
		change_text(0);	
		change_img(false);			
	}
}
function RMap_Off() {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('right_map').src = "/images/mapright.gif";
		change_text(0);	
		change_img(false);			
	}
}
function CMap_Off() {
	if (document.images && (document.all||document.layers||document.getElementById)){ 
		document.getElementById('centre_map').src = "/images/mapmiddle.gif";
		change_text(0);	
		change_img(false);			
	}	
}

function change_img(img) {
	var logo = document.getElementById('countrylogo');
	if(img)
	{
		logo.style.display = 'block';
		logo.src='/images/country_logos/'+img+'.gif';
		logo.alt=img;
	}
	else
		logo.style.display = 'none';
}

function change_text(line) {
	document.getElementById('country_text').innerHTML = country_text_array[line];	
	document.getElementById('countrytitle').innerHTML = country_title_array[line];
}