/* impressionen Script
Copyright since 2006 by Martin Stockinger
www.aktiv1.de jskripts@xom.de */

var pagewidth=997;

function Maus (Ereignis) { 
	if (!Ereignis)
		Ereignis = window.event;
	pageheight=document.body.clientHeight;
	mwpx=Ereignis.clientX; mppx=mwpx;
	mwpy=Ereignis.clientY; mppy=mwpy;
	// Abgleich wenn runter gescrollt ist
	if(document.body.scrollTop)mppy=mppy+document.body.scrollTop;
	// Seitenzentrierung Versatz abziehen
	mppx=mppx-(document.body.clientWidth-pagewidth)/2;
	mppx=Math.round(mppx);
	if (mppx<pagewidth) {
		// Position festlegen
		if(mppx+504>pagewidth)mppx=mppx-490;
		else mppx=mppx+16;
		if(mppy+338>(pageheight+document.body.scrollTop))mppy=mppy-325;
		else mppy=mppy+16;
		if (document.getElementById) {
			document.getElementById("showpic").style.left  = mppx + "px";
			document.getElementById("showpic").style.top = mppy + "px";
		} else if (document.all) {
			document.all.showpic.style.left = mppx;
			document.all.showpic.style.top = mppy;
		}
	}
}

function showpic(p)	{
	if(p<10)p='0'+p;
	document.getElementById('showme').src="grafix/impressionen/"+p+"_gr.jpg";
	document.getElementById('showpic').style.visibility="visible";
}
function hidepic()	{
	document.getElementById('showpic').style.visibility="hidden";
	document.getElementById('showme').src="grafix/impressionen/title.gif";
}
function reshowpic()	{
	//alert('stop')
}
document.onmousemove = Maus;

