function showWork(iWork)
{
	//This means we can access correctly
	if(document.getElementById('header').firstChild.nodeValue == 'Sheila Millward')
	{
		if(document.getElementById('introtext'))
		{
			document.getElementById('introtext').style.visibility = 'hidden';
		}
		
		document.getElementById('workimagebox').style.visibility = 'visible';
		
		if(aWorkRatios[iWork] == 'landscape')
		{
			document.getElementById('workimagebox').style.left = '388px';
			document.getElementById('workimagebox').style.top = '46px';
		}
		else
		{
			document.getElementById('workimagebox').style.left = '434px';
			document.getElementById('workimagebox').style.top = '17px';
		}
		document.getElementById('workimage').setAttribute("src", aWorkImages[iWork]);
		document.getElementById('maintitle').firstChild.nodeValue = aWorkTitles[iWork];
		document.getElementById('subtitle').firstChild.nodeValue = aWorkSubtitles[iWork];
		document.getElementById('worklink').setAttribute("href", aWorkLargeImages[iWork]);
		iCurrentWork = iWork;
		return false;
	}
	else
	{
		return true;
	}
}

function showText()
{
	if(document.getElementById('header').style)
	{
		document.getElementById('introtext').style.visibility = 'visible';
		document.getElementById('workimagebox').style.visibility = 'hidden';
		document.getElementById('maintitle').firstChild.nodeValue = ' ';
		document.getElementById('subtitle').firstChild.nodeValue = ' ';
		return false;
	}
	else
	{
		return true;
	}
}

function preloadImages()
{
	if(document.images)
	{
		var aImages = new Array();
		for(i=0;i<aWorkImages.length;i++)
		{
			aImages[i] = new Image();
			aImages[i].src = aWorkImages[i];
		}
	}
}


function popupImage()
{
	var url = aWorkLargeImages[iCurrentWork];
	var width = aWorkLargeWidth[iCurrentWork] + 20;
	var height = aWorkLargeHeight[iCurrentWork] + 20;

	var imageWindow = window.open(url,'popupimage',config='width='+width+',height='+height+',resizable=yes,scrollbars=no,location=no,toolbar=no,menubar=no,status=no');
	imageWindow.moveTo(0,0);
	imageWindow.resizeTo(width+5, height+60);
	imageWindow.focus();

	return false;
}