﻿function _Qzone(_gamebigUrl, _gameWidth, _gameHeight) {
    var gameUrl = "[flash," + _gameWidth + "," + _gameHeight + "]" + _gamebigUrl + "[/flash]";
    if (window.clipboardData) {
        window.clipboardData.setData("text", gameUrl);
    } else {
        alert("您的浏览器不支持自动复制,\n您要发送的地址为:" + gameUrl);
        return;
    }
    alert("网址已复制好，粘贴发给好朋友一起玩吧^_^");
}


function _Fri() {
    if (window.clipboardData) {
        window.clipboardData.setData("text", location.href);
    } else {
        alert("您的浏览器不支持自动复制,\n您要发送的地址为:" + location.href);
        return;
    }
    alert("网址已复制好，粘贴发给好朋友一起玩吧^_^");
}

function comm_read_cookie(name) {
    var cookieValue = "";
    var search = name + "=";
    if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = document.cookie.indexOf(";", offset);
            if (end == -1) end = document.cookie.length;
            cookieValue = unescape(document.cookie.substring(offset, end))
        }
    }
    return cookieValue;
};
function comm_set_cookie(name, value, expirehours) {
    var expiration = new Date((new Date()).getTime() + expirehours * 3600000);
    document.cookie = name + "=" + value + ";expires=" + expiration.toGMTString() + ";domain=www.dofor.cn;path=/;";
};
if ($("#submitso")) {
    $("#submitso").bind("click", function() {
        if ($("#k").val() == "") {
            $("#k").focus();
            return false;
        }
    });
};
