
var ads = document.getElementById('leftpage').getElementsByTagName('div');
for (i = 0; i < ads.length; i++)
{
	if (ads[i].className == 'block')
	{
		ads[i].onmouseover = function()
		{
			this.old = this.style.backgroundColor;
			this.style.backgroundColor = '#FFFFFF';
		}
		
		ads[i].onmouseout = function()
		{
			this.style.backgroundColor = this.old;
		}
		
		ads[i].onclick = function()
		{
			document.location.href = this.getElementsByTagName('a')[0].href;
			return false;
		}
	}
}


var ads = document.getElementById('rightpage').getElementsByTagName('a');
for (i = 0; i < ads.length; i++)
{
	if (ads[i].className == 'block')
	{
		ads[i].onmouseover = function()
		{
			this.old = this.style.backgroundColor;
			this.style.backgroundColor = '#EFEFEF';
		}
		
		ads[i].onmouseout = function()
		{
			this.style.backgroundColor = this.old;
		}
		
		ads[i].onclick = function()
		{
			document.location.href = this.getElementsByTagName('a')[0].href;
			return false;
		}
	}
}