// (c) Xatcom.net 2010
// Prohibida la copia o reproducción parcial o total de este documento
// realizado por Carlos Martínez
function rawurlencode (str) {
    str = (str + '').toString(); 
    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
    replace(/\)/g, '%29').replace(/\*/g, '%2A');}

function Cerca() {
	var f = document.frmCerca;
	var l = document.getElementById("linkForm");
	if ( (f.txtcerca.value.length<2) || (f.txtcerca.value=="buscar...") ) {
		alert("Por favor, introduzca un término de búsqueda válido");
		f.txtcerca.focus();
		return false;
	}
	l.setAttribute("rel","lyteframe");
	l.href = "/buscador/index.php?accio=frmbusca&txtacercar=" + rawurlencode(f.txtcerca.value);
	myLytebox.start(l, false, true);
	return false;
}
