var w3 = (document.getElementById?0:1);
var ns = (navigator.appName == 'Netscape');
var ie = (navigator.appName == 'Microsoft Internet Explorer');
var nv = parseInt(navigator.appVersion);
var wnd;
var hand = (ns?'pointer':'hand');
var tim;

function shand(el)
{
	el.style.cursor = hand;
}

function xhand(el)
{
	el.style.cursor = 'auto';
}

function lg(pic)
{
	var x;
	var y;
	if (ns)
	{ y = window.pageYOffset + 40;
		x = window.pageXOffset + 40;
	}
	else
	{ if (document.documentElement)
		{ y = document.documentElement.scrollTop + 40;
			x = document.documentElement.scrollLeft + 40;
		}
		else
		{ y = document.body.scrollTop + 40;
			x = document.body.scrollLeft + 40;
		}
	}
	document.getElementById('content').style.visibility = 'hidden';
	document.getElementById('enimg').src = '../images/'+pic;
	document.getElementById('enlarge').style.left = x+'px';	
	document.getElementById('enlarge').style.top = y+'px';	
	document.getElementById('enlarge').style.visibility = 'visible';
}

function xlg()
{
	document.getElementById('enlarge').style.visibility = 'hidden';
	document.getElementById('content').style.visibility = 'visible';
	document.getElementById('enimg').src = '';
}

function stopmus()
{
	document.mus.stop();
	document.getElementById('mussw').innerHTML = '<a href="javascript:startmus();">Start the music</a>.';
}

function startmus()
{
	document.mus.play();
	document.getElementById('mussw').innerHTML = '<a href="javascript:stopmus();">Stop the music</a>.';
	tim = setTimeout('playst()', 2000);
}

function playst()
{
	if (document.mus.playState==0)
	{ stopmus();
		clearTimeout(tim);
	}
	else
	{ tim = setTimeout('playst()', 2000);
	}
}

function emlk(n, d, s)
{
	var a = n+'@'+d;
	var t = s==null?a:s;
	document.write('<a href="mailto:'+a+'">'+t+'</a>');
}

function flash(id)
{
	var el = document.getElementById(id);
	if (el.style.visibility=='visible')
	{ el.style.visibility='hidden';
	}
	else
	{ el.style.visibility='visible';
	}
	setTimeout("flash('"+id+"')", 200);
}

function showSplash(t1, t2)
{
	var dt = new Date;
	var t = dt.getTime();
	if (t>t1 && t<t2)
	{ document.getElementById('splash').style.visibility = 'visible';
	}
}

function hideSplash()
{
	document.getElementById('splash').style.visibility = 'hidden';
}

