/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/ 

var w=250
var h=250

if (document.getElementById || document.all) {
	document.write('<div id="trailimageid" style="position:absolute;width: auto;top:-1000px;left:-1000px;border:1px solid #888888;background:#ffffff;"><img alt="" id="ttimg" src="/bilder/shop/trenner.gif"></div>');
}

function gettrailobj(){
if (document.getElementById) 
	return document.getElementById("trailimageid").style
else if (document.all) 
	return document.all.trailimagid.style
}

function truebody() {
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidetrail() {
	document.onmousemove=""
	document.getElementById('ttimg').src='bilder/shop/trenner.gif'
	gettrailobj().visibility="hidden"
	gettrailobj().left=-1000
	gettrailobj().top=-1000
}


function showtrail(width,height,file) {

	w=width
	h=height

	// followmouse()

	gettrailobj().visibility="visible"
	gettrailobj().width=w+"px"
	gettrailobj().height=h+"px"
	document.getElementById('ttimg').src=file
	document.onmousemove=followmouse
}


function followmouse(e) {


var IE = document.all ? true : false;

// Temporary variables to hold mouse x-y pos.s

var tempX = 0
var tempY = 0


if (IE) { // grab the x-y pos.s if browser is IE

	tempX = event.clientX + document.body.scrollLeft - 20;
	tempY = event.clientY + document.body.scrollTop - 200;

} else { // grab the x-y pos.s if browser is NS

	tempX = e.pageX + 50;
	tempY = e.pageY - 200;

	if (tempX < 0){tempX = 0}
	if (tempY < 0){tempY = 0}
}

	gettrailobj().left=tempX+"px"
	gettrailobj().top=tempY+"px"
}


