//change the two variables below to match yoursite's own info
var bookmarkurl="http://www.antivirus-report.com/"
var bookmarktitle="The FREE Antivirus Report"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


//kill google autolinks below

// 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="canadianiss05-20";

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);
}


//
//
//popup code below

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){

if(GetCookie("sid") == "999"){return;}
document.cookie="sid=999; Path=/; Expires= " + getFuture(1);

if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

// Cookie functions borrowed from:
// Ronnie Moore: Visit him at http://www.ronniemoore.com
function getFuture(f){
var d = new Date();
d.setTime(d.getTime() + (86400000 * f));
return d;
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
  var j = i + alen;
  if (document.cookie.substring(i, j) == arg)
  return getCookieVal (j);
  i = document.cookie.indexOf(" ", i) + 1;
  if (i == 0) break; 
  }
  return null;
  }

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}