
//Quita los espacios de una cadena
function trimStr(str) {
  str = this != window? this : str;
  return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

//Cambia el color de una fila de una tabla al recibir el foco
function RowFocus(row,color){
	row.style.backgroundColor = color ;
}

//igual al perder el foco
function RowBlur(row,color){
	row.style.backgroundColor = color ;
}

function dar_foco(objeto) {
objeto.style.backgroundColor="#DDDDDD";
objeto.style.cursor="hand";
}

function quitar_foco(objeto) {
objeto.style.backgroundColor="";
}

function OpenLink(page){
	window.open(page);
}


function ShowImage (image,width,height){
	width_window = width + 200;
	height_window = height + 250;

	if (width < 800){ width_window = 800} //para las imagenes de las caņitas esas, ancho minimo

	window.open("view_image.php?imagen=" + image + "&img_width=" + width + "&img_height=" + height,"","left=0,top=0,width="+ width_window +",height= "+ height_window +",toolbar=no,status=no,scrollbars=no,fullscreen=no,resizable=yes");
}