
function GotoListPage(pageNo,pageTotal,pageCurNo,pfd)
{		 
		if(pageNo=="")	
		{
			alert("页码不能为空！");
			return;
		}

		if(parseInt(pageNo)>parseInt(pageTotal))
		{
			alert("页码必须小于等于总页数！");
			return;
		}

		if(parseInt(pageNo)<=0)
		{
			alert("页码必须大于0！");
			return;
		}

		if(pageNo==pageCurNo)
		{
			//alert("现在已经是当前页，无需跳转！");
			return;
		}
		
		__doPostBack('GoToPage|'+pfd,pageNo);
}

function getDir(obj)
{
		var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoPublish/InfoFolderTree.ascx";
		var reValue = window.showModalDialog(url,dialogArguments,'DialogHeight:400px,DialogWidth:350px;status:no;');
		if(reValue){
			obj.value=reValue[0];
		}
}

function getDirInFrame(obj)
{
		var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoPublish/InfoFolderTree.ascx";
		var reValue = window.showModalDialog(url,window,'DialogHeight:400px,DialogWidth:350px;status:no;');
		if(reValue){
			obj.value=reValue[0];
		}
}

function getDiskDir(obj)
{
		var Disk_System = document.getElementById("Function:Disk_System").value;
		var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoPublish/InfoListDiskPage.ascx&DiskSystem="+Disk_System;
		var reValue = window.showModalDialog(url,dialogArguments,'DialogHeight:480px;DialogWidth:700px;status:no;scroll:no;');
	
		if(reValue){
			obj.value=reValue;
		}
}

function getFileName(obj)
{
			var folder=escape(document.getElementById("Function:InfoPath").value);
			var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoManage/InfoFileList.ascx&infopath="+folder;
			var reValue = window.showModalDialog(url,dialogArguments,'DialogHeight:400px,DialogWidth:350px;status:no;');
			if(reValue)
			{
				obj.value=reValue[0];
			}
}

function Set_PartListIconImage(obj)
{	//showModalDialog
	var img = window.showModalDialog(GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/Sys/FrameWork/Common/Ascx/SelectStyleImage/FileResourcePage.ascx&Mode=ListIcon",window,'dialogwidth=660px; dialogheight=480px; status=no; help=no; scroll=no;');
	if (img) obj.value = img.URL;
}

function Set_PartListNewImage(obj)
{	//showModalDialog
	//var img = window.showModalDialog("<%=GetRootURL()%>/Sys/FrameWork/Common/Ascx/SelectStyleImage/FileResourcePage.ascx&Mode=ListNew",window,'dialogwidth=660px; dialogheight=480px; status=no; help=no; scroll=no;');
	var img = window.showModalDialog(GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/Sys/FrameWork/Common/Ascx/SelectStyleImage/FileResourcePage.ascx&Mode=ListNew",window,'dialogwidth=660px; dialogheight=480px; status=no; help=no; scroll=no;');
	//alert(img.ID+img.URL+img.FileName);
	if (img) obj.value = img.URL;
}

function InfoQueryPathEditor(obj)
{
	GetFrameWindow().SessionPush(obj.value);
	var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoCommon/InfoQueryPathEditor.ascx";
	var reValue = window.showModalDialog(url,dialogArguments,'DialogHeight:450px;DialogWidth:600px;status:no;');
	if(reValue){
		if (reValue == "None") reValue = "";
		obj.value=reValue;
	}
}

function ShowInfoFileJs(fileID,isClickPerson,js)
{
	// 保存点击数	
	var ascxurl = "/OA/PersonalWork/InfoBase/InfoCommon/InfoFileClickCount.ascx&fileID="+fileID+"&isClickPerson="+isClickPerson;
	var d = GetFrameWindow().GetServerData(ascxurl); 

	eval(js);
}



//===========   嵌入HTML部件使用的Html编辑功能
function get_HTMLPART_edit_content()
{
	return unescape(document.getElementById("Function:HtmlContent").value);
}

function EditHtmlContent(obj)
{
	var url = GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx="+GetFrameWindow().GetApplicationPath()+"/OA/PersonalWork/InfoBase/InfoManage/HtmlEditor.ascx&function=get_HTMLPART_edit_content";
	var reValue = window.showModalDialog(url,window,'DialogTop=0;DialogLeft=0;DialogHeight='+window.screen.availHeight+'px;DialogWidth='+window.screen.availWidth+'px;status=no;');
	if(reValue){
		obj.value=escape(reValue);
	}
}

function AppendWebPage(obj)
{	// 追加一个子页面   　　
	var pagename = window.showModalDialog(GetFrameWindow().GetApplicationPath()+"/BasePage.aspx?_Ascx=/Sys/FrameWork/SysModule/WebPage/SelectWebPage.ascx",window,"DialogHeight:450px,DialogWidth:450px;status:no;");
	if (pagename)
	{
		pagename = pagename.split('|')[1];
		if (obj.value != "")
			pagename = "," + pagename;
		obj.value = obj.value + pagename;
	}
}
