function lyrsetup(val,lf,tp) {
	this.bit = eval(doc + val + sty);
	this.bit.left=lf;
	this.bit.top=tp;
	return this.bit;
}

function entsub(e) { 
	clearTimeout(scrolltimer);
	scrolltimer = setTimeout("query()", 30000);
	if (document.all) {key_press=window.event.keyCode;}
	else
	if (document.getElementById) {key_press=e.which ;}
	if (active) {
		counter=counter+1;
		if (counter>20) {
			counter=0;
			endvalue='too many';
			sub_form();
		}
		if (counter>3 && (key_press==32 || key_press==13)) {sub_form();}
		else {
		if (key_press>64 && key_press<91) {
			result[counter]=String.fromCharCode(key_press);
			result[counter]=result[counter].toLowerCase();
//			onscreen=onscreen+'<font color=#'+(1+Math.round(9*Math.random()))+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+'>*</font>';
			onscreen=onscreen+'<font color=#'+(1+Math.round(9*Math.random()))+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+Math.round(10*Math.random())+'>&#'+(160+Math.round(21*Math.random()))+';</font>';
			screenresult='password?<br><br><font size=+2>'+onscreen+'</font>';
			show_stuff();
		}
		else{
			counter=counter-1;}
		}
	}
	else
	{
		if (key_press==32 || key_press==13) {self.location.href='./';}
	}
} 

function show_stuff() {
	maintext='<table height=300 width='+available_width+' border=0><tr><td align=center valign=center><b>'+screenresult+'</b></td></tr></table>';
	if (active){magiccontents('mainHTML');}
}

function sub_form() {
	clearTimeout(scrolltimer);
	for (var i=1; i<counter;i++) {endvalue=endvalue+result[i];}
	form1.pass.value=endvalue;
	form1.submit();
}

function query() {
	clearTimeout(scrolltimer);
	rnd2 = Math.round(8*Math.random());
	if (rnd2==0||rnd2==8) {screenresult='whenever you\'re ready...';}
	if (rnd2==1) {screenresult='have you nothing to say?';}
	if (rnd2==2) {screenresult='I\'m waiting...';}
	if (rnd2==3) {screenresult='c\'mon, have a go...';}
	if (rnd2==4) {screenresult='it\'s not as hard as you think...';}
	if (rnd2==5) {screenresult='in your own time...';}
	if (rnd2==6) {screenresult='anything\'ll do to get you started...';}
	if (rnd2==7) {screenresult='don\'t be shy now...';}
	screenresult=screenresult+'<br><br><font size=+2>&nbsp;</font>';
	show_stuff();
	screenresult='';
	counter=0;
	scrolltimer = setTimeout("query1()", 5000);
}

function query1() {
	clearTimeout(scrolltimer);
	screenresult='password?<br><br><font size=+2>&nbsp;</font>';
	show_stuff();
	screenresult='';
	scrolltimer = setTimeout("query()", 30000);
}

function magiccontents(locat) {
	destination=eval(locat);
	eval('parent.destination.innerHTML = maintext');
}