﻿// JScript 文件
//添加好友
function addfriend()
{
    var userid=document.getElementById ("UserInfo1_hdID").value;
    var url='http://blog.mcuol.com/check.aspx?type=0&userID='+userid;
    var str=createTextHttpRequest(url);
    if(str=='2')
    {
        OpenLogin();
    }
    else if(str=='0')
    {
        _error_msg_show("已经是好友了！");
    }
    else if(str=='1')
    {
    	dialogs = new dialog();
        dialogs.init();
        dialogs.set('width', 200);
        dialogs.set('height', 150);
        dialogs.set('title', '添加好友成功');
     
        var html = "<br /><p>添加好友成功</p>";
        html+="<input type=\"button\" name=\"Button\" onclick=\"window.location.href=location.href;\" value=\"确定\" />&nbsp;&nbsp;&nbsp;";
        dialogs.html(html);
    }
}
function addfriends()
{
    var userid=document.getElementById ("UserID").innerHTML;
    var url='http://blog.mcuol.com/check.aspx?type=0&userID='+userid;
    var str=createTextHttpRequest(url);
    if(str=='2')
    {
        OpenLogin();
    }
    else if(str=='0')
    {
        _error_msg_show("已经是好友了！");
    }
    else if(str=='1')
    {
    	dialogs = new dialog();
        dialogs.init();
        dialogs.set('width', 300);
        dialogs.set('height', 150);
        dialogs.set('title', '添加好友成功');
     
        var html = "<br /><p>添加好友成功</p>";
        html+="<input type=\"button\" name=\"Button\" onclick=\"window.location.href=location.href;\" value=\"确定\" />&nbsp;&nbsp;&nbsp;";
        dialogs.html(html);
    }
}
function Invitefriens(userid)
{
    var url='http://blog.mcuol.com/check.aspx?type=0&userID='+userid;
    var str=createTextHttpRequest(url);
    if(str=='2')
    {
        OpenLogin();
    }
    else if(str=='0')
    {
        _error_msg_show("已经是好友了！");
    }
    else if(str=='1')
    {
    	dialogs = new dialog();
        dialogs.init();
        dialogs.set('width', 300);
        dialogs.set('height', 150);
        dialogs.set('title', '添加好友成功');
     
        var html = "<br /><p>添加好友成功</p>";
        html+="<input type=\"button\" name=\"Button\" onclick=\"window.location.href=location.href;\" value=\"确定\" />&nbsp;&nbsp;&nbsp;";
        dialogs.html(html);
    }
}

