
function CreateForm()
{
	SearchCancel();
    var html = "<iframe src=\"/Computer/Include/ProjectCreate.aspx\" width=\"634\" height=\"292\" frameborder=\"no\" scrolling=\"no\" style=\"border-bottom:dotted 1px #CCCCCC;\"></iframe>";
	$("#prj_crt").html(html);

	var hn = $("#blog_st0").outerHeight() + 300;
	$("#blog_st0").animate({height:hn},"slow");
}

function UpdateForm(id)
{
	SearchCancel();
    var html = "<iframe src=\"/Computer/Include/ProjectEdit.aspx?id=" + id + "\" width=\"634\" height=\"292\" border=\"0\" bordercolor=\"#000000\" frameborder=\"no\" scrolling=\"no\" style=\"border-bottom:dotted 1px #CCCCCC;\"></iframe>";
	$("#prj_crt").html(html);

	var hn = $("#blog_st0").outerHeight() + 300;
	$("#blog_st0").animate({height:hn},"slow");
}

function JoinForm(id)
{
	SearchCancel();
    var html = "<iframe src=\"/Computer/Include/ProjectJoin.aspx?id=" + id + "\" width=\"634\" height=\"292\" border=\"0\" bordercolor=\"#000000\" frameborder=\"no\" scrolling=\"no\" style=\"border-bottom:dotted 1px #CCCCCC;\"></iframe>";
	$("#prj_crt").html(html);

	var hn = $("#blog_st0").outerHeight() + 300;
	$("#blog_st0").animate({height:hn},"slow");
}

function InviteForm(id)
{
	SearchCancel();
    var html = "<iframe src=\"/Computer/Include/ProjectInvite.aspx?id=" + id + "\" width=\"634\" height=\"292\" border=\"0\" bordercolor=\"#000000\" frameborder=\"no\" scrolling=\"no\" style=\"border-bottom:dotted 1px #CCCCCC;\"></iframe>";
	$("#prj_crt").html(html);

	var hn = $("#blog_st0").outerHeight() + 300;
	$("#blog_st0").animate({height:hn},"slow");
}

function DeleteForm(id,md5)
{
	if(confirm("确定删除该项目的全部信息？\nDELETE ALL INFORMATIONS OF THIS PROJECT?") == true) 
	{
		window.location = "/Utility/ProjectOpr.aspx?opr=delete&id=" + id + "&md5=" + md5;
	}
}

function SearchProject()
{
	var html = "";
	html += "<table cellpadding=0 cellspacing=0 border=0 style='border-collapse:collapse;'>";
	html += "<tr>";
	html += "<td style=\"padding-right:3px;\"><input type='text' class='normal_text' id='prjname\' name='prjname\' size=30 value=''></td>";
	html += "<td><div class='sbt' onclick='SearchIt()'><img src='/images/right.gif'></div></td>";
	html += "<td><div class='sbt' onclick='SearchCancel()'><img src='/images/error.gif'></div></td>";
	html += "</tr>";
	html += "</table>";

	$("#searchForm").html(html);
	$("#prj_crt").html("");
}

function SearchIt()
{
	if($("#prjname").val().length < 1) { $("#searchPanel").html(""); return; }
	$.get("/Utility/ProjectSearch.aspx", { rnd : Math.random(), words : $("#prjname").val() }, function(result) {
		if(result.length > 0) {
			$("#searchPanel").html(result);
		}
	});
}

function SearchCancel()
{
	$("#searchPanel").html("");
	$("#searchForm").html("");

	var hn = $("#blog_st0").outerHeight() - 290;
	if(hn<560) hn=560;
	$("#blog_st0").animate({height:hn},"slow");
}
