﻿// JScript 文件


//function setCookie(c_name,value,expiredays)
//{
//var exdate=new Date()
//exdate.setDate(exdate.getDate()+expiredays)
//document.cookie=c_name+ "=" +escape(value)+
//((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
//}

function setCookie(sName, sValue) 
{ 
   document.cookie = sName + "=" + escape(sValue) + ";domain=wistrategy.com;path=/ ;"; 
} 

function getCookieVal (offset) {
var endstr = document.cookie.indexOf(";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}

function DelCookie(sName) 
{ 
   sValue = GetCookie(sName);
   document.cookie = sName + "=" + escape(sValue) + ";path=/; domain=wistrategy.com;expires=Fri, 31 Dec 1900 23:59:59 GMT;"; 
}

//function delCookie(name,path){
//    var name = escape(name);
//    var expires = new Date(0);
//     path = path == "" ? "" : ";path=" + path;
//     document.cookie = name + "="+ ";expires=" + expires.toGMTString() + path;
//}







