/*
function getobjstyle(id){
	if (document.getElementById)
		return document.getElementById(id).style
	else if (document.all)
		return document.all.$(id).style
}
*/
function truebody()
{
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function showBox1(e, boks)
{
/*
	var xcoord;
	var ycoord;
	if (typeof e != "undefined")
	{
		xcoord+=e.pageX
		ycoord+=e.pageY
	}
	Else if (typeof window.event !="undefined")
	{
		xcoord+=truebody().scrollLeft+event.clientX
		ycoord+=truebody().scrollTop+event.clientY
	}
	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)

//	b = document.body;
	box = document.getElementById(boks).style;
	box.left = xcoord
	box.top = ycoord
//	box.left = ((e.clientX) ? e.clientX : e.pageX)+(e.scrollLeft || b.scrollLeft)+15+"px";
//	box.top = ((e.clientY) ? e.clientY : e.pageY)+(e.scrollTop || b.scrollTop)-15+"px";
	box.display = "block";
*/
}

function showBox(e, boks)
{ //http://www.javascriptkit.com/script/script2/simpleimagetrail.shtml
	var xcoord=-150;
	var ycoord=-15;

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
	box = document.getElementById(boks).style;

	box.left = ((e.clientX) ? (e.clientX + xcoord) : (e.pageX + xcoord))+truebody().scrollLeft+15+"px"
	box.top = ((e.clientY) ? e.clientY : e.pageY)+truebody().scrollTop+15+"px";
//	alert(xcoord+"px");
//	alert(ycoord+"px");
//	box.left = xcoord+"px";
//	box.top = ycoord+"px";
	box.display = "block";
}

function hideBox(boks)
{
	document.getElementById(boks).style.display="none";
}


/*	The below functions are created by Sinus Frank/IT-magic	*/
function rotate(index, way)
{
	if (way == 1)
	{
		if (count[index] < pics[index])
		{
			count[index]++
		}
		else
		{
			count[index] = 1
		}
	}
	else
	{
		if (count[index] > 1)
		{
			count[index]--
		}
		else
		{
			count[index] = pics[index]
		}
	}

	if (absLead.length > 0)
	{
//		showPic = absPic[count[index]]
//		document.getElementById('recommendBanner').href = absLead[count[index]]
		document.getElementById('spotBox').innerHTML = absLead[count[index]]
	}
	else
	{
		document['pic' + index].src = 'images/frontpage/pics_' + (index.toString()) + '_' + (count[index].toString()) + '.jpg'
	}
}

function showhide(obj, disp)
{
	document.getElementById(obj).style.display = disp
}

