
/* © Copyright 2001 TrafficG.com & EternalHits.com. All rights reserved. */
/* New versions of this script can be found at                           */
/* http://www.trafficg.com/scumware/                                     */


var detect = navigator.userAgent.toLowerCase();
browser = 0;
if (checkIt('msie')) browser = 1
loc = window.location;
dbl = 0;
dblchk = 0;

// If you have more sections of text to clean add more lines to this area
bd_1 = "";
//bd_2 = "";


function grabbody()
{
	// If you have more sections of text to clean add more lines to this area
	if(browser == 1)
	{
	bd1 = document.all.lnkkill_1.innerHTML;
	//bd2 = document.all.lnkkill_2.innerHTML;
	bd1 = clean_body(bd1);
	//bd2 = clean_body(bd2);
	setTimeout('restorebody()',500)
	}
}


function restorebody()
{
// If you have more sections of text to clean add more lines to this area
	if(document.all.lnkkill_1.innerHTML.length != bd1.length) document.all.lnkkill_1.innerHTML = bd1;
	//if(document.all.lnkkill_2.innerHTML.length != bd2.length) document.all.lnkkill_2.innerHTML = bd2;

	if(dblchk == 0) 
		setTimeout('restorebody()',2000)
	dblchk = 1;
}



function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function unload()
{ 
	if(browser == 1)
	{
	if(dbl == 1) setTimeout('stop_redir()',500); 
	}
}


function stop_redir()
{
	//if(window.location != loc) 
	window.location = loc;
}

function replace(string,text,by) 
{
	var strLength = string.length, txtLength = text.length;
	if ((strLength == 0) || (txtLength == 0)) return string;
	var i = string.indexOf(text);
	if ((!i) && (text != string.substring(0,txtLength))) return string;
	if (i == -1) return string;
	var newstr = string.substring(0,i) + by;
	if (i+txtLength < strLength) newstr += replace(string.substring(i+txtLength,strLength),text,by);
	return newstr;
}

function clean_body(mystr)
{
found = mystr.indexOf('href="http://www.filemix.net/cgi-bin/');
	while(found > -1)
	{
	start = found - 59;
	if(start < 0) start = 0;
	start = mystr.indexOf('<A',start);
		if(start > -1)
		{
		end = mystr.indexOf('</A>',found);
			if(end > -1) 
			{
			end += 4
			bad = mystr.substring(start,end);
			good = replace(bad,"</A>","");
			end = bad.indexOf('>',good) + 1;
			good = good.substring(end,good.length);
			mystr = replace(mystr,bad,good);
			}
		}
	found = mystr.indexOf('href="http://www.filemix.net/cgi-bin/',start);
	}
return(mystr);
}




