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()
{
	startYear = 2005;
	curYear = (new Date()).getFullYear();
	document.write(startYear == curYear ? startYear : startYear + "-" + curYear);
}

function showImg(imgid)
{
	var gNodes = document.getElementById('gallery').childNodes;
	for (var i = 0; gNodes.length > i; i ++)
	{
		if (gNodes[i].tagName == "IMG")
		{
			if (gNodes[i].attributes['id'].value == 'i' +imgid)
				gNodes[i].style.display = "block";
			else
				gNodes[i].style.display = "none";
		}
	}
	var gNodes = document.getElementById('thumbs').childNodes;
	for (var i = 0; gNodes.length > i; i ++)
	{
		if (gNodes[i].tagName == "A")
		{
			if (gNodes[i].attributes['id'].value == 't' +imgid)
				gNodes[i].attributes['class'].value = "on";
			else
				gNodes[i].attributes['class'].value = "off";
		}
	}
}

var imageID = 1;
var imageCnt = 0;
function animate()
{
	var pNodes = document.getElementById('partner').childNodes;
	for (var i = 0; pNodes.length > i; i ++)
	{
		if (pNodes[i].tagName == "DIV")
		{
			if (pNodes[i].attributes['id'].value == 'pr' +imageID)
				pNodes[i].style.display = "block";
			else
				pNodes[i].style.display = "none";
			imageCnt++;
		}
	}
	imageID++;
	if(imageID > imageCnt)
	{
		imageID = 1;
	}
	imageCnt = 0;
	setTimeout(animate, 2000);
}