<!-- Begin

// (C) 2002, Ben Steed and Scrapjazz, LLC.
// This script may not be reproduced, altered, or used 
// in any way without express permission of Scrapjazz, LLC.
// 
// Date of Creation: 10/12/2002

// grab text that's higlighted when a doubleclick takes place

document.ondblclick = word;

var newwin;
function word() {

t = document.selection.createRange();
if(document.selection.type == 'Text' && t.text != '') {

document.selection.empty();
opennewwin(t.text);
   }
}

// Launch FastFind window

function opennewwin(text) {

if (text > '') {
window.open('http://www.scrapjazz.com/cgi-bin/search.cgi?t=ff&q='+text, "newWindow", "toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=230,height=260,left=300,top=250")
   }
}

// Function for collecting text from a highlighted phrase

function longsearch(){

phrase= (document.all) ? document.selection.createRange().text : document.getSelection();

if (phrase.length > 40) {
alert('Please limit your FastFind search terms to 40 characters.');
return false;
}

// Remove the whitespace from the *end* of strings

while (phrase.substr(phrase.length-1)==" ") {
   phrase = phrase.substring(0,phrase.length-1);

}

// Remove the whitespace from the the *beginning* of strings

while (phrase.charAt(0) ==" ") {
   phrase = phrase.substring(1,phrase.length);

}

if(phrase){
window.open('http://www.scrapjazz.com/cgi-bin/search.cgi?t=ff&q='+escape(phrase), "newWindow", "toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=230,height=260,left=300,top=250")

  }
}

// Launch search by pressing the "f" key

function document.onkeydown()
{
if (window.event.keyCode==70)
longsearch();
}


//  End -->