var pictures = ["g_grapes_02.jpg", "g_woven-grapes_02.jpg", "g_frogs_02.jpg", "g_acorns_02.jpg"];
var current = 0;
var global;
var currentpic;

function loadPic()
{
	var i;
	
	for (i = 0; i < pictures.length; i++)
		document.write('<img src="../graphics/' + pictures[i] + '" width=1 height=1 border=0>');

	return;
}

function getPic()
{
	var index;
	
	do
		{ index = parseInt(Math.random() * pictures.length); }
	while (index == current);
	
	current = index;
	
	document.getElementById('sidebarpic').src = 'graphics/' + pictures[index];
	
	return;
}

function swapPic(thispic)
{
	document.getElementById('sidebarpic').src = 'graphics/g_' + thispic + '.jpg';
	currentpic = thispic;
	return;
}

function globalPic(thispic)
{
	global = window.open('', '_blank', 'width=700,height=513');
	global.document.write('<html><body leftmargin=0 topmargin=0><img src="graphics/h_' + thispic + '.jpg" width=700 height=513></body></html>');
	return;
}

function rollOver (top, right, bottom, left)
{
	var topBar = document.getElementById?document.getElementById("topBar"):document.all?document.all["topBar"]:document.layers?document.layers["topBar"]:null;

	if (topBar.clip)
	{
		topBar.clip.top = top;
		topBar.clip.right = right;
		topBar.clip.bottom = bottom;
		topBar.clip.left = left;
	}
	else if (topBar.style.clip)
		topBar.style.clip = 'rect(' + top + ' ' + right + ' ' + bottom + ' ' + left + ')';
}
