function do_query() {
    var frm = document.getElementById("search_form");
    var q = encodeURIComponent(frm.query.value);
    var csid = frm.cseid.value;
    var root = frm.root.value;
    frm.action = (
    root+"search.php?newwindow=1&safe=high&cof=FORID:10"
    + "&cx="+csid
    + "&q=" + q 
    + "&as_q=more:all"
    );
    return true;
}

function analytics() {
		document.write("<script type=\"text\/javascript\">var _gaq=_gaq||[];_gaq.push([\'_setAccount\',\'UA-17385897-1\']);_gaq.push([\'_trackPageview\']);(function(){var ga=document.createElement(\'script\');ga.type=\'text\/javascript\';ga.async=true;ga.src=(\'https:\'==document.location.protocol?\'https:\/\/ssl\':\'http:\/\/www\')+\'.google-analytics.com\/ga.js\';var s=document.getElementsByTagName(\'script\')[0];s.parentNode.insertBefore(ga,s);})();<\/script>");
}

function ads_menu() {
    if (result_count <= 0) {
        document.writeln("<a style=\"font-size:100%; color: red;\" ref=\"nofollow\" href=\"http:\/\/www.FriendlyDuck.com\/AF_TA\/rel\/index.cfm?RST=UNF&TAD=420582\" title=\"Download vido/music/ebook/game/xxx at usenet, uncensored and fast...\" target=\"_blank\">Download <b>vido/music/ebook/game/xxx</b> at Usenet... uncensored and fast...<\/a>")
    }
    else {
        document.writeln("<script type=\"text\/javascript\"><!--");
        document.writeln("google_ad_client = \"pub-7054266618638708\";");
        document.writeln("\/* 728x15,  10-6-27 *\/");
        document.writeln("google_ad_slot = \"2979986904\";");
        document.writeln("google_ad_width = 728;");
        document.writeln("google_ad_height = 15;");
        document.writeln("\/\/-->");
        document.writeln("<\/script>");
        document.writeln("<script type=\"text\/javascript\"");
        document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
        document.writeln("<\/script>");
    }
}

function ads_searchform_below() {
    if (result_count <= 0)
        return;
    else {
	    	document.writeln("<script type=\"text\/javascript\"><!--");
				document.writeln("google_ad_client = \"pub-7054266618638708\";");
				document.writeln("\/* 468x60, 10-7-26 *\/");
				document.writeln("google_ad_slot = \"5339919703\";");
				document.writeln("google_ad_width = 468;");
				document.writeln("google_ad_height = 60;");
				document.writeln("\/\/-->");
				document.writeln("<\/script>");
				document.writeln("<script type=\"text\/javascript\"");
				document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
				document.writeln("<\/script>")
    }
}

var randAdsFollowResult1 = 2+Math.floor(Math.random() * Math.min(6, result_count));
var randAdsFollowResult2 = randAdsFollowResult1 + 10;
if (result_count <= 2) {
    randAdsFollowResult1 = result_count;
    randAdsFollowResult2 = -1;
}

function ads_follow_result(cnt) {
    if (randAdsFollowResult1 == cnt||randAdsFollowResult2==cnt) {
        document.writeln("<script type=\"text\/javascript\"><!--");
        document.writeln("google_ad_client = \"pub-7054266618638708\";");
        document.writeln("\/* 300x250, 10-6-27 *\/");
        document.writeln("google_ad_slot = \"7176911050\";");
        document.writeln("google_ad_width = 300;");
        document.writeln("google_ad_height = 250;");
        document.writeln("\/\/-->");
        document.writeln("<\/script>");
        document.writeln("<script type=\"text\/javascript\"");
        document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
        document.writeln("<\/script>");
    }
    //||randAdsFollowResult2==cnt
    else if (cnt==result_count) {
        document.writeln("<p><a style=\"font-size:100%; color: red;\" ref=\"nofollow\" href=\"http:\/\/www.FriendlyDuck.com\/AF_TA\/rel\/index.cfm?RST=UNF&TAD=420582\" title=\"Download vido/music/ebook/game/xxx at usenet, uncensored and fast...\" target=\"_blank\">Download <b>vido/music/ebook/game/xxx</b> at Usenet... uncensored and fast...<\/a><\/p>")
    }
}

function logo() {
	    document.writeln(" <a id=\"r-a\" href=\"http:\/\/www.pdfmeta.com\">");
        document.writeln("<span class=\"o\">PdfMeta<\/span>");
    document.writeln("<\/a>")

	return;
	/*
    document.writeln(" <a id=\"r-a\" href=\"http:\/\/www.pdfmeta.com\">");
    document.writeln("<span class=\"a\">O<\/span>");
    document.writeln("<span class=\"b\">O<\/span>");
    document.writeln("<span class=\"c\">_<\/span>");
    document.writeln("<span class=\"d\">(<\/span>");
    document.writeln("<span class=\"e\">)<\/span>");
    document.writeln("<span class=\"f\">(<\/span>");
    document.writeln("<span class=\"g\">)<\/span>");
    document.writeln("<span class=\"h\">O<\/span>");
    document.writeln("<span class=\"i\">O<\/span>");
    document.writeln("<span class=\"j\">O<\/span>");
    document.writeln("<span class=\"k\">O<\/span>");
    document.writeln("<span class=\"l\">\/<\/span>");
    document.writeln("<span class=\"m\">-<\/span>");
    document.writeln("<strong class=\"n\">o<\/strong>");
    document.writeln("<strong class=\"o\">O<\/strong>");
    document.writeln("<strong class=\"p\">O<\/strong>");
    document.writeln("<strong class=\"q\">O<\/strong>");
    document.writeln("<strong class=\"r\">O<\/strong>");
    document.writeln("<strong class=\"s\">O<\/strong>");
    document.writeln("<strong class=\"t\">O<\/strong>");
    document.writeln("<span class=\"u\">O<\/span>");
    document.writeln("<strong class=\"v\">O<\/strong>");
    document.writeln("<strong class=\"w\">•<\/strong>");
    document.writeln("<strong class=\"x\">•<\/strong>");
    document.writeln("<span class=\"y\">(<\/span>");
    document.writeln("<span class=\"z\">)<\/span>");
    document.writeln("<span class=\"yy\">(<\/span>");
    document.writeln("<span class=\"zz\">)<\/span>");
    document.writeln("<\/a>")
    */
}
