<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<meta name="Content-Style-Type" content="text/css">
<script type='text/javascript'>
function fadeIn(obj,tO)
{
if (obj.style.filter)
{
if (obj.style.filter == "alpha(opacity=100)")
{
clearTimeout(tO);
}
obj.style.filter = "alpha(opacity="+(parseInt(obj.style.filter.split('=')[1].split(')')[0])+10)+")";
}
else {alert ('Filters not supported');clearTimeout(tO);}
}
function fadeOut(objz)
{
obj = objz;
fTO = setInterval("obj.style.filter = \"alpha(opacity=\"+(parseInt(obj.style.filter.split('=')[1].split(')')[0])-10)+\")\"",75);
setTimeout("clearTimeout(fTO)",1000);
}
function fakeAlert(msg)
{
d = document.getElementById('aDiv');
d.style.display = 'block';
d.style.width = "200px";
d.style.height = "100px";
d.style.top = 10; //position the "alert"
d.style.left = 10; //position the "alert" again
d.getElementsByTagName("TD")[0].firstChild.data = msg;
fadeInt = setInterval("fadeIn(d,fadeInt)",50);
setTimeout("fadeOut(d)",2000);
}
</script>
<style type='text/css'>
#aDiv {
height:0px;
width:0px;
filter:alpha(opacity=0);
opacity:.0;
font-family:tahoma,serif;
font-size:11px;
background-Color:#c0c0c0;
position:absolute;
left:0;
top:0;
z-index:50;
}
</style>
<title>Fading thing</title>
</head>
<body>
<div><button onClick='fakeAlert("Alert!")'>Popup an Alert</button></div>
<div id='aDiv' style="filter:alpha(opacity=0)"><table style="width:100%;height:100%;"><TR><TD valign='middle' align='center' id='msgTd'>he</td></tr></table></div>
</body>
</html>