Various errors:
(1) var bc = "'bc'"
No. Just
var bc = "bc";
But you shouldn't use an ID on the <BODY> tag in any case.
(2) You are doing
document.write(pgcursor())
*before* the <BODY> tag! When you do document.write before the <BODY>, the results can be unexpected. Most often, you will find that *effectively* you have moved the <BODY> tag to the point of the write.
(3) Why not just use alert( ) to find out the value for debugging purposes?
(4) You can't change the entire style of an element as you are trying to do. You can only change one characteristic of the style at a time.
(5) Your initial style for the body's cursor is illegal, since you specified a url but then omitted any actual url.
So:
Code:
<script type="text/javascript" src="cookie.js"></script>
<script type="text/javascript">
function pgcursor() {
cursor=getCookie('cursor');
if (cursor!=null && cursor!="")
{
alert("Value of cursor is ::" + cursor + "::");
// document.body.style.cursor="url("+cursor+ ")";
}
}
</script>
<body>
...