For webmasters that are affiliates
Any suggestions are welcome and needed!

/*
ScumBuster 1.1 Sep 16 2002
AMAZON.COM VERSION
USE FREELY - DEFEAT SCUMWARE
Conditions of use: Share this with 10 other Amazon Associates
Cloaks Associate's ID
Will prevent TopMoxie popups
Prevent surfer from clicking WhenU popups until window is closed
Disables PopUpNetWork
If page is hijacked - it is closed

How To Use:
<a href="javascript:go_amazon('asin number of product')">Click To Order</a>

Or, to cater to JS disabled browsers

<a href="your normal link to amazon" onClick="go_amazon('asin number of product')">Click To Order</a>

*/

function go_amazon(ASIN){
//============================
// Modify to Adapt
//============================

var title="An Associate of Amazon.com :::::::::::::::::: CLOSE THIS WINDOW TO GO BACK TO xxxxx :::::::::::::::::::"

//============================
// Modify to Adapt
//============================

var USERID="/ref=nosim/" + "your_affiliate_ID"

var url="http://www.amazon.com/exec/obidos/ASIN/" + ASIN + USERID
agt = navigator.userAgent.toLowerCase()
ie = (agt.indexOf('msie') != -1 || agt.indexOf('microsoft') != -1) ? 1:0
ie4 = (ie && agt.indexOf('msie 4') != -1) ? 1:0
stdBrowser = (document.getElementById) ? 1:0

//============================
// Just a plain unprotected popup for NN browsers - focus does not work for NN6
//============================

if (!ie || (!stdBrowser && !ie4))
{
scumbuster=window.open(url,"","resizable=1,location=1,toolbar=1,menubar=1,scrollbars=1,status=1,top= 0,left=0,width=788,height=370")
}
else {
scumbuster=window.open("about:blank","","resizable=1,location=0,toolbar=1,menubar=1,scrollbars=0,sta tus=1,top=0,left=0,width=788,height=370")
codestring=""+
"<HTML>\n"+
"<HEAD>\n"+
"<TITLE>" + title + "</TITLE>\n" +
"</HEAD>\n" +
'<BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0" onload="self.focus()" onBlur="self.focus()" onunload="opener.focus(); window.close()">\n' +

//============================
// If the onunload event occurs, the page has been hijacked .... close it!
// might be wise to use Andrew Clover's parasite detector if an onunload occurs
// window focus is implemented - 2 popups cannot have focus at the same time without crashing IE ;0)
//============================

'<IFRAME name="scumbusterframe" frameborder="0" border="0" height="100%" width="100%" scrolling="yes" src="' + url + '">\n' +

//============================
// The IFRAME prevents the TopMoxie popups
// Amazon Recommends uses IFRAMES
//============================

"</BODY>\n" +
"</HTML>\n"
scumbuster.document.writeln(codestring)
scumbuster.document.close()
}
}

//============================
// May work if modified, with other merchant/affiliate programs if :
// Cookies must be P3P compliant
// No links with target=top on merchant's site - will close popup
// Sites that break out of frames - will close popup
//============================