function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); } var cookie_name ="ref_cookie"; var my_cookie_value=ReadCookie(cookie_name); //document.write(unescape(my_cookie_value)); if(my_cookie_value ==""){ my_cookie_value=""; }