Tizag.com Webmaster Tutorials - A collection of webmaster tutorials from HTML to PHP.

Wednesday, August 5, 2009

JavaScript Floating Layer

<SCRIPT LANGUAGE="JavaScript">
function showOrHide(value) {
if (value==0) {
if (document.layers)
document.layers["layer3"].visibility='hide';
else
document.all["layer3"].style.visibility='hidden';
}
else if (value==1) {
if (document.layers)
document.layers["layer3"].visibility='show';
else
document.all["layer3"].style.visibility='visible';
}
}
function hidediv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('layer3').style.visibility = 'hidden';
document.getElementById('layer3').style.display = "none";
}
else {
if (document.layers) { // Netscape 4
document.layer3.visibility = 'hidden';
document.getElementById('layer3').style.display = "none";
}
else { // IE 4
document.all.layer3.style.visibility = 'hidden';
document.getElementById('layer3').style.display = "none";
}
}
}
</SCRIPT>

<DIV ID="layer3" style="position:absolute; LEFT:0; TOP:400;
background-color:#cccccc; width:200; height:400;z-index:100">
<table border="0" width="100%">
<tr>
<td><FORM NAME="form1"><INPUT TYPE="button" VALUE="Close Layer" onClick="hidediv();"></FORM></td>
</tr>
<tr>
<td>With the ending of the Spitzer settlement in July 2009 there will be a dramatic reduction of free independent research available to investors like yourself. Although this will not impact the Research Oracle, we believe that freely available independent research is crucial for a healthy market to function. Ask your broker a/e what plans they expect to implement to continue to provide you with independent research. You may wish to read this recent coverage from TIME Magazine for more information.</td>
</tr>
<tr>
<td><iframe src ="http://www.time.com/time/business/article/0,8599,1893519,00.html" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe></td>
</tr>
</table>
</DIV>

No comments: