// JavaScript Document

function swapImage(image, number)
{
	var menuimage = document.getElementById(image);
	if (menuimage.src = 'images/menu/button'+ number +'_nor.jpg')
	{
	  	menuimage.src = 'images/menu/button'+ number +'_hov.jpg';
		
	}
}
function restoreImage(image, number)
{
	var menuimage = document.getElementById(image);
	if (menuimage.src = 'images/menu/button'+ number +'_hov.jpg')
	{
	  	menuimage.src = 'images/menu/button'+ number +'_nor.jpg';
	}
}
function toolTip(event, tekst)
{
	var x = event.clientX;
	var tooltip = document.getElementById('toolTip');
	var tooltiptekst = document.getElementById('toolTipText');
	
	var tooltip1 = document.getElementById('toolTip1');
	var tooltiptekst1 = document.getElementById('toolTipText1');
	//opera Netscape 6 Netscape 4x Mozilla 
	if (window.innerWidth || window.innerHeight)
	{ 
		docwidth = window.innerWidth; 
		docheight = window.innerHeight;
	} 
	
	//IE6
	if (document.documentElement.clientWidth || document.documentElement.clientHeight)
	{
		docwidth = document.documentElement.clientWidth; 
		docheight = document.documentElement.clientHeight;
	}
	
	//IE Mozilla 
	if (document.body.clientWidth || document.body.clientHeight)
	{ 
		docwidth = document.body.clientWidth; 
		docheight = document.body.clientHeight;
	}
	
	if (docwidth - x <= 350)
	{
		//x = x-220;
		w = docwidth - x;
		tooltip1.style.display = "block";
		tooltip1.style.right = ''+ w + 'px';
		tooltip1.style.top = '190px';
		tooltiptekst1.innerHTML = tekst;
	}
	else
	{
		x = event.clientX;
		tooltip.style.display = "block";
		tooltip.style.left = ''+ x + 'px';
		tooltip.style.top = '190px';
		tooltiptekst.innerHTML = tekst;
	}
}
function moveToolTip()
{
	var tooltip = document.getElementById('toolTip');
	tooltip.style.display = "none";
	var tooltip1 = document.getElementById('toolTip1');
	tooltip1.style.display = "none";
}
