var	Docref	=	window.location.href.toLowerCase();
var	Fref	=	1+Docref.indexOf("file:");
var	IE		=	(document.all	&&	!window.opera)	?	true	:	false;

if(!Fref)
{
	var ref	=	(document.images && document.referrer && (document.referrer.length > 0))	?	escape(document.referrer)	:	'';
	var	cnt	=	new Image(1,1);
	cnt.src	=	'http://www.purpurhain.de/cgi-bin/counter.cgi?id=860&rl=3600&ref='+ref+'&sh='+screen.height+'&sw='+screen.width;
}

function	SetSeite()
{
	var	seite	=	'bilder'+GAL;

	if(location.hash.length	>	1)
	{
		var	ref		=	location.hash.substr(1);

		for(var	ix = 0; ix < PIC.length; ix ++)
		{
			if(PIC[ix]	==	ref)
			{
				seite	=	ref;
				break;
			}
		}
	}

	return	((Fref)	?	'../purpur/'	:	'http://www.purpurhain.de/')+'galerie/'+seite;
}

function	SetHeight()
{
	if(document.getElementById('picframe'))
	{
		var	wh	=	(IE)	?	document.body.clientHeight	:	window.innerHeight;
//		var	ww	=	(IE)	?	document.body.clientWidth	:	window.innerWidth;
		if(wh	<	590)	//	||	wh	>	600)
			document.getElementById('picframe').style.height	=	wh	-	20	+	'px';
		else
			document.getElementById('picframe').style.height	=	'580px';
	}
}

