function redirect(url){
	location = url;
}

function closeWin(){
	window.close();
}

function openWin(url,name,param){
	newWin = window.open(url,name,param);
}				

function ltrim ( s ){
	return s.replace( /^\s*/, "" )
}
function rtrim ( s ){
	return s.replace( /\s*$/, "" );
}
function trim ( s ){
	return rtrim(ltrim(s));
}
function searchDb(form1){
word = form1.searchWords;
  	if (!trim(word.value)){
   	alert ("Type in your search phrase");
return false;
}	
	else{
str = trim(word.value);
if (str.length<2){
          alert ("You have to insert more than 1 letter");
return false;
}	
form1.submit();
}
}