var I4 = false, N4 = false, N6 = false, O5 = false;
if(window.opera) O5 = true, window.defaultStatus = " ";
if(document.all && !O5) I4 = true;
if(document.layers) N4 = true;
if(document.getElementById && !I4) N6 = true;
if(O5 && document.captureEvents && document.contains) O5 = false;

var DHTML = (I4 || N4 || N6 || O5) ? true : false;
var Docref = window.location.href.toLowerCase();
var Fref = Docref.indexOf("file:");

var	SavHash	=	location.hash;
var	SavFlng	=	(SavHash	!=	'#art')	?	parent.frames.length	:	0;
var SavName	=	name;

if((I4 || N6)	&&	SavHash	!=	'#art' && top.frames.length>0)	top.document.title	=	document.title;

var gameicon = new Image(40,40);
if(SavHash=='#evamaria' || SavHash=='#frederic') gameicon.src = '../images/icons/'+SavHash.substring(1)+'40x40.gif';
else gameicon.src = '../icon.gif';

function SetIcon()
{
	control.document.images['gameicon'].src = gameicon.src;
}

function gotoUrl()
{
	if(SavFlng == 5 && SavHash == "#MAP") URL0 = 'sitemap.htm', POS = 15;
	else if(SavHash=="#REM") URL0 = 'noframes.htm', POS = 0;
		else URL0 = 'mainfram.htm', POS = 0;

	if((SavFlng == 4 || SavFlng == 5) && SavName == "mainframe") parent.index.gotoUrl(URL0,POS,SavHash,'../');
	else if(SavHash=="#REM") top.location.href = '../'+URL0+SavHash;
		else
		{
			if(document.referrer.toLowerCase().indexOf('$index.htm')>0) top.location.href = document.referrer;
			else
			{
				if(SavHash=="#MAP" && SavFlng==0 && SavName=="bysearchrem") top.location.href = '../home.htm';
				else
				{
					if(SavHash=='#games') top.location.href = 'home.htm';
					else if(SavHash=='#evamaria') top.location.href = '../evi/games.htm';
						else if(SavHash=='#art') parent.bilder.location.href = 'games.html';
							else
							{
								URLpfx = (document.location.href.toLowerCase().indexOf('file:')<0) ? "http://www.purpurhain.de/" : "../";
								top.location.href = URLpfx + "noframes.htm";
							}
				}
			}
		}
	return false;
}

var icons = new Array(9);
s0 = (SavHash=='#frederic') ? 'michel' : 'icetet';
for(i=0;i<9;i++)
{
	icons[i]=new Image();
	icons[i].src='images/'+s0+i+'.gif';
}

s1 = '<frame name="game" src="tetrisinit.htm" scrolling="no" noresize>';
s2 = '<frame name="control" src="tetriscntd.htm" scrolling="no" noresize>';
s3 = (SavHash=='#evamaria')? '110,*">'+s2+s1 : '*,110">'+s1+s2;
document.writeln('<frameset frameborder=no border=0 rows="*,0"><frameset frameborder=no border=0 cols="'+s3+'</frameset><frame name="top10" src="tetristop10chk.htm" scrolling="no" noresize></frameset>');