

function TestDataCheck() {
                if (document.sear.cadbus.value.length < 3) {
			alert ('La b&uacute;squeda ha de contener al menos 3 caracteres.');
                        return false;
                } else {
                        return true;
                }
}

function thumb_resize(which, max) {
var elem = document.getElementById(which);

if (elem == undefined || elem == null) return false;
var orig_width = elem.width;
var orig_height = elem.height;

if (max == undefined) max = 120;
if (elem.width > elem.height) {
if (elem.width > max) { elem.width = max; elem.height = orig_height*(max/orig_width);}
} else {
if (elem.height > max) { elem.height = max; elem.width = orig_width*(max/orig_height);};
}
} 

