// JavaScript Document
// Anders SlideShow

var lastpic='pic1';

function getobject(name) {
	if (document.layers) 
		return document.layers[name];
	else if (document.all)
		return document.all[name];
	else if (document.getElementById)
		return document.getElementById(name);
}

function showpic (whichpic) {
	getobject(lastpic).className="viewed";
	lastpic=whichpic.id;
	
	whichpic.className="highlight";
	getobject('picture').src = whichpic.href;

	if (whichpic.name) {
		getobject('byline').innerHTML = whichpic.name;
		getobject('byline').className = "byline";
	} else {
		getobject('byline').innerHTML = "";
		getobject('byline').className = "hideme";
	}

	if (whichpic.title) {
		getobject('caption').innerHTML = whichpic.title + '<span style="color:white;">..</span>';
		getobject('caption').className = "caption";
	} else {
		getobject('caption').innerHTML = "";
		getobject('caption').className = "hideme";
	}
 	return false;
}

function popup(mylink, windowname){

	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
   		href=mylink+"&photo="+document.getElementById("picture").src;
	else
   		href=mylink.href;

	window.open(href, windowname, 'width=750,height=600,scrollbars=yes');
	return false;
}

