function getCookieVal(offset) 
	{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
	}
function GetCookie (name) 
	{  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) 
		{
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) 
			break;   
		}  
	return -1;
	}

function changeImage()
	{
	if (!hovering)
		{
		picnum++
		if (picnum>=pic.length)
			picnum=0;
		if (document.getElementById('myImage'))
			document.getElementById('myImage').src=pic[picnum].src;
		if (document.getElementById('myRef'))
			{
			document.getElementById('myRef').href=picBigName[picnum];
//			window.status=document.getElementById('myRef').href;
			}
		}
//	setTimeout("changeImage();",3000);
	}
	
function mouseOver()
	{
	hovering=1;
	}

function mouseOut()
	{
	hovering=0;
	}

function SetCookie () 
	{ 
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+1); //expire tomorrow
	var CookieString =	"pic="+picnum+"; expires=" + exdate.toGMTString() + ";";
	document.cookie=CookieString;
	}

	
var picnum=GetCookie('pic');
if (picnum<0)
	picnum=0;
//window.status=picnum.valueOf();
var hovering=0;
var pic = new Array();
var picBigName = new Array();
if (document.images)
	{
	for (i=0;i<=12;i++)
		{
		pic[i] = new Image(); 	
		pic[i].src="/V1/Photos/LittleVol ("+i+").jpg";
		picBigName[i] = "/V1/Photos/BigVol ("+i+").jpg";
		}
	}
if (pic.length>0)
	picnum--
else picnum=pic.length;

function safarifixup() 
{
var UA=navigator.userAgent;
if (UA.indexOf('Safari')>0)
	{ 
	var temp = document.getElementById("navtable" );
	temp.style.width="689px";
	temp.style.height="54px";
	}
} 

function init() 
{
safarifixup();
changeImage();
setInterval("changeImage();",3000);
} 
                     