if (top.frames.length!=0)
top.location=self.document.location;

var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")

function myVoid() { }
var win = null;

function lrgehorz(picnme,title,w,h)
{
OpenWin = this.open('','CtrlWindow','toolbar=No,menubar=No,location=No,scrollbars=No,resizable=No,status=No,screenx=0,screeny=0,width=760,height=560,left=0,top=0');
doc = OpenWin.document;
doc.write('<html><head><title>' + title + '<\/title><\/head><body bgcolor="#000066" style="margin:0px" onBlur="window.close()"; onMousedown="window.close()">');
doc.write('<br><center><table cellspacing="0" cellpadding="0" width="' + w + '" border="0"><tr><td background="' + picnme + '"><img src="../shared/cp00x.gif" width="' + w + '" height="' + h + '" alt="click to close" galleryimg="no"><\/td><\/tr><\/table>');
doc.write('<br><font face="verdana" color="#ffffff">click window to close</font><\/center><\/body><\/html>');
doc.close();
}

var win = null;

function lrgevert(picnme,title,w,h)
{
OpenWin = this.open('','CtrlWindow','toolbar=No,menubar=No,location=No,scrollbars=No,resizable=No,status=No,screenx=0,screeny=0,width=760,height=560,left=0,top=0');
doc = OpenWin.document;
doc.write('<html><head><title>' + title + '<\/title><\/head><body bgcolor="#000066" style="margin:10px" onBlur="window.close()"; onMousedown="window.close()">');
doc.write('<div align="right"><table width="80%" cellspacing="5" cellpadding="0" border="0"><tr><td>');
doc.write('<table cellspacing="0" cellpadding="0" width="' + w + '" border="0"><tr><td background="' + picnme + '"><img src="../shared/cp00x.gif" width="' + w + '" height="' + h + '" alt="click to close" galleryimg="no"><\/td>');
doc.write('<td><img src="../shared/cp00x.gif" width="15" height="1" alt="" galleryimg="no"></td>');
doc.write('<td align="center"><font face="verdana" color="#ffffff">click&nbsp;window to&nbsp;close</font></td><\/tr><\/table>');
doc.write('</td></tr></table><\/div><\/body><\/html>');
doc.close();
}

// AutoBlink
// Puts Google's Autolink on the Blink :)
// (c) 2005 Chris Ridings   http://www.searchguild.com
// Redistribute at will but leave this message intact
// -
// 5th March - Implemented speed enhancement suggested by the guy who wrote
// http://www.dougaltoolbar.com/
// -
// 5th March - Added additional elements to reduce machine load
// 5th March - Added option to not remove links but to 
// rewrite ISBN links as amazon affiliate links!
// Fill in the following
// if you wish to do this. e.g.  var amazonaffiliate="goodlookingco-20"
// Leave as is to remove links in the normal way
var amazonaffiliate="";

var linkcount;
function checklinks() {
	if (!(linkcount==document.links.length)) {
		// Something changed the links!
		// Iterate for an id of _goog
		for (i=0; i < document.links.length; i++) {
			if (document.links[i].id.substring(0,5)=="_goog") {
				// If we find an id of _goog then do something
				if (amazonaffiliate=="") { 
					// No affiliate id defined so remove the links
					var tr = document.links[i].parentTextEdit.createTextRange();
					tr.moveToElementText(document.links[i]);
					tr.execCommand("Unlink",false);
					tr.execCommand("Unselect",false);
					i--;
				} else {
					// An affiliate id defined so rewrite ISBN links
					if (document.links[i].href.indexOf("isbn")>0) {
						var isbn=document.links[i].href.substring(document.links[i].href.indexOf("text")+5,document.links[i].href.length);
						document.links[i].href="http://www.amazon.com/exec/obidos/external-search?search-type=ss&tag=" + amazonaffiliate + "&keyword=" + isbn + "&index=books";
					}
				}
			}
		}
	}
		linkcount = document.links.length;
		setTimeout("checklinks()",500);
}
if (document.getElementById && document.createElement) {
	linkcount=document.links.length;
	setTimeout("checklinks()",500);
}


