function doSearch() {
	keyword = $('txtSearch').value;

	if(keyword.length > 2) {
	$('divBody').innerHTML = "Requesting content...";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "txtSearch="+keyword,
				 			onComplete: showMessage})
	}else alert('Please enter a keyword');
		
}
function doSearchTag(word) {


	$('divBody').innerHTML = "Requesting content...";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "txtSearch="+word,
				 			onComplete: showMessage})
	
		
}
/*
function nextPage(page,word) {
	$('divBody').innerHTML = "Requesting content of page "+page+"...";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "page="+page+"&txtSearch="+word+"&req=next",
				 			onComplete: showMessage})

}

function prevPage(page,word) {
	$('divBody').innerHTML = "Requesting content of page "+page+"...";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "page="+page+"&txtSearch="+word+"&req=prev",
				 			onComplete: showMessage})

}
function lastPage(page,word) {
	$('divResult').innerHTML = "Requesting content of page "+page+"...";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "page="+page+"&txtSearch="+word,
				 			onComplete: showMessage})

}

function firstPage(page,word) {
	$('divResult').innerHTML = "<div class='mLeft'>Requesting content of page "+page+"...</div>";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "page="+page+"&txtSearch="+word,
				 			onComplete: showMessage})

}
*/
function navigatePage(page,word) {
	$('divResult').innerHTML = "<div class='mLeft'>Requesting content of page "+page+"...</div>";
			new Ajax.Request("search_result.php?",
						//new Ajax.Request("/fox/file/money1.php?",
							{method: 'post',
				 			parameters: "page="+page+"&txtSearch="+word,
				 			onComplete: showMessage})

}

function showMessage(request) {
		
		//alert('got it');
		$('divBody').innerHTML = request.responseText;
		
}

function enter(e) {

if (!e) var e = window.event;	
var browser=navigator.appName;


if (browser=="Netscape") {
  if(e.which == 13 && $('txtSearch').value.length < 2) {
  	return false;
  }

}else{
  if(e.keyCode == 13 && $('txtSearch').value.length < 2){
  	return false;
  	
  }
}

}