var searchPhpParth="\/search.php";

function search_form_select_x(x, theSelected) {
    if (x == theSelected)
		document.writeln("<option value=\"" + x + "\" class=\"option_" + x + "\" selected=\"selected\">" + x + " <\/option>");
    else
        document.writeln("<option value=\"" + x + "\" class=\"option_" + x + "\">" + x + " <\/option>");
}
function index_search_form(arg) {
    document.writeln("<form action=\""+searchPhpParth+"\" method=\"get\" id=\"search\" name=\"form-test\" >");
    document.writeln("	<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\">");
    document.writeln("	<tr>");
    document.writeln("		<td><input type=\"text\" name=\"s\" id=\"s\" class=\"form_text\" size=\"50\" accesskey=\"f\" value=\"\" maxlength=\"50\"\/><\/td><td><select name=\"t\" id=\"sel-cats\">");
    search_form_select_x("pdf", arg);
    search_form_select_x("doc", arg);
    search_form_select_x("ppt", arg);
    document.writeln("        <\/select><\/td>");
    document.writeln("		<td width=\"20\"><\/td>");
    document.writeln("		<td><input type=\"submit\" value=\"&nbsp;SEARCH&nbsp;\" class=\"submit\" \/><\/td>");
    document.writeln("	  <\/tr>");
    document.writeln("	<\/table>");
    document.writeln("  <\/form>");
}
function result_search_form(arg,keywords) {
    document.writeln("<form action=\"" + searchPhpParth + "\" method=\"get\" id=\"search\" name=\"form-test\" >");
    document.writeln("<input type=\"text\" name=\"s\" id=\"s\" class=\"form_text\" size=\"50\" accesskey=\"f\" value=\"" + keywords + "\" maxlength=\"50\"><\/td><td><select name=\"t\" id=\"sel-cats\">");
    search_form_select_x("pdf", arg);
    search_form_select_x("doc", arg);
    search_form_select_x("ppt", arg);
    document.writeln("<\/select><\/td><td>");
    document.writeln("<input  type=\"submit\" value=\"&nbsp;SEARCH&nbsp;\" class=\"submit\">&nbsp;&nbsp;&nbsp;<\/td>");
    document.writeln("<\/form>");
}

function show_ads_top(arg) {
	if(arg!="id"&&arg!="in"){
	    document.writeln("<script type=\"text\/javascript\"><!--");
	    document.writeln("google_ad_client = \"pub-1522404175164967\";");
	    document.writeln("\/* 728x15, paper top *\/");
	    document.writeln("google_ad_slot = \"2245234961\";");
	    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>");
	}else{}
}
function show_ads_searchbox_floor(arg) {
	if(arg!="id"&&arg!="in"){
	    document.writeln("<script type=\"text\/javascript\"><!--");
	    document.writeln("google_ad_client = \"pub-1522404175164967\";");
	    document.writeln("\/* 468x60, 09-9-19 *\/");
	    document.writeln("google_ad_slot = \"9482392800\";");
	    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>");
	}else{}

}
function show_ads_result_right(arg,resultCnt) {
	if(arg!="id"&&arg!="in"){
	    if (resultCnt > 5) {
	        document.writeln("<script type=\"text\/javascript\"><!--");
	        document.writeln("google_ad_client = \"pub-1522404175164967\";");
	        document.writeln("\/* 160x600, 09-9-18 *\/");
	        document.writeln("google_ad_slot = \"4793757673\";");
	        document.writeln("google_ad_width = 160;");
	        document.writeln("google_ad_height = 600;");
	        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>");
	   }
	   else
	   {
	       document.writeln("<script type=\"text\/javascript\"><!--");
	       document.writeln("google_ad_client = \"pub-1522404175164967\";");
	       document.writeln("\/* 336x280, 09-9-19 *\/");
	       document.writeln("google_ad_slot = \"0537418924\";");
	       document.writeln("google_ad_width = 336;");
	       document.writeln("google_ad_height = 280;");
	       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>");
	   }
	}else{}
}
function show_ads_result_floor(arg) {
	if(arg!="id"&&arg!="in"){
	    document.writeln("<script type=\"text\/javascript\"><!--");
	    document.writeln("google_ad_client = \"pub-1522404175164967\";");
	    document.writeln("\/* 336x280, paper result floor *\/");
	    document.writeln("google_ad_slot = \"4107329446\";");
	    document.writeln("google_ad_width = 336;");
	    document.writeln("google_ad_height = 280;");
	    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>");
	}else{}
}
function show_ads_next_page_ceil() {
}
function show_ads_next_page_floor() {
}
function show_google_friend() {
}
function add_this(){
	document.writeln("<div class=\"addthis_toolbox addthis_default_style\">");
	document.writeln("<a class=\"addthis_button_google\"></a>");
	document.writeln("<a class=\"addthis_button_facebook\"></a>");
	document.writeln("<a class=\"addthis_button_favorites\"></a>");
	document.writeln("<a class=\"addthis_button_twitter\"></a>");
	document.writeln("<span class=\"addthis_separator\">|</span>");
	document.writeln("<a class=\"addthis_button_expanded\" href=\"http://www.addthis.com/bookmark.php?v=250&amp;pub=papersearch\">More</a>");
	document.writeln("<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pub=papersearch\"></script></div>");
}
function google_analytics() {
    document.writeln("<script type=\"text\/javascript\"> ");
    document.writeln("  var _gaq = _gaq || []; ");
    document.writeln("  _gaq.push([\'_setAccount\', \'UA-10702669-1\']); ");
    document.writeln("  _gaq.push([\'_trackPageview\']);");
    document.writeln("  (function() { ");
    document.writeln("    var ga = document.createElement(\'script\'); ga.type = \'text\/javascript\'; ga.async = true; ");
    document.writeln("    ga.src = (\'https:\' == document.location.protocol ? \'https:\/\/ssl\' : \'http:\/\/www\') + \'.google-analytics.com\/ga.js\'; ");
    document.writeln("    (document.getElementsByTagName(\'head\')[0] || document.getElementsByTagName(\'body\')[0]).appendChild(ga); ");
    document.writeln("  })(); ");
    document.writeln("<\/script>")
}