﻿
function ProductSearchOW(loc, query1, query2, width, height) {
	  var name = 'AUTOWEB';
	  var Query='' ; 
	  if (query1=="" ){ 
		  alert ("請填寫關鍵字 !!"); return false;
	  }
      Query ='?Action=or&keyword='+escape(query1)+'&Charset='+escape(query2)+'&searchType=Product' ;
	  wi = window.open(loc+Query,'searchPWin', ' width=' + width + ', height=' + height + ', resizable=yes,status=yes,toolbar=no,menubar=no,scrollbars=yes');
	  wi.focus();
	  return false;
}
function ProductSearch(){
	ProductSearchOW('http://idx.ccnet-hk.com/hkbs/CT_Query.asp', document.forms['searchProduct'].keyword.value,document.forms['searchProduct'].Charset.value,550,550); return;
	return false;
}
function ToProductSearch(){
	if (event.keyCode==13 || event.keyCode==0 )return ProductSearch();
	return false;
}

/*
 trim() is define in FullSearch.js
*/

document.write("<table width='143' height='46' border='0' align='center' cellpadding='0' cellspacing='0' id='___01'>");
document.write("<form name=searchProduct onSubmit='return false;' ><input name=Charset value='big5_hkscs' type='hidden'><tr><td colspan='2'>");
document.write("<img src='/Template/Shared/big5_hkscs/productsearch_01.jpg' width='143' height='17' alt=''></td></tr>");
document.write("<tr><td background='/Template/Shared/big5_hkscs/productsearch_02.jpg'  width='95' height='29' align=center> ");
document.write("<input name='keyword' class='search2' value='Product Search'  onFocus=\"if (this.value=='Product Search'){this.value='';} \" onBlur=\"if (trim(this.value)==''){this.value='Product Search';}\" onKeyPress='ToProductSearch();' ></td>");
document.write("<td><a href='#' onclick='ProductSearch();'><img src='/Template/Shared/big5_hkscs/productsearch_03.jpg' width='48' height='29' border=0></a></td></form>");
document.write(" </tr></table>");