function acceptOK(responseXML)
{
    var result = getResult(responseXML);
    if(result=='DONE')
    {
        alert('采纳成功！');
        if(navigator.userAgent.indexOf("MSIE")!=-1)
        {
            document.execCommand("Refresh");
        }
        else
        {
            location.reload();
        }
    }
    else
    {
        alert('采纳失败！');
    }
}

function attentionOK(responseXML)
{
    var result = getResult(responseXML);
    if(result=='DONE')
    {
        alert('开始关注！');
        if(navigator.userAgent.indexOf("MSIE")!=-1)
        {
            document.execCommand("Refresh");
        }
        else
        {
            location.reload();
        }
    }
    else if(result=='REPEAT')
    {
        alert('已经在关注了…');
    }
    else if(result=='LOGIN')
    {
        alert('请先登录…');
    }
    else if(result=='OWNER')
    {
        alert('不能关注自己或相同IP的问题…');
    }
    else
    {
        alert('关注失败！');
    }
}

function voteOK(responseXML)
{
    var result = getResult(responseXML);
    if(result=='DONE')
    {
        alert('投票成功！相同IP记为一次');
        if(navigator.userAgent.indexOf("MSIE")!=-1)
        {
            document.execCommand("Refresh");
        }
        else
        {
            location.reload();
        }
    }
    else if(result=='REPEAT')
    {
        alert('相同IP已经投过票了…');
    }
    else if(result=='LOGIN')
    {
        alert('请先登录…');    
    }
    else
    {
        alert('投票失败！');
    }
}

function contentFrameOp(id,type)
{
    if(type=='mouseover')
    {
        document.getElementById('moreOp'+id).style.display='';
        document.getElementById('frame'+id).style.backgroundColor='#d7e3f7';
    }
    else
    {
        document.getElementById('moreOp'+id).style.display='none';
        document.getElementById('frame'+id).style.backgroundColor='white';
    }
}

function inputCheck(name,obj,form,length)
{
    if(document.getElementById(name).value!='')
    {
        if(document.getElementById(name).value.length>length)
        {
            document.getElementById('errorMsg').innerHTML = '输入了'+document.getElementById(name).value.length+'个字符，超过'+length+'了…';
            return false;
        }
        obj.disabled=true;
        form.submit();
    }
    return false;
}

