var siteUrl = "tp.michelin.dev" ;
//var siteUrl = "jp.meetexpo.com" ;

function searchByPost1()
{
  var channelUrl1 = $('#channel_url1').val();
  
  var query1Value = $('#query1').val();
  //alert by fxt for the form can not be empty.
  if(query1Value == ""||query1Value == "输入关键字"){
	alert("请输入您要搜索的内容！") ;
	return false ;
  }else{
	  $('channel_url2').val('') ;
	  $('#hquery1').val(query1Value + " " + channelUrl1+" "+siteUrl); 
	  document.searchForm1.submit();
  }
}

function searchByPost2()
{
  var channelUrl2 = $('#channel_url2').val();
  var query2Value = $('#query2').val();
  //alert by fxt for the form can not be empty.
  if(query2Value == ""){
	alert("请输入您要搜索的内容！") ;
  }else{
	  $('channel_url2').val('') ;
	  $('#hquery2').val(query2Value + " " + channelUrl2+" "+siteUrl); 
	  document.searchForm2.submit();
  }
}

function goto(start)
{
  $('#starNum').val(start);

  var channelUrl3 = $('#channel_url3').val();
  var query3Value = $('#query3').val();

  $('channel_url2').val('') ;
  $('#hquery3').val(query3Value + " " + channelUrl3); 

  document.gotoForm.submit();
}

function searchByChannel(channelUrl)
{
  //alter by fxt for the form can not be empty.
  var query2Value = $('#query2').val();
  if(query2Value != ""){
	  $('#channel_url2').val(channelUrl);
	  var query2Value = $('#query2').val();
	  $('#hquery2').val(query2Value + " " + channelUrl+" "+siteUrl); 
	  document.searchForm2.submit();
  }else{
	alert("请输入您要搜索的内容！") ;
  }
}
