// JavaScript Document

/* 
* ѡѡid= id  value = value 
* 
*/

	


function g(id){
	return document.getElementById(id);
}
function just_number(id){
	g(id).value = g(id).value.replace(/[^\d]/g,'');
}


 // add 2008.09.11 by CY
// if browser is IE then ...
function get_op(){
	if(document.all){
		return 'ie';
	}else{
		return '';	
	}
}
 // replace all blank space of js,like PHP trim();
String.prototype.strtrim = function(){
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
// search action of all site, rewrite url...
function search_action(){
	var keyword = g('keyword').value.strtrim();

	//var show_type = g('show_type').value.strtrim();
	//var search_type = g('search_type').value.strtrim();
	if(keyword.length >0){
		document.location.href = "/advancedsearch-"+keyword+"-1.html";
	
	}
	
}
// press Enter to search keyword, only use in IE
function enter2search(){
	if(get_op() == 'ie'){
		if(window.event.keyCode==13){
			search_action();
		}
	}
}

