The way I see it the first thing you need to do is clean your code a bit, what a mess, even if it just is an example (I do hope so... as in your not really using that unformatted mess)
Code:
<html>
<head>
<title>xYz</title>
<link rel="stylesheet" href="infobar.css" type="text/css" />
<script type="text/javascript">
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
var obj = document.layers ? document.layers[szDivID] :
document.getElementById ? document.getElementById(szDivID).style :
document.all[szDivID].style;
obj.visibility = document.layers ? (iState ? "show" : "hide") :
(iState ? "visible" : "hidden");
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="100%">
<div id="infobar">
<a href="http://www.gamesvolcano.com/index.php?params=register/register/">It appears you have not yet registered to gamesvolcano.com. To register please click here...</a>
</div>
</td>
</tr>
</table>
</body>
</html>
And as Adam said, what use is it to write a function that is never called?
The way I see it the easiest thing to do would be to base your script off a cookie. Your site must set a cookie for regged members, so write a script that takes no vars (there isn't a need) and is loaded with window.onload (for instance).
This script should then check if there even is a cookie, if there is read it, if it says the user is registered then remove the info bar, get the div with getElementById('infobar') and then .removeChild and you should be all set.
I don't work with cookies in JS so no idea about that part.
Or you could borrow some knowledge and base anything further on that
__________________
George Bush would never take me alive.
|