<!--
function initFunc()
{
   // Dummy function which can be overridden in individual files
}

function doSearch( form )
{
var rc = false;

   // First check to be sure the user entered anything.
   if ( form.keywords.value.length > 0 )
   {
   var value = getCheckedValue( form.engine );

      // Check the engine value.  If it is the first option
      // then we are searching our home site, so stay within
      // the frame set.  If it isn't, spawn a new window and
      // modify the form action to be the correct place
      if ( value == 'home' )
      {
	 rc = true;
      }
      else
      {
      var url = '';

	 if ( value == 'bestbookbuys' )
	 {
	    url = 'http://www.bestwebbuys.com/search.cfm?t=Books&q=';
	 }
	 else if ( value == 'bestmusicbuys' )
	 {
	    url = 'http://www.bestwebbuys.com/search.cfm?t=Music&q=';
	 }
	 else if ( value == 'bestvideobuys' )
	 {
	    url = 'http://www.bestwebbuys.com/search.cfm?t=Video&q=';
	 }
	 else if ( value == 'yahoo' )
	 {
	    url = 'http://search.yahoo.com/bin/search?p=';
	 }
	 else if ( value == 'northernlight' )
	 {
	    url = 'http://www.northernlight.com/nlquery.fcg?cb=0&qr=';
	 }
	 else if ( value == 'megaspider' )
	 {
	    url = 'http://search.megaspider.com/XP.html?';
	 }

	 url += escape( form.keywords.value );

	 openWindow( url, 'search' );
      }
   }
   else
   {
      alert( "You must provide a value to search for" );
   }

   return rc;
}


function dumpObject( obj )
{
var str = 'dump of ' + obj + " :\n";

   for ( var i in obj )
   {
      str += i + " = " + obj[ i ] + "\n";
   }

   alert( str );
}


function getCheckedValue( formArray )
{
var value = '';

   for ( var i = 0; i < formArray.length; i++ )
   {
      if ( formArray[ i ].checked )
      {
         value = formArray[ i ].value;
	 break;
      }
   }

   return value;
}


function goBack()
{
   history.back();

   return false;
}


function openSmall( theURL, theTarget )
{
   return openWindow( theURL, theTarget,
                      'scrollbars=yes, resizable=yes, width=400, height=400' );
}


function openWindow( theURL, theTarget, theParams )
{
var win;

   if ( !theTarget )
   {
      theTarget = '_blank';
   }

   if ( theParams )
   {
      win = window.open( theURL, theTarget, theParams );
   }
   else
   {
      win = window.open( theURL, theTarget );
   }

   if ( win && _jsVersion_ >= 1.1 )
   {
      win.focus();
   }

   return false;
}


var show = '';
var hide = 'none';
var lastVisible = '';
var parentLayer = '';

function visibleOn( name )
{
   if ( lastVisible != name )
   {
      visibleOffAll();
      visibleSet( name, show );
      lastVisible = name;
   }

   return false;
}

function visibleOff( name )
{
   visibleSet( name, hide );
   lastVisible = '';

   return false;
}

function visibleOffAll()
{
   if ( everybody )
   {
      for ( var i = 0; i < everybody.length; i++ )
      {
	 visibleSet( everybody[ i ], hide );
      }
   }

   return false;
}

function visibleSet( name, visibility )
{
var fixImage = true;

   if ( document.getElementById )
   {
      if ( document.getElementById( name ) )
      {
      	 document.getElementById( name ).style.display = visibility;
      }
      else
      {
         alert( "Unable to find element " + name );
      }
   }
   else if ( document.layers )
   {
   var obj;

      if ( parentLayer && name != parentLayer )
      {
         // For nested layers
	 obj = eval( 'document.' + parentLayer + '.layers.' + name );
      }
      else
      {
	 obj = eval( "document." + name );
      }

      if ( obj )
      {
	 // Override visibility values as NS uses something different
         obj.display = visibility == hide ? 'hide' : 'show';
      }
      else
      {
         fixImage = false;
      }
   }
   else
   {
      eval( "document.all." + name + ".style.display = visibility" );
   }

var image = eval( "document." + name + "_img" );

   if ( fixImage && image )
   {
      image.src = visibility == hide ? "/images/arrow_closed.gif" : "/images/arrow_open.gif";
   }

   return false;
}

function visibleState( name )
{
var answer = '';

   if ( document.getElementById )
   {
      answer = document.getElementById( name ).style.display;
   }
   else if ( document.layers )
   {
   var obj;

      if ( parentLayer && name != parentLayer )
      {
         // For nested layers
	 obj = eval( 'document.' + parentLayer + '.layers.' + name );
      }
      else
      {
	 obj = eval( "document." + name );
      }

      if ( obj )
      {
         answer = obj.display;
      }
   }
   else
   {
      answer = eval( "document.all." + name + ".style.display" );
   }

   return answer;
}

function visibleToggle( name )
{
   return lastVisible == name ? visibleOff( name ) : visibleOn( name );
}


// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com

// This one brings in the message from the right to the left, but the
// text starts out spread out and works its way down until it is
// exactly what was requested.

// Original:  Aram Yegenian (yegeniana@hotmail.com)
// Web Site:  http://aramyegenian.cjb.net

var wmsg = new Array( 33 );
var timeID = 5;

function initWiper( msg )
{
var blnk = "                                                                        ";

   clearTimeout( timeID );

   if ( msg.length )
   {
      wmsg[ 0 ] = msg;

      for ( i = 1; i < wmsg.length - 1; i++ )
      {
         b = blnk.substring( 0, i );
         wmsg[ i ] = "";
         for ( j = 0; j < msg.length; j++ )
	 {
	    wmsg[ i ] = wmsg[ i ] + msg.charAt( j ) + b;
	 }
      }

      wiper( msg, 150, 11 );
   }
   else
   {
      defaultStatus = status = msg;
   }
}


function wiper(msg, timer, stcnt)
{
   if ( stcnt > -1 )
   {
      str = wmsg[ stcnt ];
   }
   else
   {
      str = wmsg[ 0 ];
   }

   if ( stcnt-- < -40 )
   {
      stcnt = wmsg.length - 2;
   }

   defaultStatus = status = str;

   clearTimeout( timeID );

   timeID = setTimeout( "wiper( '" + msg + "', " + timer + ", " + stcnt + " )", timer );
}

// -->
