﻿
function addps(gid)
{
	
		openWindow('./addsp.aspx?gid='+gid, 350, 200, '创建群相册专辑');
	
}
function updatepurview(id)
{
	    var height = document.body.clientHeight;
        var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
        document.getElementById("hdiv").style.height = hh;
		openWindow('./Updatepurview.aspx?id='+id, 350, 200, '修改权限');
	
}
function zhuantie(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;	
    openWindow('./Zhuantie.aspx?id='+id, 340,270, '转帖');
	
}
function deldiary(id)
{
        var height = document.body.clientHeight;
        var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
        document.getElementById("hdiv").style.height = hh;
        openWindow('./Del.aspx?id='+id, 300,150, '删除');
}
function deldrafts(draftsid)
{
        var height = document.body.clientHeight;
        var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
        document.getElementById("hdiv").style.height = hh;
        openWindow('./Del.aspx?draftsid='+draftsid, 300,150, '删除');
}
function deltype(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./DelType.aspx?id='+id, 300,150, '删除');
}
function delcollectiontype(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    
    openWindow('./DelCollectionType.aspx?id='+id, 300,150, '删除');
   
}
function delaccount(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./Del.aspx?id='+id, 300,150, '删除');
}
function delaccounttype(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./DelType.aspx?id='+id, 300,150, '删除');
}
function delrotatecard(id)
{
     var height = document.body.clientHeight;
     var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
     document.getElementById("hdiv").style.height = hh;
     openWindow('./Del.aspx?id='+id, 300,150, '删除');
}
function updaterotate(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./UpdatePid.aspx?id='+id,300,180,"修改权限");
}
function send(id)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./Send.aspx?id='+id,410,350,"转帖");
}
function mgs(mgsStr)
{
    var height = document.body.clientHeight;
    var hh = document.body.clientHeight > (window.screen.availHeight - 125 ) ? "0px" : parseInt(window.screen.availHeight - document.body.clientHeight - 125)+"px";
    document.getElementById("hdiv").style.height = hh;
    openWindow('./Mgs.aspx?mgsStr='+mgsStr, 300,150, '删除');
}
function af_addverify_do(v_touid , v_content, v_rcode, v_code, v_usercode, v_email)
{
	if(v_content.length == 0)
	{
		alert("请输好友附加消息!");
		return false;
	}
	if (v_rcode != undefined && v_rcode.length > 0 && v_code.length == 0)
	{
		alert("请输入验证码!");
		return false;
	}
	document.addverifyform.touid.value = v_touid;
	document.addverifyform.content.value = v_content;
	document.addverifyform.rcode.value = v_rcode;
	document.addverifyform.code.value = v_code;
	document.addverifyform.usercode.value = v_usercode;
	document.addverifyform.email.value = v_email;
	document.addverifyform.submit();
}


function af_delfriend(v_uid, v_start, v_privacy)
{
	var title = "删除好友";
	if (v_privacy != undefined && v_privacy == 2)
	{
		title = "断开粉丝";
	}
	openWindow('/friend/del_dialog.aspx?touid='+v_uid+'&start='+v_start, 440, 180, title);
}

function af_delfriend_do(v_uid, v_start)
{
	document.delfriendform.touid.value = v_uid;
	document.delfriendform.start.value = v_start;
	document.delfriendform.ref.value = window.location;
	document.delfriendform.submit();
}

function af_addform(uri)
{
	document.write('<div>');
	document.write('<form name=addverifyform action="/friend/addverify.aspx" method=post>');
	document.write('<input type=hidden name=from value="'+uri+'">');
	document.write('<input type=hidden name=touid value="">');
	document.write('<input type=hidden name=content value="">');
	document.write('<input type=hidden name=rcode value="">');
	document.write('<input type=hidden name=code value="">');
	document.write('<input type=hidden name=usercode value="">');
	document.write('<input type=hidden name=email value="">');
	document.write('<input type=hidden name=bidirection value="">');
	document.write('</form>');
	document.write('</div>');
}
function af_editFriend(v_fuid)
{
	openWindow('../friends/fri_att.aspx?fuid='+v_fuid, 400, 320, '创建群相册专辑');
}
