function replace(string,text,by) {
// Replaces text with by in string
    var i = string.indexOf(text);
    if (string.length == 0) return string;
    if ((!i) && (text != string.substring(0,text.length))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+text.length < string.length)
        newstr += 
    replace(string.substring(i+text.length,string.length),text,by);

    return newstr;
}
//var page = "Star Wars Wallpaper";
var endChar = page.lastIndexOf(" ", page);
var shortpage = page.substring(0,endChar);

var ePage = replace(shortpage," ","+");
document.writeln('<br><B>Sponsored Links</B><BR><BR>');
document.writeln('<B><A HREF="http://www.webshots.com/webshots.cgi?cashclub|nexus09">Find The Best Free Wallpaper');
document.writeln(' @ WebShots!</A><BR></B>Webshots is one of the best sites on the web ');
document.writeln('for free wallpaper, and the best free software for managing your ever growing ');
document.writeln('wallpaper collection.<BR><BR>');

document.writeln('<b><a href="http://www.qksrv.net/click-302931-1192666" target="_top" >Get Paid to Search for "'+ page +'"!</a></b><img src="http://www.qksrv.net/image-302931-1192666" width="1" height="1" border="0"><br>');
document.writeln('Searching the web for '+ page +'?  If you were using SearchCactus you would be earning cash!  Signup today, and <a href="http://www.qksrv.net/click-302931-1192666" target="_blank">make $100 in ten minutes!</a><BR><BR>');

document.writeln('<b><a href="http://click.linksynergy.com/fs-bin/stat?id=tXcZPRd/IeY&offerid=9384.10000001&type=3&subid=0" >Print real coupons for FREE from your computer, click here.</a></b><IMG border=0 width=1 height=1 src="http://ad.linksynergy.com/fs-bin/show?id=tXcZPRd/IeY&bids=9384.10000001&type=3&subid=0"><BR>');
document.writeln('Print free coupons from the internet and get tons of great free stuff at CoolSavings.com.<BR> <BR> ');

document.writeln('<BR> <BR> <B>Search Results for "'+page+'"');
document.writeln('</B><BR><BR>');
