// 得到cookie
function statGetCookie(str) {
	var strCookie = document.cookie;
	var arrCookie = strCookie.split("; ");
	var thevalue = "";
	//遍历cookie数组，处理每个cookie对
	for (var i = 0; i < arrCookie.length; i += 1) {
		var arr = arrCookie[i].split("=");
		//的cookie，并返回它的值
		if (str == arr[0]) {
			thevalue = arr[1];
			break;
		}
	}
	return thevalue;
}
// 设置cookie
function statSetCookie(cookiename, cookievalue, cookieage) {
	if (!cookieage) {
		cookieage = 60 * 60 * 24 * 365;
	}
	var the_date = new Date("December 31, 9999");
	var expiresDate = the_date.toGMTString();
	var tempstr = cookiename + "=" + cookievalue + "; max-age=" + cookieage + ";expires=" + expiresDate;
	document.cookie = tempstr;
}
var the_stat_cookie = statGetCookie("thestatcookie");
if (the_stat_cookie == null || the_stat_cookie.length < 1) {
	statSetCookie("thestatcookie", "tsc" + new Date().getTime());
}
function DSplugIE(plug) {
	DSfind = false;
	document.write("<SCR" + "IPT LANGUAGE=VBScript>\n on error resume next \n DSfind = IsObject(CreateObject(\"" + plug + "\"))</SCR" + "IPT>\n");
	if (DSfind) {
		return "1";
	} else {
		return "0";
	}
}
function DSplugMoz(plug) {
	DSfind = "0";
	if (tabMime.indexOf(plug) != -1) {
		if (navigator.mimeTypes[plug].enabledPlugin != null) {
			DSfind = "1";
		}
	}
	return DSfind;
}
var DSua = navigator.userAgent.toLowerCase();
var DSisMoz = (navigator.appName.indexOf("Netscape") != -1);
var DSisIE = (DSua.indexOf("msie") != -1);
var DSisMac = (DSua.indexOf("mac") != -1);
var DSisWin = ((DSua.indexOf("win") != -1) || (DSua.indexOf("32bit") != -1));
var the_stat_title = document.title;
var the_stat_url = escape(window.location);
var the_stat_browser = navigator.appName + navigator.appVersion;
var the_stat_color = window.screen.colorDepth;
var the_stat_language = (navigator.systemLanguage ? navigator.systemLanguage : navigator.language);
var the_stat_screensize = window.screen.width + "*" + window.screen.height;
var the_stat_pagefrom = escape(document.referrer);
var the_stat_timezone = (new Date()).getTimezoneOffset() / 60;
var the_stat_system = navigator.platform;
var the_stat_java = navigator.javaEnabled() ? 1 : 0;
var the_stat_flash;
if (DSisWin && DSisIE) {
	the_stat_flash = DSplugIE("ShockwaveFlash.ShockwaveFlash.1");
}
if (!DSisWin || DSisMoz) {
	tabMime = "";
	for (var i = 0; i < navigator.mimeTypes.length; i++) {
		tabMime += navigator.mimeTypes[i].type.toLowerCase();
	}
	the_stat_flash = DSplugMoz("application/x-shockwave-flash");
}
var the_stat_request = "/fscn/_dvistat/stat.action?url=" + the_stat_url;
the_stat_request += "&browser=" + the_stat_browser;
//the_stat_request += "&color=" + the_stat_color;
//the_stat_request += "&system=" + the_stat_system;
//the_stat_request += "&language=" + the_stat_language;
//the_stat_request += "&screensize=" + the_stat_screensize;
//the_stat_request += "&pagefrom=" + the_stat_pagefrom;
the_stat_request += "&timezone=" + the_stat_timezone;
//the_stat_request += "&java=" + the_stat_java;
//the_stat_request += "&flash=" + the_stat_flash;
try {
	//the_stat_request += "&author=" + the_stat_author;
}
catch (e) {
}
try {
	//the_stat_request += "&vtype=" + the_stat_vtype;
}
catch (e) {
}
//the_stat_request += "&title=" + the_stat_title;
//alert(the_stat_request);
//window.status = the_stat_request;
document.write("<script src='http://www.50fs.com"+the_stat_request+"'></script>"); 
