I am kind of new to java so please bear with me. Here is what I am trying to do. I am trying to get the value of a cookie that the customer has already set. Lets say the value of the cookie is already 83. cookie name is caryear and the value is 83 Now, when my the page loads I need to get the value of the cookie to check to see if it's 83 or another value. Then if the value is = 83 then display image83 else display no image. I am not finding/understanding the codes that I have found so far and nothing has worked. I am sure this code is way wrong but this is basically what I want to happen. I am sure the function is totally wrong, but I just don't get it.(I am really not stupid, just javascript stupid) <head><script> function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); }</script></head> <body onload="<script>if (caryear == 83) { I want to put html code in here, like, <img src="image.jpg"> }else { I don't want anything to happen now}</script>">