<html>
<head>
<title>frameset keyreader | Egel 070614</title>
<script type="text/javascript">
<!-- Egel 070614 ;)
var destination = 1;
var keywords = new Array('home','informatie','contact');
var pages = new Array('home.html','information.html','contact.html');
function keyreader0(e) {
check(e ? e.which : frames[0].event.keyCode);
};
function init0() {
frames[0].document.onkeydown = parent.keyreader0;
};
function keyreader1(e) {
check(e ? e.which : frames[1].event.keyCode);
};
function init1() {
frames[1].document.onkeydown = parent.keyreader1;
};
var typeString = '';
function check(nr) {
typeString = typeString.substring(typeString.length - 23) + String.fromCharCode(nr).toLowerCase();
for (var i = 0; i < keywords.length; i++) {
if (typeString.indexOf(keywords[i]) > -1) {
alert(keywords[i]); // test
// frames[destination].location.href = pages[i];
typeString = '';
};
};
};
// -->
</script>
</head>
<frameset cols="200,*">
<frame src="menu.html" onload="parent.init0()">
<frame src="home.html" onload="parent.init1()">
</frameset>
</html>