function ReadCookie(cookieName)
{
var theCookie = "" + document.cookie;
var
if (
return "";
var ind1 = theCookie.indexOf(';',
if (ind1 == -1)
ind1 = theCookie.length;
var val = unescape(theCookie.substring(
val = ReplaceAll(val, cookieName + "=" , "");
val = ReplaceAll(val, ";" , "");
return val;
}
function ReplaceAll(str, pcFrom, pcTo)
{
var i = str.indexOf(pcFrom);
var c = str;
while (i > -1)
{
c = c.replace(pcFrom, pcTo);
i = c.indexOf(pcFrom);
}
return c;
}
No comments:
Post a Comment