<!--
//common.js - ToolmanHQ auctions

String.prototype.trim = function() 
{
	return this.replace(/^\s+|\s+$/g,"");
}

function addbookmark(bookmarkURL, bookmarkName)
{
  if (document.all)
    window.external.AddFavorite(bookmarkURL, bookmarkName)
}

function printInfo()
{
window.print()
}

function tipsWindow1(thePage, theWidth, theHeight)
{
  newwindow=window.open(thePage,"newwin",
   "scrollbars=yes,width=" + theWidth + ",height=" + theHeight + ",left=300,top=50");
} 

function validateSearch(theForm)
{
  // remove leading and trailing spaces
  // theForm.kw.value = theForm.kw.replace(/^\s*(\b.*\b|)\s*$/, '');
  // theForm.kw.value = theForm.kw.value.trim();
  if (theForm.kw.value == "") 
  {
    // alert("Please enter a keyword.");
    theForm.kw.focus(); 
    return (false);
  }
  return (true);
}

function onImgErrorSmall(source)
{
source.src = "/images/no-image-125px.gif";
// disable onerror callback to prevent endless loop
source.onerror = "";
return true
}

function onImgErrorLarge(source)
{
source.src = "/images/no-image-200px.gif";
// disable onerror callback to prevent endless loop
source.onerror = "";
return true
}

//-->

