Hi I am new to JS,

I need help in writing the niotification bar similar to this website :


I awrote this code but I am not able to get the exact out put based on the cookie logic and vertical scrolling .,

<script type="text/javascript">
function UpgradeToIE(){
location.href = "http://sp.uk.ask.com/en/docs/about/ieak8/download.shtml";
function UpgradeOptOut(){
//call a10.anim.fadeIn(notification_bar,2)
//update cookie to set the notificationOptOut to yes.

<style type="text/css">
font:Bold 13px Arial;



<c:if test="${elf:isLocaleUK(model.request.locale)}">
<c:if test="${(model.request.parameters.browser.isIE and model.request.browser.version < 8.0)}>
// get cookie values - if not use cookie.getcooke(name) method
<c:set var="notificationCount" value="${model.request.parameters.myJeevesNotificationCount}" />
<c:set var="notificationOptOut" value="${model.request.parameters.myJeevesNotificationOptOut}" />
<c:when test="${empty notificationCount and empty notificationOptOut}">
// set the above two values to cookie(how) with default values of 1 for count and No for optout
<script type="text/javascript> </script>

<c:set var="showMessage" value="Yes" />

<c:if test="${notificationOptOut eq 'No' and notificationCount lt 3}>
//need to increase the notification counter and set it to cookie
<c:set var="showMessage" value="Yes" />

<c:if test="${showMessage eq 'Yes'>
<div id="notification_bar" >
<span> Jeeves has noticed that you are running <fmt:message var="notification_msg" key="message.a10.mystuff.notification_msg"/> </span>
<span ><input type="image" src="C:\Documents and Settings\basireddyk\Desktop\clickHere.gif" onclick="UpgradeToIE()"/> </span>
<span id="notification_close"><input type="image" src="C:\Documents and Settings\basireddyk\Desktop\close.gif" onclick="UpgradeHide()"</span>

Any suggetions pls !!