Function getCookieVal (Offset)
{
VAR IENDSTR = Document.cookie.indexof (";", offset);
IF (IENDSTR == - 1)
IENDSTR = Document.cookie.ley.cookie.ley
Return Unescape (Document.cookie.substring (Offset, IENDSTR));
}
Function getCookie (Name)
{
Var strarg = name "=";
Var IARGLENGTH = strarg.length;
Var iCookielength = Document.cookie.ley;
VAR IIndex = 0;
While (IIndex { VAR KINDEX = IIndex IARGLENGTH; IF (Document.cookie.substring (IIndex, Kindex) == Strarg) Return getCookieVal (Kindex); IINDEX = Document.cookie.Indexof ("", IINDEX) 1; IF (IIndex == 0) Break; } Return NULL; } Function setCookie (Name, Value) { Var strargvalue = setcookie.Arguments; Var IARGLENGTH = setCookie.Arguments.Length Var Expires = (2 VAR path = (3 Var Domain = (4 VAR Secure = (5 Document.cookie = Name "=" escape (value) (expires == null)? ":("; expires = " expires.togmtstring ())) ((PATH == NULL)? "" :( "; PATH =" PATH)) ((Domain == NULL)? "" :( "; domain =" domain) (Secure == True)? "; Secure": ""); } script>