//初始化值
if(typeof(ALERT_INPUT)=='undefined')
var ALERT_INPUT="请输入检索词";
if(typeof(ALERT_SECOND_INPUT)=='undefined')
var ALERT_SECOND_INPUT="您未执行过检索，不能完成二次检索！";
if(typeof(IS_ALERT_FULLDATE)=='undefined')
var IS_ALERT_FULLDATE=true;
if(typeof(ALERT_DATE)=='undefined')
var ALERT_DATE="日期输入错误";
//初始值



//拼装TRS检索词
function setTRSSearchword()
{
	var searchword = "";
	
	//searchword=upSearchword(searchword,"authoruserid","and");
	//alert( " title start = " + searchword)
	searchword=upSearchwordOpr1(searchword,"title","and","titleOpr1","titleOpr2");
	//alert( " title end = " + searchword)
	
	searchword=upSearchwordOpr1(searchword,"doccontent","and","doccontentOpr1","doccontentOpr2");
	
	searchword=upSearchwordOpr1(searchword,"keywords","and","keywordsOpr1","keywordsOpr2");
	
	searchword=upSearchwordOpr1(searchword,"memo","and","memoOpr1","memoOpr2");
	
	searchword=upSearchwordOpr1(searchword,"Sys_PicId","and","memoOpr1","memoOpr2");
	
	searchword=upSearchwordOpr1(searchword,"author","and","authorOpr1","authorOpr2");	
	
	//searchword=upPeople(searchword);
	//alert(searchword)
	
	if(trim(searchword)!="")
	    searchword="("+searchword+")";
	
		//在分类里检索
	if ( document.mainform.classid != null)
	{
	    var result=getClassid(null,"ClassIds");
	    
	    //alert(result)
	    
	    if(result!="")
	    {
			if(searchword != "") searchword +=" and ";
			searchword += "classid=" + result;
		}
	}
	
	//alert(" 1 = " + searchword)
	
	//在图片来源里检索
	if ( document.mainform.comefromid != null)
	{
	    var result=getClassid(null, "ComeFromIds");
	    
	    if(result!="")
	    {
			if(searchword != "") searchword +=" and ";
			searchword += "ComeFromId=" + result;
		}
	}
	
	//alert(" 2 = " + searchword)
	
	//得到新闻时间段
	searchword = getCreateTime(searchword);
	searchword = getPubTime(searchword);
	
	//按网站类型
    if(document.mainform.webtype != null)
    {
        var selValue=document.mainform.webtype.options[document.mainform.webtype.selectedIndex].value;
        if(trim(selValue)!="")
        {
            if(searchword != "") searchword +=" and ";
			searchword +="webtype="+selValue;
        }
        
    }

    //按来源 ANN
    if(document.mainform.authoruserid != null)
    {
        var selValue=document.mainform.authoruserid.options[document.mainform.authoruserid.selectedIndex].value;
        if(trim(selValue)!="")
        {
            if(searchword != "") searchword +=" and ";
			searchword +="authoruserid="+selValue;
        }
        
    }
	//设置检索词
	document.mainform.searchword.value = searchword;
	
	if(DEBUG==true)
	alert(searchword);
	
	if(trim(searchword)==""){
	    alert(ALERT_INPUT);
	    return false;
	}
	return true;
}

//得到拍摄时间 新闻时间段
function getCreateTime(searchword)
{
	if ( document.mainform.r1 == null || document.mainform.r1 == "" || document.mainform.r1.checked || document.mainform.r3.checked )				//选择时间	或者		快捷时间段
	{
		var year, tyear;
		year   = document.mainform.dc1.value;
		tyear  = document.mainform.dc2.value;
		
		if ( year!="" && tyear!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "createtime=between['" + year + "','" + tyear + "']";
		} 
		else if( year!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "createtime>='" + year + "'";
		} 
		else if( tyear!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "createtime<='" + tyear + "'";
		}
	} 
	else if ( document.mainform.r2 != null && document.mainform.r2 != "" && document.mainform.r2.checked )	//输入时间
	{
		if ( !isValid() ) return false;
		//得到时间段
		var date,year,month,day,tyear,tmonth,tday;

		year   = document.mainform.start_year.value;
		month  = document.mainform.start_month.value;
		day    = document.mainform.start_day.value;
		tyear  = document.mainform.end_year.value;
		tmonth = document.mainform.end_month.value;
		tday   = document.mainform.end_day.value;
		
		if ( (year != "" || month != "" || day != "") && (tyear != "" || tmonth != "" || tday != "") )
		{
			date = year + "." + month + "." + day;
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "createtime=between['" + date + "','";
			date = tyear + "." + tmonth + "." + tday;
			searchword = searchword + date + "']";
		}
	}
	
	return searchword;
}

//得到发布时间 新闻时间段
function getPubTime(searchword)
{
	if ( document.mainform.Radio1 == null || document.mainform.Radio1 == "" || document.mainform.Radio1.checked || document.mainform.Radio3.checked )				//选择时间	或者		快捷时间段
	{
		var year, tyear;
		year   = document.mainform.pubdc1.value;
		tyear  = document.mainform.pubdc2.value;
		
		if ( year!="" && tyear!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "pubtime=between['" + year + "','" + tyear + "']";
		} 
		else if( year!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "pubtime>='" + year + "'";
		} 
		else if( tyear!="" )
		{
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "pubtime<='" + tyear + "'";
		}
	} 
	else if ( document.mainform.Radio2 != null && document.mainform.Radio2 != "" && document.mainform.Radio2.checked )	//输入时间
	{
		if ( !isValid() ) return false;
		//得到时间段
		var date,year,month,day,tyear,tmonth,tday;

		year   = document.mainform.pub_start_year.value;
		month  = document.mainform.pub_start_month.value;
		day    = document.mainform.pub_start_day.value;
		tyear  = document.mainform.pub_end_year.value;
		tmonth = document.mainform.pub_end_month.value;
		tday   = document.mainform.pub_end_day.value;
		
		if ( (year != "" || month != "" || day != "") && (tyear != "" || tmonth != "" || tday != "") )
		{
			date = year + "." + month + "." + day;
			if(searchword != "") searchword = searchword + " and ";
			searchword = searchword + "pubtime=between['" + date + "','";
			date = tyear + "." + tmonth + "." + tday;
			searchword = searchword + date + "']";
		}
	}
	
	return searchword;
}

function beforSub()
{
	if(validSearch())
	{
	    //document.mainform.submit();
	    return true;
	}else
	return false;
	
}

//执行综合检索(高级检索)
function allSearch()
{
    var obj = document.mainform;
    var searchword="";
    
    if(trim(obj.allsearch.value)==""){
        //alert(ALERT_INPUT);
        return false;
     }
     
     searchword=upSearchword(searchword,"title","or","allsearch");
     searchword=upSearchword(searchword,"doccontent","or","allsearch");
     searchword=upSearchword(searchword,"keywords","or","allsearch");
     //searchword=upSearchword(searchword,"people1","or","allsearch");
     //searchword=upSearchword(searchword,"people2","or","allsearch");
     searchword=upSearchword(searchword,"memo","or","allsearch");
     
//     searchword=upSearchword(searchword,"Sys_PicId","or","allsearch");
     
     searchword=upSearchword(searchword,"ComeFromName","or","allsearch");
     searchword=upSearchword(searchword,"ClassName","or","allsearch");
     
     obj.searchword.value=searchword;
     if(DEBUG==true)
     alert(obj.searchword.value);
     
     obj.submit();
}

//执行 按组图编号 检索(高级检索)  //add by刘亮@20060421
function SearchByGroupId()
{
    var obj = document.mainform;
    var searchword="";
    
    if(trim(obj.gonumber.value)==""){
        //alert(ALERT_INPUT);
        return false;
     }
     
     searchword=upSearchword(searchword,"sys_id","or","gonumber");
     
     obj.searchword.value=searchword;
     if(DEBUG==true)
     alert(obj.searchword.value);
     
     obj.submit();
}
//执行二次检索

function secondSearch(obj)
{
    var form=obj.form;
    var oldsearchword=form.searchword.value;

    var searchword="";
    var selectedValue=form.field.options[form.field.selectedIndex].value;
    
    var inputValue=form.inputValue.value;
    var searchbak = inputValue;
    if(trim(inputValue)=="") 
    {
        alert(ALERT_INPUT);
        return false;
    }
    if(selectedValue=="allsearch")
    {
        searchword=allSearchValue("document.aspnetForm","inputValue");
    }
    else
    {
        searchword=upSearchword(searchword,selectedValue,"or","inputValue","document.aspnetForm");
    }
    
    if(form.second.checked)
    {
    
        if(trim(oldsearchword)=="")
        {
            alert(ALERT_SECOND_INPUT);
        }
        searchword="("+searchword+") and ("+oldsearchword+")";  
    }
    //alert("?searchword=("+searchword+")&inputValue="+inputValue+"&field="+selectedValue+"&second="+form.second.checked+"&bDelete="+(form.bDelete!=null?form.bDelete.value:""))
    if(isNaN(searchbak))
    {
        searchword=searchword.replace("Sys_PicId","title");
    }
    location.href="?searchword=("+searchword+")&inputValue="+inputValue+"&field="+selectedValue+"&second="+form.second.checked+"&bDelete="+(form.bDelete!=null?form.bDelete.value:"");
    
    //form.searchword.value=searchword;
    //form.method="GET";
    //form.submit();
    //document.aspnetForm.submit();
    
}


//校验输入日期是否正确
function isValid()
{		
	//检查新闻时间
	if ( (trim(document.mainform.start_year.value)!="") || (trim(document.mainform.end_year.value)!="") )
	{
		if(checkDate(document.mainform.start_year.value,document.mainform.start_month.value,document.mainform.start_day.value) == false)
		{
			if(IS_ALERT_FULLDATE)
			alert("请您输入合法的起始日期!");
			else
			alert(ALERT_DATE);
			
			return false;
		}
		if(checkDate(document.mainform.end_year.value,document.mainform.end_month.value,document.mainform.end_day.value) == false)
		{
			if(IS_ALERT_FULLDATE)
			alert("请您输入合法的结束日期!");
			else
			alert(ALERT_DATE);
			return false;
		}
	}
	
	return true;
}

//再次校验日期详细资料
function validSearch()
{
	var sSearch = "";
	var sValue = "";


if (document.mainform.DateInputType&&document.mainform.DateInputType[1].checked == true)
{
	var strError=""
	var _now=new Date();

	MessageArray = new Array();
	MessageArray[0] = new Array();
	MessageArray[0][0] = "[起始时间]年份请输入四位数\n";
	MessageArray[0][1] = "[终止时间]年份请输入四位数\n";
	MessageArray[0][2] = "[起始时间]当输入日时，年和月也必须输入\n";
	MessageArray[0][3] = "[终止时间]当输入日时，年和月也必须输入\n";
	MessageArray[0][4] = "[起始时间]当输入月时，年也必须输入\n";
	MessageArray[0][5] = "[终止时间]当输入月时，年也必须输入\n";
	MessageArray[0][6] = "[起始时间]您所选择的日的天数大于所对应的月的最大天数\n";
	MessageArray[0][7] = "[终止时间]您所选择的日的天数大于所对应的月的最大天数\n";
	MessageArray[0][10]= "起始年份输入不可为空\n"
//开始

	strFromYear = document.mainform.start_year.value;
	strFromMonth = document.mainform.start_month.value;
	strFromDay =document.mainform.start_day.value;
	strToYear = document.mainform.end_year.value;
	strToMonth = document.mainform.end_month.value;
	strToDay =document.mainform.end_day.value;

	//判断年份是否合格
	if (strFromYear != "" && strFromYear.length != 4)
	{
		strError += MessageArray[0][0];
	}
	if (strToYear != "" && strToYear.length != 4)
	{
		strError += MessageArray[0][1];
	}

	if(strFromYear=="")
	{
		strError += MessageArray[0][10];
	}
	//月不为空的判断
	if (strFromMonth != "")
	{
		if (strFromYear == "")
		{
			strError += MessageArray[0][4];
		}
		else
		{
			strFromMonth = strFromMonth.length == 1 ? "0" + strFromMonth : strFromMonth;

		}
	}
	else
	{
		strFromMonth="01";
	}
	
	if (strToMonth != "")
	{
		if (strToYear == "")
		{
			strError += MessageArray[0][5];
		}
		else
		{
			strToMonth = strToMonth.length == 1 ? "0" + strToMonth : strToMonth;
		}
	}
	else
	{
		if(strToYear==_now.getYear())
		strToMonth=_now.getMonth()+1;
		else
		strToMonth="12";
	}


	//日不为空时的判断
	if (strFromDay != "")
	{
		if (strFromMonth == "" || strFromYear == "")
		{
			strError += MessageArray[0][2];
		}
		else
		{
			strFromMonth = strFromMonth.length == 1 ? "0" + strFromMonth : strFromMonth;
			strFromDay = strFromDay.length == 1 ? "0" + strFromDay : strFromDay;
			//开始判断起始日期的日是否超出范围
			if ( (parseInt(strFromMonth,10) == 4 || parseInt(strFromMonth,10) == 6 || parseInt(strFromMonth,10) == 9 || parseInt(strFromMonth,10) == 11) && parseInt(strFromDay,10)>=31)
			{
				strError += MessageArray[0][6];
			}
			if (parseInt(strFromMonth,10) == 2)
			{
				if ( (parseInt(strFromYear,10)%4 == 0 && parseInt(strFromYear,10)%100 != 0) || parseInt(strFromYear,10)%400 == 0)
				{
					if (parseInt(strFromDay,10) >= 30)
					{
						strError += MessageArray[0][6];
					}	
				}
				else
				{
					if (parseInt(strFromDay,10) >= 29)
					{
						strError += MessageArray[0][6];
					}	
				}
			}	
			//结束判断起始日期的日是否超出范围
		}
	}
	else
	{
		strFromDay="01";
	}

	if (strToDay != "")
	{
		if (strToMonth == "" || strToYear == "")
		{
			strError += MessageArray[0][3];
		}
		else
		{
			strToMonth = strToMonth.length == 1 ? "0" + strToMonth : strToMonth;
			strToDay = strToDay.length == 1 ? "0" + strToDay : strToDay;
			//开始判断结束日期的日是否超出范围
			if ( (parseInt(strToMonth,10) == 4 || parseInt(strToMonth,10) == 6 || parseInt(strToMonth,10) == 9 || parseInt(strToMonth,10) == 11) && parseInt(strToDay,10)>=31)
			{
				strError += MessageArray[0][7];
			}
			if (parseInt(strToMonth,10) == 2)
			{
				if ( (parseInt(strToYear,10)%4 == 0 && parseInt(strToYear,10)%100 != 0) || parseInt(strToYear,10)%400 == 0)
				{
					if (parseInt(strToDay,10) >= 30)
					{
						strError += MessageArray[0][7];
					}	
				}
				else
				{
					if (parseInt(strToDay,10) >= 29)
					{
						strError += MessageArray[0][7];
					}	
				}
			}	
			//结束判断结束日期的日是否超出范围
		}
	}
	else
	{
		if(strToYear==_now.getYear()&&strToMonth==(_now.getMonth()+1))
		strToDay=_now.getDate();
		else
		{
		
			month=strToMonth;
			year=strToYear;
			switch(parseInt(month,10))
			{
				case 1 :
				case 3 :
				case 5 :
				case 7 :   
				case 8 :
				case 10 :
				case 12 : 
					//if(parseInt(day,10)>31)return false;
					strToDay="31";
				break;
				case 4 :
				case 6 :
				case 9 :
				case 11 : 
					strToDay="30";
				break;
				case 2 :  
					if((parseInt(year,10)%400)==0 || ((parseInt(year,10)%100)!=0 && (parseInt(year,10)%4)==0))
					{
						//if(parseInt(day,10)>29)return false;
						strToDay="29";
					}
					else
					{
						//if(parseInt(day,10)>28)return false;
						strToDay="28";
					}
					break;
				//default:
					//strToDay="31";
			}
		}
	}
	


	if (strError != "")
	{
		if(IS_ALERT_FULLDATE)
		alert(strError);
		else
		alert(ALERT_DATE);
		return false;
	}

	//越界验证

	_currentDate=_now.getYear()+"/"+(_now.getMonth()+1)+"/"+_now.getDate();
	currentDate=Date.parse(_currentDate);

	strDateFrom = strFromYear + "/" + strFromMonth + "/" + strFromDay;
	strDateTo = strToYear + "/" + strToMonth + "/" + strToDay;

    if((Date.parse(strDateFrom)>currentDate)||(Date.parse(strDateTo)>currentDate)||(Date.parse(strDateFrom)>Date.parse(strDateTo)))
	{
		if(IS_ALERT_FULLDATE)
		alert("您所选择或输入的[起始时间]或[终止时间]不合法！\n非法原因:\n[起始时间]为"+strDateFrom+"\n[终止时间]为"+strDateTo)
		else
		alert(ALERT_DATE);
		
		return false;
	}
	
	if(strToYear=="")
	{
		strToYear=_now.getYear();
		strToMonth=_now.getMonth()+1;
		strToDay=_now.getDate();
		//alert(strToYear);
	}

	//验证通过
	document.mainform.start_year.value=strFromYear;
	document.mainform.start_month.value=strFromMonth;
	document.mainform.start_day.value=strFromDay;
	document.mainform.end_year.value=strToYear;
	document.mainform.end_month.value=strToMonth;
	document.mainform.end_day.value=strToDay;

}

if (document.mainform.PubDateInputType&&document.mainform.PubDateInputType[1].checked == true)
{
	var strError=""
	var _now=new Date();

	MessageArray = new Array();
	MessageArray[0] = new Array();
	MessageArray[0][0] = "[起始时间]年份请输入四位数\n";
	MessageArray[0][1] = "[终止时间]年份请输入四位数\n";
	MessageArray[0][2] = "[起始时间]当输入日时，年和月也必须输入\n";
	MessageArray[0][3] = "[终止时间]当输入日时，年和月也必须输入\n";
	MessageArray[0][4] = "[起始时间]当输入月时，年也必须输入\n";
	MessageArray[0][5] = "[终止时间]当输入月时，年也必须输入\n";
	MessageArray[0][6] = "[起始时间]您所选择的日的天数大于所对应的月的最大天数\n";
	MessageArray[0][7] = "[终止时间]您所选择的日的天数大于所对应的月的最大天数\n";
	MessageArray[0][10]= "起始年份输入不可为空\n"
//开始

	strFromYear = document.mainform.pub_start_year.value;
	strFromMonth = document.mainform.pub_start_month.value;
	strFromDay =document.mainform.pub_start_day.value;
	strToYear = document.mainform.pub_end_year.value;
	strToMonth = document.mainform.pub_end_month.value;
	strToDay =document.mainform.pub_end_day.value;

	//判断年份是否合格
	if (strFromYear != "" && strFromYear.length != 4)
	{
		strError += MessageArray[0][0];
	}
	if (strToYear != "" && strToYear.length != 4)
	{
		strError += MessageArray[0][1];
	}

	if(strFromYear=="")
	{
		strError += MessageArray[0][10];
	}
	//月不为空的判断
	if (strFromMonth != "")
	{
		if (strFromYear == "")
		{
			strError += MessageArray[0][4];
		}
		else
		{
			strFromMonth = strFromMonth.length == 1 ? "0" + strFromMonth : strFromMonth;

		}
	}
	else
	{
		strFromMonth="01";
	}
	
	if (strToMonth != "")
	{
		if (strToYear == "")
		{
			strError += MessageArray[0][5];
		}
		else
		{
			strToMonth = strToMonth.length == 1 ? "0" + strToMonth : strToMonth;
		}
	}
	else
	{
		if(strToYear==_now.getYear())
		strToMonth=_now.getMonth()+1;
		else
		strToMonth="12";
	}


	//日不为空时的判断
	if (strFromDay != "")
	{
		if (strFromMonth == "" || strFromYear == "")
		{
			strError += MessageArray[0][2];
		}
		else
		{
			strFromMonth = strFromMonth.length == 1 ? "0" + strFromMonth : strFromMonth;
			strFromDay = strFromDay.length == 1 ? "0" + strFromDay : strFromDay;
			//开始判断起始日期的日是否超出范围
			if ( (parseInt(strFromMonth,10) == 4 || parseInt(strFromMonth,10) == 6 || parseInt(strFromMonth,10) == 9 || parseInt(strFromMonth,10) == 11) && parseInt(strFromDay,10)>=31)
			{
				strError += MessageArray[0][6];
			}
			if (parseInt(strFromMonth,10) == 2)
			{
				if ( (parseInt(strFromYear,10)%4 == 0 && parseInt(strFromYear,10)%100 != 0) || parseInt(strFromYear,10)%400 == 0)
				{
					if (parseInt(strFromDay,10) >= 30)
					{
						strError += MessageArray[0][6];
					}	
				}
				else
				{
					if (parseInt(strFromDay,10) >= 29)
					{
						strError += MessageArray[0][6];
					}	
				}
			}	
			//结束判断起始日期的日是否超出范围
		}
	}
	else
	{
		strFromDay="01";
	}

	if (strToDay != "")
	{
		if (strToMonth == "" || strToYear == "")
		{
			strError += MessageArray[0][3];
		}
		else
		{
			strToMonth = strToMonth.length == 1 ? "0" + strToMonth : strToMonth;
			strToDay = strToDay.length == 1 ? "0" + strToDay : strToDay;
			//开始判断结束日期的日是否超出范围
			if ( (parseInt(strToMonth,10) == 4 || parseInt(strToMonth,10) == 6 || parseInt(strToMonth,10) == 9 || parseInt(strToMonth,10) == 11) && parseInt(strToDay,10)>=31)
			{
				strError += MessageArray[0][7];
			}
			if (parseInt(strToMonth,10) == 2)
			{
				if ( (parseInt(strToYear,10)%4 == 0 && parseInt(strToYear,10)%100 != 0) || parseInt(strToYear,10)%400 == 0)
				{
					if (parseInt(strToDay,10) >= 30)
					{
						strError += MessageArray[0][7];
					}	
				}
				else
				{
					if (parseInt(strToDay,10) >= 29)
					{
						strError += MessageArray[0][7];
					}	
				}
			}	
			//结束判断结束日期的日是否超出范围
		}
	}
	else
	{
		if(strToYear==_now.getYear()&&strToMonth==(_now.getMonth()+1))
		strToDay=_now.getDate();
		else
		{
		
			month=strToMonth;
			year=strToYear;
			switch(parseInt(month,10))
			{
				case 1 :
				case 3 :
				case 5 :
				case 7 :   
				case 8 :
				case 10 :
				case 12 : 
					//if(parseInt(day,10)>31)return false;
					strToDay="31";
				break;
				case 4 :
				case 6 :
				case 9 :
				case 11 : 
					strToDay="30";
				break;
				case 2 :  
					if((parseInt(year,10)%400)==0 || ((parseInt(year,10)%100)!=0 && (parseInt(year,10)%4)==0))
					{
						//if(parseInt(day,10)>29)return false;
						strToDay="29";
					}
					else
					{
						//if(parseInt(day,10)>28)return false;
						strToDay="28";
					}
					break;
				//default:
					//strToDay="31";
			}
		}
	}
	


	if (strError != "")
	{
		if(IS_ALERT_FULLDATE)
		alert(strError);
		else
		alert(ALERT_DATE);
		return false;
	}

	//越界验证

	_currentDate=_now.getYear()+"/"+(_now.getMonth()+1)+"/"+_now.getDate();
	currentDate=Date.parse(_currentDate);

	strDateFrom = strFromYear + "/" + strFromMonth + "/" + strFromDay;
	strDateTo = strToYear + "/" + strToMonth + "/" + strToDay;

    if((Date.parse(strDateFrom)>currentDate)||(Date.parse(strDateTo)>currentDate)||(Date.parse(strDateFrom)>Date.parse(strDateTo)))
	{
		if(IS_ALERT_FULLDATE)
		alert("您所选择或输入的[起始时间]或[终止时间]不合法！\n非法原因:\n[起始时间]为"+strDateFrom+"\n[终止时间]为"+strDateTo)
		else
		alert(ALERT_DATE);
		
		return false;
	}
	
	if(strToYear=="")
	{
		strToYear=_now.getYear();
		strToMonth=_now.getMonth()+1;
		strToDay=_now.getDate();
		//alert(strToYear);
	}

	//验证通过
	document.mainform.pub_start_year.value=strFromYear;
	document.mainform.pub_start_month.value=strFromMonth;
	document.mainform.pub_start_day.value=strFromDay;
	document.mainform.pub_end_year.value=strToYear;
	document.mainform.pub_end_month.value=strToMonth;
	document.mainform.pub_end_day.value=strToDay;

}

	if(!setTRSSearchword()) 
	{
		if(document.mainform.secondsearch != null) document.mainform.secondsearch.value="no";
		return false;
	}

	return true;
}
