
function checkChars(o) {
	if(o.value.length==1) {
		if(o.value.charAt(0) == " ") o.value="";
	}
	if(o.value.length>1) { 
		for(var i=0; i<=o.value.length; i++) {				
			if(o.value.charAt(i)==" " && o.value.charAt(i-1)==" ") {
					o.value = o.value.substring(0, o.value.length-1); 
			}
		}
	}	
}
function has2Chars(o) {
	if(o.value.length < 2){
		alert('Por favor, escriba alguna palabra-clave');
		o.focus();
		return false;
	}
	else return true;
}

function DoSearch(formname) {
	d = eval(formname);
	var x= d.text.value;
	x = x.replace(/^\s*(.*)/, "$1");
	x = x.replace(/(.*?)\s*$/, "$1");
}