<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]" >
<head>
<title>BehaviorOnChangeEvent</title>
<style type="text/css">
Div#AlertBar{
font-family:Tahoma;
direction: rtl;
border-top-style: ridge;
border-right-style: ridge;
border-left-style: ridge;
background-color: white;
border-bottom-style: ridge;
}
</style>
<script type="text/javascript">
function CheckForCurrentUser()
{
var UserIsGuest;
// Check cookie, if is a valid cookie return UserIsGuest=false,else return UserIsGuest=true;
document.getElementById("AlertBar").style.visibility=(UserIsGuest?"visible":"hidden");
}
CheckForCurrentUser();
function AlertBarAction(MouseEvent)
{
if(MouseEvent=='Click'){
window.location.href="Login.php";
}
else if(MouseEvent=='Over'){
document.getElementById("AlertBar").style.backgroundColor="yellow";
}
else if(MouseEvent=='Out'){
document.getElementById("AlertBar").style.backgroundColor="white";
}
else{
window.status="Error Occured";
}
}
</script>
</head>
<body>
<div id="AlertBar" style="" align="center" onclick="AlertBarAction('Click')" onmouseover="AlertBarAction('Over')" onmouseout="AlertBarAction('Out')">
<img src="[URL]http://forum.majidonline.com/majidonline/buttons/quickreply.gif[/URL]" />
<span>شما عضو نیستید، جهت عضویت کلیک کنید</span>
</div>
</body>
</html>