function isTop()
{
	if (this.location != top.location)
	{
		top.location = this.location;
	}
}
isTop();

function reloadPage()
{
	// reload IE to reload css - concerns abs positioning
	if (document.all)
		document.location.href=document.location.href;
}

function writeYear()
{
	var startYear = 2006;
	var curYear = (new Date()).getFullYear();
	document.write(startYear == curYear ? startYear : startYear + "-" + curYear);
}

function switchOn(elemid)
{
	var elem = document.getElementById(elemid);
	if (elem)
	{
		elem.src = elem.src.replace('.jpg','_on.jpg');
		elem.src = elem.src.replace('.png','_on.png');
	}
}

function switchOff(elemid)
{
	var elem = document.getElementById(elemid);
	if (elem)
	{
		elem.src = elem.src.replace('_on.jpg','.jpg');
		elem.src = elem.src.replace('_on.png','.png');
	}
}
