// played-in-britain.js

// swap image and caption

function swapPhotoGen(photoSRC,theCaption,theCredit) {
	var displayedCaption = document.getElementById("caption");
	displayedCaption.innerHTML = theCaption;

	var displayedCredit = document.getElementById("credit");
	displayedCredit.firstChild.nodeValue = theCredit;

    document.images.imgPhoto.src = "/assets/gallery-sporting-places/" + photoSRC;
    }
    
function swapPhotoPl(photoSRC,theCaption,theCredit) {
	var displayedCaption = document.getElementById("caption");
	displayedCaption.innerHTML = theCaption;
//displayedCaption.firstChild.nodeValue = theCaption;
//document.getElementById(titleCaption).innerHTML=theCaption;

	var displayedCredit = document.getElementById("credit");
	displayedCredit.firstChild.nodeValue = theCredit;

    document.images.imgPhoto.src = "/assets/gallery-plaques/" + photoSRC;
    }    

function swapPhotoNews(photoSRC,theCaption,theCredit) {
	var displayedCaption = document.getElementById("caption");
	displayedCaption.innerHTML = theCaption;

	var displayedCredit = document.getElementById("credit");
	displayedCredit.firstChild.nodeValue = theCredit;

    document.images.imgPhoto.src = "/assets/news/" + photoSRC;
    }    

    
// over-rides    

if (navigator.platform.indexOf('Mac')!= -1)
	{
	var cssNode = document.createElement('link');
	cssNode.setAttribute('media', 'screen');
	cssNode.setAttribute('rel', 'stylesheet');
	cssNode.setAttribute('type', 'text/css');
	cssNode.setAttribute('href', '/playedinbritain-mac.css');
	document.getElementsByTagName('head')[0].appendChild(cssNode);
	}
	
//if (navigator.userAgent.indexOf('Firefox')!= -1)
//	{
//	var cssNode = document.createElement('link');
//	cssNode.setAttribute('media', 'screen');
//	cssNode.setAttribute('rel', 'stylesheet');
//	cssNode.setAttribute('type', 'text/css');
//	cssNode.setAttribute('href', 'playedinbritain-firefox.css');
//	document.getElementsByTagName('head')[0].appendChild(cssNode);
//	}	