<html>
<head>
<script>
var show=true;
function selectThis(spanObj)
{
highlightThis(spanObj,true);
selectedVal.value = spanObj.innerText;
hideDropDown();
}
function dropDown()
{
if(show)
{
show = !show;
optionList.style.left = selectedVal.offsetLeft;
optionList.style.top = selectedVal.offsetTop + selectedVal.offsetHeight;
optionList.style.width = dropDownButton.offsetLeft - selectedVal.offsetLeft + dropDownButton.offsetWidth;
optionList.style.display = 'inline';
optionList.style.height = '10';
optionList.style.visibility = 'visible';
document.frames["optionListFrame"].setBackground();
}
else
{
hideDropDown();
}
}
function hideDropDown()
{
show = !show;
optionList.style.visibility = 'hidden';
optionList.style.display = 'none';
}
function highlightThis(spanObj, highlight)
{
if(highlight)
{
spanObj.style.backgroundColor = 'blue';
spanObj.style.color = 'white';
}
else
{
spanObj.style.backgroundColor = 'transparent';
spanObj.style.color = 'black';
}
}
function loadIFrame()
{
var d = document.frames["optionListFrame"].document;
d.write("<html>");
d.write("<head>");
d.write("<style>");
d.write(".background{filter:alpha(opacity=30);position:\"absolute\";top=0;left=0;background-image:url(\"STONE.BMP\");z-index:-1;}");
d.write("</style>");
d.write("<script>");
d.write("function setBackground()");
d.write("{");
d.write(" backgroundDiv.style.width = document.body.scrollWidth;");
d.write(" backgroundDiv.style.height = document.body.scrollHeight;");
d.write("}//end setBackground()");
d.write("</scr"+"ipt></head>");
d.write("<body onload='setBackground();'>");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>one</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>two</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>three</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>four</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>five</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>six</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>seven</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>eight</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>nine</span><br />");
d.write("<span onclick='parent.selectThis(this)' onmouseover='parent.highlightThis(this,true)' onmouseout='parent.highlightThis(this,false)'>ten</span><br />");
d.write("<div id='backgroundDiv' class='background'>");
d.write("</div>"); //backgroundDiv
d.write("</body></html>");
d.close();
}
</script>
</head>
<body onload='loadIFrame();'>
<input name='selectedVal' disabled='disabled' type='text' size='30' /><input name='dropDownButton' type='button' value='v' onclick='dropDown()' />
<div id='optionList' style='position:absolute;visibility:hidden;display:none'>
<iframe height='100%' width='100%' id='optionListFrame'>
</iframe>
</div>
</body>
</html>