﻿ff5=navigator.appName=='Netscape'?true:false;ns4=document.layers?true:false;ie4=document.all?true:false;var Dhid=true;var DName="divpop";function div_init(){Dhid=true;DName="divpop";document.writeln("<div id='"+DName+"' style='display: none;'>test</div>");DivObj=document.getElementById(DName);DivObj.xpos=DivObj.left;DivObj.ypos=DivObj.top}function DivClick(e,showcontent){SetDivLocal(e);SetShowDataSingle(showcontent);Dhid=false}function SetDivLocal(e){if(ns4||ff5){var x=e.layerX;var y=e.pageY}if(ie4){var x=event.x;var y=event.y}if(Dhid){DivObj.xpos=x;DivObj.ypos=y;if(ff5){DivObj.style.display="block";DivObj.style.left=DivObj.xpos+"px";DivObj.style.top=DivObj.ypos+"px"}if(ie4){DivObj.style.display="block";DivObj.style.pixelLeft=DivObj.xpos;DivObj.style.pixelTop=DivObj.ypos}return false}}function SetShowDataSingle(showcontent){document.getElementById(DName).innerHTML=showcontent;document.getElementById(DName).style.display="block"}function SetShowDataSingleDisplay(){var obj=document.getElementById("divpop");if(obj!=null){if(Dhid){document.getElementById("divpop").style.display="none"}Dhid=true}}document.onclick=SetShowDataSingleDisplay;function UpdateTimu(type,optype,oid){var oplanguage="确定要进行此操作吗？";if(type=="1"){oplanguage="确定要引用此题？"}if(window.confirm(oplanguage)){jQuery.ajax({type:"GET",url:"/Ajax/SpaceAdmin.aspx",data:"action="+type+"&optype="+optype+"&oid="+oid,cache:false,success:function(msg){if(msg=="succ"){if(type=="0"){var FBType="";if(optype=="0"||optype=="1"){FBType="test"}else if(optype=="2"){FBType="Debate"}else if(optype=="3"){FBType="qac"}else if(optype=="4"){FBType="vote"}else if(optype=="5"){FBType="exchange"}alert("发布成功！");window.location.href="/usermanage/fabu.aspx?FBType="+FBType+"&FBId="+oid}else if(type=="1"){window.location.href="/usermanage/back_index.aspx"}else{alert("操作成功！");window.location.reload()}}else{if(msg=="NoPermission"){alert("您无权进行此操作，请联系我们！");window.location.href="/contact.html"}else{alert("操作失败！")}}}})}}














ff5 = navigator.appName == 'Netscape' ? true: false;
ns4 = document.layers ? true: false;
ie4 = document.all ? true: false;
var Dhid = true;
var DName = "divpop";
function div_init() {
    Dhid = true;
    DName = "divpop";
    document.writeln("<div id='" + DName + "' style='display: none;'>test</div>");
    DivObj = document.getElementById(DName);
    DivObj.xpos = DivObj.left;
    DivObj.ypos = DivObj.top
}
function DivClick(e, showcontent) {
    SetDivLocal(e);
    SetShowDataSingle(showcontent);
    Dhid = false
}
function SetDivLocal(e) {
    if (ns4 || ff5) {
        var x = e.layerX;
        var y = e.pageY
    }
    if (ie4) {
        var x = event.x;
        var y = event.y
    }
    if (Dhid) {
        DivObj.xpos = x;
        DivObj.ypos = y;
        if (ff5) {
            DivObj.style.display = "block";
            DivObj.style.left = DivObj.xpos + "px";
            DivObj.style.top = DivObj.ypos + "px"
        }
        if (ie4) {
            DivObj.style.display = "block";
            DivObj.style.pixelLeft = DivObj.xpos;
            DivObj.style.pixelTop = DivObj.ypos
        }
        return false
    }
}
function SetShowDataSingle(showcontent) {
    document.getElementById(DName).innerHTML = showcontent;
    document.getElementById(DName).style.display = "block"
}
function SetShowDataSingleDisplay() {
    var obj = document.getElementById("divpop");
    if (obj != null) {
        if (Dhid) {
            document.getElementById("divpop").style.display = "none"
        }
        Dhid = true
    }
}
document.onclick = SetShowDataSingleDisplay;
function UpdateTimu(type, optype, oid) {
    var oplanguage = "确定要进行此操作吗？";
    if (type == "1") {
        oplanguage = "确定要引用此题？"
    }
    if (window.confirm(oplanguage)) {
        jQuery.ajax({
            type: "GET",
            url: "/Ajax/SpaceAdmin.aspx",
            data: "action=" + type + "&optype=" + optype + "&oid=" + oid,
            cache: false,
            success: function(msg) {
                if (msg == "succ") {
                    if (type == "0") {
                        var FBType = "";
                        if (optype == "0" || optype == "1") {
                            FBType = "test"
                        } else if (optype == "2") {
                            FBType = "Debate"
                        } else if (optype == "3") {
                            FBType = "qac"
                        } else if (optype == "4") {
                            FBType = "vote"
                        } else if (optype == "5") {
                            FBType = "exchange"
                        }
                        alert("发布成功！");
                        window.location.href = "/usermanage/fabu.aspx?FBType=" + FBType + "&FBId=" + oid
                    } 
                    else if (type == "1") {
                        window.location.href = "/usermanage/back_index.aspx"
                    } 
                    else {
                        alert("操作成功！");
                        window.location.reload()
                    }
                } else {
                    if (msg == "NoPermission") {
                        alert("您无权进行此操作，请联系我们！");
                        window.location.href = "/contact.html"
                    } else {
                        alert("操作失败！")
                    }
                }
            }
        })
    }
}
