<!-- 

var curVLink = 1;
var curHLink = 1;
var curPhoto = 1;
var mOvrTimer;

var pageOri = '';


function mOvr(index)
{
	if (mOvrTimer)	clearTimeout(mOvrTimer);
	document.images['thumb' + pageOri].src='photos/' + index + '_th.jpg';

	if (pageOri == H) {
		if (index != curHLink)
			document.getElementById('link' + pageOri + index).className = 'linkOvr';		
	} else {
		if (index != curVLink)
			document.getElementById('link' + pageOri + index).className = 'linkOvr';		
	}
}

function mOut(index)
{
	if (pageOri == H) {
		if (index != curHLink) {
			document.getElementById('link' + pageOri + index).className = 'link';				
			mOvrTimer = setTimeout("document.images['thumb' + pageOri].src='photos/' + curHLink + '_th.jpg';",500);
		}
	} else {
		if (index != curVLink) {
			document.getElementById('link' + pageOri + index).className = 'link';					
			mOvrTimer = setTimeout("document.images['thumb' + pageOri].src='photos/' + curVLink + '_th.jpg';",500);
		}
	}
}

function switchTemplate(templateOri)
{
	if(templateOri == H) {
		document.getElementById('photoV').style.display = 'none';
		document.getElementById('photoH').style.display = 'block';			
	}
	else {
		document.getElementById('photoV').style.display = 'block';
		document.getElementById('photoH').style.display = 'none';			
	}
}

function loadPhoto(index)
{
	if (orientation[index] == H) {
		document.images['PhotoV'].src='photos/blankV.gif';
		document.getElementById('linkV' + curVLink).className = 'link';
		document.getElementById('linkV' + index).className = 'link';

		if (pageOri != H) switchTemplate(H);
		document.images['PhotoH'].src='photos/' + index + '.jpg';
		document.images['thumbH'].src='photos/' + index + '_th.jpg';	
		
		document.getElementById('linkH' + curHLink).className = 'link';
		document.getElementById('linkH' + index).className = 'linkOn';		
		
		pageOri = H;
		curHLink = index;	
	} else {
		document.images['PhotoH'].src='photos/blankH.gif';
		document.getElementById('linkH' + curHLink).className = 'link';
		document.getElementById('linkH' + index).className = 'link';
				
		if (pageOri != V) switchTemplate(V);	
		document.images['PhotoV'].src='photos/' + index + '.jpg';
		document.images['thumbV'].src='photos/' + index + '_th.jpg';	
				
		document.getElementById('linkV' + curVLink).className = 'link';		
		document.getElementById('linkV' + index).className = 'linkOn';		
		
		pageOri = V;		
		curVLink = index;	
	}
}

	
function next()
{
	if (pageOri == H) {
		if (curHLink < PHOTOS)
		{
			loadPhoto(curHLink+1);
		}
		else
		{
			loadPhoto(1);
		}
	} else {
		if (curVLink < PHOTOS)
		{
			loadPhoto(curVLink+1);
		}
		else
		{
			loadPhoto(1);
		}
	}
}

function prev()
{
	if (pageOri == H) {
		if (curHLink > 1)
		{
			loadPhoto(curHLink-1);
		}
		else
		{
			loadPhoto(PHOTOS);
		}
	} else {
		if (curVLink > 1)
		{
			loadPhoto(curVLink-1);
		}
		else
		{
			loadPhoto(PHOTOS);
		}
	}
	
	
	
}


function popup2002() {
	var mac = (navigator.appVersion.indexOf("Mac")!=-1)?1:0;
  if (mac) width=480;
  else width=500;
  w5 = window.open("http://natural-selection.ca/2002/home3.php","yearbook5","width=" + width + ",height=630,menubar=0,toolbar=0,scrollbar=0,resizeable=0");
 }
 
 
 function popup2003(winname,url,width,height) {
	mapPopup = window.open(url,winname,'resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,width=' + width + ',height=' + height + ',screenX=150,screenY=100,left=150,top=100,scrollbars=0');
}
//-->

