// JavaScript Document

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. 
{ 
    var arVersion = navigator.appVersion.split("MSIE") 
    var version = parseFloat(arVersion[1]) 
    if ((version >= 5.5) && (document.body.filters)) 
    { 
       for(var j=0; j<document.images.length; j++) 
       { 
          var img = document.images[j] 
          var imgName = img.src.toUpperCase() 
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
          { 
             var imgID = (img.id) ? "id='" + img.id + "' " : "" 
             var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
             var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
             var imgStyle = "display:inline-block;" + img.style.cssText 
             if (img.align == "left") imgStyle = "float:left;" + imgStyle 
             if (img.align == "right") imgStyle = "float:right;" + imgStyle 
             if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
             var strNewHTML = "<span " + imgID + imgClass + imgTitle 
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
             img.outerHTML = strNewHTML 
             j = j-1 
          } 
       } 
    }     
} 
window.attachEvent("onload", correctPNG);


function SetCookieValue(name, value) {
    var expdate = new Date();
    var argv = SetCookieValue.arguments;
    var argc = SetCookieValue.arguments.length;
    var expires = new Date();
    var path = (argc > 3) ? argv[3] : null;
    //var domain = (argc > 4) ? argv[4] : null;
    var domain ;//= "fszbol.com";
    var secure = (argc > 5) ? argv[5] : false;
    expdate.setTime(expdate.getTime() + (3 * 24 * 60 * 60 * 1000));

    document.cookie = name + "=" + escape(value) + "; expires=" + expdate.toGMTString()
+ ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain))
+ ((secure == true) ? "; secure" : "");
}
function setCookie() {
    var hre = window.top.location.href;
    var query = window.top.location.search.substring(1); //获取查询串
    var pairs = query.split("&"); //在逗号处断开
    var args = new Object();
    for (var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('='); //查找name=value 
        if (pos == -1) continue; //如果没有找到就跳过 
        var argname = pairs[i].substring(0, pos); //提取name 
        var value = pairs[i].substring(pos + 1); //提取value
        args[argname] = unescape(value); //存为属性
        //document.cookie = argname + "=" + escape(value);
        SetCookieValue(argname, value);
    }
    SetCookieValue("furl", hre);
    //document.cookie = "furl=" + hre;
    
}
//document.domain = "fszbol.com";
//setCookie();

window.attachEvent("onload", setCookie);
