
function changeto(obj)
{
	var innerObj = document.all("innerInput");
	var innerObj1 = document.all("innerInput1");
	innerObj.innerHTML="";
	innerObj1.innerHTML="";	
	switch (obj.value.toUpperCase())
	{
	/*case "NEWSCLASS":
		innerObj.innerHTML="<input name='qvalue' type='text'  class='search_input_style' size='10' onchange='tmp_data(this.value)' onmouseup ='tmp_data(this.value)' onkeyup ='tmp_data(this.value)'>";
		innerObj1.innerHTML="";
		document.all("qtype_tmp").value = obj.value.toUpperCase() ;		
	break;*/
	case "ALL":
		//innerObj.innerHTML="<input name='qvalue' type='text'  class='search_input_style' size='10' onchange='tmp_data(this.value)' onmouseup ='tmp_data(this.value)' onkeyup ='tmp_data(this.value)' value='請輸入關鍵字'>";
		//innerObj1.innerHTML="";
		document.all("qtype_tmp").value = "ALL" ;		
	break;	
	case "TITLE":
		innerObj.innerHTML="<input name='qvalue' type='text'  class='search_input_style' size='20' onchange='tmp_data(this.value)' onmouseup ='tmp_data(this.value)' onkeyup ='tmp_data(this.value)' value='請輸入關鍵字'>";
		innerObj1.innerHTML="";
		document.all("qtype_tmp").value = obj.value.toUpperCase() ;		
	break;	
	case "CONTENT":
		innerObj.innerHTML="<input name='qvalue' type='text'  class='search_input_style' size='20' onchange='tmp_data(this.value)' onmouseup ='tmp_data(this.value)' onkeyup ='tmp_data(this.value)' value='請輸入關鍵字'>";
		innerObj1.innerHTML="";
		document.all("qtype_tmp").value = obj.value.toUpperCase() ;		
	break;
	
	case "NEWSCLASS":
       		innerObj.innerHTML="<select name='qvalue' class='search_select_style' onchange='tmp_data(this.value)'></select>";
		document.all("qvalue").length = document.all("temp1").length;
		for(var i = 0 ; i < document.all("temp1").length ; i++)
		{
			document.all("qvalue").options[i].value = document.all("temp1").options[i].value;
			document.all("qvalue").options[i].text = document.all("temp1").options[i].text;
		}
		document.all("qvalue_tmp").value = document.all("qvalue").options[0].value ;
		document.all("qtype_tmp").value = document.all("qtype").value ;	
	break;	
	/*case "START_TIME":	
	case "END_TIME":	
		document.all("qtype_tmp").value = obj.value.toUpperCase() ;		
		var dd = new Date(); //預設今天日期
		var Deal_S = new DateSerial("innerInput","S_Yr","S_Ym","S_Yd");
		Deal_S.setYearPeriod(dd.getFullYear()-5,dd.getFullYear()+5);
		Deal_S.writeHTML();
		document.all("S_Yr").value = dd.getFullYear(); //預設此年度
		document.all("S_Yr").onchange();
		document.all("S_Ym").value = dd.getMonth()+1; //預設此月份
		document.all("S_Ym").onchange();	
		document.all("S_Yd").value = dd.getDate(); //預設此日期		   
		innerObj.innerHTML += " 至 ";
		var Deal_E = new DateSerial("innerInput1","E_Yr","E_Ym","E_Yd");
		Deal_E.setYearPeriod(dd.getFullYear()-5,dd.getFullYear()+5);
		Deal_E.writeHTML();
		document.all("E_Yr").value = dd.getFullYear(); //預設此年度
		document.all("E_Yr").onchange();
		document.all("E_Ym").value = dd.getMonth()+1; //預設此月份
		document.all("E_Ym").onchange();	
		document.all("E_Yd").value = dd.getDate(); //預設此日期		   
		   //當點選日期的改變
		   document.all("S_Yr").onchange = Function("setDateVal(0,0,'S_Yr','S_Ym','S_Yd');tmp_data();");
	   	   document.all("S_Ym").onchange = Function("setDateVal(0,0,'S_Yr','S_Ym','S_Yd');tmp_data();");
		   document.all("S_Yd").onchange = Function("tmp_data();");
		   document.all("E_Yr").onchange = Function("setDateVal(0,0,'E_Yr','E_Ym','E_Yd');tmp_data();");
	   	   document.all("E_Ym").onchange = Function("setDateVal(0,0,'E_Yr','E_Ym','E_Yd');tmp_data();");
		   document.all("E_Yd").onchange = Function("tmp_data();");
	  	
	  	document.all("S_date_tmp").value = document.all("S_Yr").value + "/" + document.all("S_Ym").value + "/" + document.all("S_Yd").value ;	
		document.all("E_date_tmp").value = document.all("E_Yr").value + "/" + document.all("E_Ym").value + "/" + document.all("E_Yd").value ;	
*/
	break;		   
	default:
		innerObj.innerHTML="<input name='qvalue' type='hidden' value=''>";
	break;
	}
}

