
function openUrlWithNewWindow(url)
{
	window.open(escape(url));
}
function openUrlWithOldWindow(url)
{

	window.location=url;
}

function openDDoc(vtitle,img,text)
{
	var win;
	win=window.open("","","location=no,scrollbars=yes");
	win.document.write("<html><title>"+vtitle+"</title>");
	win.document.write("<body><p align=center style='font-size:24'><b><font color=#05006C>"+vtitle+"</font></b></p>");
	win.document.write("<p align=center><table width=750><tr><td align=center><img src='"+img+"'></td></tr>");
	win.document.write("<tr><td height=10></td></tr><tr><td>"+text+"</td></tr></table></p></body></html>");
}
function openUrlWithFrame(url)
{

	top.main.location=url;

}
function inquirySubmit(object)
{
	var i;
	var urle;
	var str;
	str="";

	urle=location.pathname+"?WP=P1X2&PARA=[[IIID:" + object.IIID.value +"][ISIS:"

	for(i=0;i<object.elements.length;i++)
	{
		if(object.elements[i].checked==true)
		{
			str=str + "," + object.elements[i].value;
		}
	}
	str=str.replace(",","",1);

	urle=urle+str+"]]"
	window.open(urle,"","resizable=yes,width=520,height=300");
}
function inquiryView(object)
{
	var urle;
	urle=location.pathname+"?WP=P1X2&PARA=[[IIID:" + object.IIID.value +"]]"
	window.open(urle,"","resizable=yes,width=520,height=300");
}
function SearchTitle()
{
	var urle;
	if (Keyword.value.length==0){alert("请输入关键字!");return;}
	urle=location.pathname+"?WP=P121&PARA=[[IKW:"+ escape(Keyword.value)+"]";
	if(select.value!=0)
		urle=urle+"[ICIDS:"+select.value+"]";
	urle=urle+"]";
	window.open(urle);
}
function AdvanceSearch(obj)
{

	var i;
	var j;
	var str;
	var str1;

	var urle;
	if (Keyword.value.length==0){alert("请输入关键字!");return;}
	if(obj.name=="oldsearch")
	{

		str=location.href;
		alert(str);
        i=str.indexOf("[IKW:");
        alert(i);
		str1=str.substring(i+1);
		alert(str1);
		j=str1.indexOf("]");
		urle=str.substring(0,i)+str1.substring(0,j-1)+","+ escape(Keyword.value)+str1.substring(j);

	}

	else if(obj.name=="newsearch")
	{
		urle=location.pathname+"?WP=P121&PARA=[[IKW:"+escape(Keyword.value)+"]";
		if(select.value!=0)
			urle=urle+"[ICIDS:"+select.value+"]";
		urle=urle+"]";
	}
	else
	{
		urle=location.pathname+"?WP=P121&PARA=[[IFS:1][IKW:"+escape(Keyword.value)+"]";
		if(select.value!=0)
			urle=urle+"[ICIDS:"+select.value+"]";
		urle=urle+"]";
	}
	window.location=urle;
}


function GotoPage()
{
	var url1;
	if (PageDown.value.length==0){alert("请输入数字！");return;}
	if (isNaN(PageDown.value)==true){alert("请输入数字！");return;}
	url1=SysAsp.value+"?MN="+SysmnID.value+"&amp;WP="+SysWP.value+"&PARA=[[Page:"+PageDown.value+"]]"
	window.location=url1;
}
function UpDownPage(p,page)
{	//121,122

	if (p==121)
	{
		var urle;
		if(page.length==0) {alert("请输入页数!");return;}
		if(isNaN(page)) {alert("页数应该是数字!");return;}
		urle=SysAsp.value+"?WP=P121&PARA=["
		if(oldICIDS.value.length!=0)
			urle=urle+"[ICIDS:"+oldICIDS.value+"]";


		if(oldIFS.value==1)
			urle=urle+"[IFS:1]";
		urle=urle+"[IKW:"+oldIKW.value+"]";
		urle=urle+"[Page:"+page+"]]";
		window.location=urle;
	}
}

function RealNameReg(mUrl,isRName)
{
	if (isRName=='True')
		//window.location=mUrl;
		window.open(mUrl);
	else
	{
		alert("请以实名用户登录！");
		userLogon();
	}
}

function Awoke()
{
    var strobj1=new String(document.topic.TPTitle.value);
    var T=document.topic.TPTitle.value;
    var D=document.topic.TPDoc.value;
    var i;
    var j;
    var isnull=0;
    i=0
    j=0
    alert("请输入论题标题！");
    while (i<=strobj1.length-1)
      {
        i++;
        if ((strobj1.charCodeAt(i-1))!=32)
          {
             isnull=1;
             break;
          }
      }
    if (isnull!=1)
      	{
      	alert("请输入论题标题！");
      	isnull=1;
      	document.topic.TPTitle.focus()
        return(false)
        }
    else
        {
        if (d="")
        {
          alert("请输入论题正文！");
          document.topic.TPDoc.focus()
          return(false)
        }
        else
          {
            if ((strobj1.length)>50)
             {
              alert("标题文字不能超过五十个字！");
              return(false)
             }
            else
              return(true)
           }
        }
}

function IAwoke()
{
    var strobj2=new String(document.issue.ISTitle.value);
    var T=document.issue.ISTitle.value;
    var D=document.issue.ISDoc.value;
    var i;
    var isnull=0;
    i=0
    j=0
    while (i<=strobj2.length-1)
      {
        i++;
        if ((strobj2.charCodeAt(i-1))!=32)
          {
             isnull=1;
             break;
          }
      }
    if (isnull!=1)
      	{
      	alert("请输入论点标题！");
      	document.issue.ISTitle.focus()
        return(false)
        }
    else
        {
        if (D=="")
        {
          alert("请输入论点正文！");
          document.issue.ISDoc.focus()
          return(false)
        }
        else
          {
            if ((strobj2.length)>50)
             {
              alert("标题文字不能超过五十个字！");
              return(false)
             }
            else
              return(true)
           }
        }
}

function Getfocus()
{
      	alert("请输入论点正文！");
      	document.topic.TPTitle.focus()
}



function getdir()
{		//170
  		var eurl;
  			eurl=gzap.SysAsp.value + "?WP=P1706&PARA=[[WeekNo:" + gzap.week.value + "][WDepID:" + gzap.department.value + "]]";
  		window.location=eurl;
}

function getdir1()
{		//1701
  		var eurl;
  			eurl=gzap.SysAsp.value + "?WP=P1701&PARA=[[WeekNo:" + gzap.week.value + "]]";
  		window.location=eurl;
}

function getdir2()
{		//1702
  		var eurl;
  			eurl=gzap.SysAsp.value + "?WP=P1702";
  		window.open(eurl);
}

function getdir3(a,b)
{		//160
  		var eurl;
  			eurl=gzap.SysAsp.value + "?WP="+a+"&PARA=[[ID:"+ b.name +"]]";
  		window.open(eurl);
}

function getdir4(a,b)
{		//160
  		var eurl;
  			eurl=gzap.SysAsp.value + "?WP="+a+"&PARA=[[ID:"+ b.name +"]]";
  		window.open(eurl);
}





