<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<title></title>
<script language="javascript1.1" type="text/javascript">
<!--
// array containing default tags
var tags = new Array();
tags[0] = "begriff1";
tags[1] = "begatte..";
tags[2] = "beo";
// check input for possible tags
function check(val)
{
val = val.toLowerCase();
// only last tag
if(val.indexOf(" ") > -1)
{
val = val.substr(val.lastIndexOf(" ") + 1);
}
var matchingTags = new Array();
// find matching tags
for(i = 0; i < tags.length; i++)
{
if (tags[i].substr(0, val.length) == val)
{
matchingTags.push(tags[i]);
}
}
if (matchingTags.length > 0)
{
show_list(matchingTags);
}
}
// display list of possible tags
function show_list(matchingTags)
{
var content = '';
for(i = 0; i < matchingTags.length; i++)
{
content += '' + matchingTags[i] + '
';
}
// write matching tags back to HTML doc
document.getElementById('promptdiv').innerHTML = content;
document.getElementById('promptdiv').style.display = "block";
}
// copy tag to input box
function addtag(too)
{
var tagsString = document.getElementById('tags').value;
// remove last entered tag-start
if(tagsString.indexOf(" ") > -1)
{
tagsString = tagsString.substr(0, tagsString.lastIndexOf(" ") + 1);
}
else
{
tagsString = "";
}
// rewrite tags input box
document.getElementById('tags').value = tagsString + too + " ";
document.getElementById('promptdiv').style.display = "none";
// reset focus to input box
document.getElementById('tags').focus();
// for the next tag
check(document.getElementById('tags').value);
}
-->
</script>
<style type="text/css">
#promptdiv {
display:none;
position:absolute;
top:50%;
left:50%;
margin:-250px auto auto -200px;
background-color:#aaa;
width:200px;
height:160px;
padding:5px;
border:2px outset #abc;
}
</style>
</head>
<body onload="javascript:check('');">
<input type="text" id="tags" onKeyUp="javascript:check(this.value);" />
<div id="promptdiv">
</div>
</body>
</html>