//<script language="javascript">
document.write("<style>input.ic{background-color:#FFF0F0;border-color:#000000;border-width:1px;}</style>");
document.write("<style>input.sbm{MARGIN: 0px 0px -3px;border-width:0px;}</style>");
var searchhtml = new Array();
searchhtml[0] = "<style type=\"text/css\">@import url(http://www.google.com/cse/api/branding.css); </style> <div class=\"cse-branding-right\" style=\"background-color:#FFFFFF;color:#000000\"><div class=\"cse-branding-form\"><form action=\"http://www.google.com/cse\" id=\"cse-search-box\" target=\"_blank\"><div><input type=\"hidden\" name=\"cx\" value=\"partner-pub-4182368174588971:9fsd2ppd3jd\" /><input type=\"hidden\" name=\"ie\" value=\"windows-874\" /><input type=\"text\" name=\"q\" size=\"65\" /><input type=\"submit\" name=\"sa\" value=\"&#x0e04;&#x0e49;&#x0e19;&#x0e2b;&#x0e32;\" /> <img src=\"http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif\" alt=\"Google\" /> Custom Search</div></form></div></div>";
searchhtml[1] = "<form style=\"MARGIN: 0px 0px 0px\" method=get action=\"http://www.thainn.com/topsite/default.php\" target=_blank><input TYPE=\"text\" NAME=\"kw\" size=\"45\" class=ic><select name=\"xselect\" style=\"width:170;\"><option value=\"1\">ค้นจากชื่อเว็บหรือคำบรรยาย</option><option value=\"2\">ค้นหาจาก URL</option></select><input type=submit name=\"Submit3\" value=\"ค้นหาเว็บไซต์ใน ThaiNN\"><input type=\"hidden\" name=\"se\" value=\"0\"><input type=\"hidden\" name=\"pw\" value=\"0\"> <a href=\"http://www.thainn.com/directory/add.php\" target=\"_blank\"><font color=\"#0000FF\">เพิ่ม URL</font></a></form>";
searchhtml[2] = "<form style=\"MARGIN: 0px 0px 0px\" method=get action=\"http://www.thainn.com/blog/search.result.diary.php\" target=_blank><input TYPE=\"text\" NAME=\"kw\" size=\"60\" class=ic><input type=\"radio\" name=\"sf\" value=\"1\" checked><font color=#000000>ค้นหาสมาชิก</font><input type=\"radio\" name=\"sf\" value=\"2\"><font color=#000000>ค้นหาเรื่องใน blog</font>&nbsp;&nbsp;<input type=submit name=\"Submit\" value=\"ค้นหา!\"></form>";
searchhtml[3] = "<form style=\"MARGIN: 0px 0px 0px\" method=GET action=\"http://www.thainn.com/classified/shopping.search.php\" target=_blank><input TYPE=\"text\" NAME=\"kw\" size=\"70\" class=ic><input type=\"hidden\" name=\"se\" value=\"0\"><input type=\"hidden\" name=\"pw\" value=\"0\"><input type=submit name=\"Submit\" value=\"ค้นหาสินค้า\"><font color=\"#FF9900\"> เพิ่มประกาศของคุณ <a href=\"http://www.thainn.com/classified/shopping.add.choice.php\" target=\"_blank\"><font color=\"#0000FF\">คลิ้กที่นี่</font></a></form>";
searchhtml[4] = "<form style=\"MARGIN: 0px 0px 0px\" method=GET action=\"http://www.thainn.com/exchange/temp_search.php\" target=_blank><input TYPE=\"text\" NAME=\"S_keyword\" size=\"50\" class=ic><input type=\"hidden\" name=\"S_type\" value=\"0\"><input type=\"radio\" name=\"S_select\" value=\"1\" checked> <font color=#000000>เลือกจากหัวข้อ</font> &nbsp; <input type=\"radio\" name=\"S_select\" value=\"2\"> <font color=#000000>เลือกจากเนื้อหา</font>&nbsp;&nbsp;<input type=\"hidden\" name=\"se\" value=\"0\"><input type=\"hidden\" name=\"pw\" value=\"0\"><input type=submit name=\"Submit\" value=\"ค้นหาทันที!\"></form>";
searchhtml[5] = "<form style=\"MARGIN: 0px 0px 0px\" method=GET action=\"http://vdo.thainn.com/search.php\" target=_blank><input TYPE=\"text\" NAME=\"kw\" size=\"70\" class=ic><input type=\"hidden\" name=\"se\" value=\"0\"><input type=\"hidden\" name=\"pw\" value=\"0\"><input type=submit name=\"Submit\" value=\"ค้นหา video\"><font color=\"#FF9900\"></form>";

var oldsid=0;

function tosearchbox(sid){
	switch(oldsid){
		case 0:
			sel0.src = "http://img.thainn.com/1_1.gif";
			break;
		case 1:
			sel1.src = "http://img.thainn.com/2_2.gif";
			break;
		case 2:
			sel2.src = "http://img.thainn.com/3_2.gif";
			break;
		case 3:
			sel3.src = "http://img.thainn.com/4_2.gif";
			break;
		case 4:
			sel4.src = "http://img.thainn.com/5_2.gif";
			break;
		case 5:
			sel5.src = "http://img.thainn.com/6_2.gif";
			break;
	}
	switch(sid){
		case 0:
			sel0.src = "http://img.thainn.com/1_2.gif";
			break;
		case 1:
			sel1.src = "http://img.thainn.com/2_1.gif";
			break;
		case 2:
			sel2.src = "http://img.thainn.com/3_1.gif";
			break;
		case 3:
			sel3.src = "http://img.thainn.com/4_1.gif";
			break;
		case 4:
			sel4.src = "http://img.thainn.com/5_1.gif";
			break;
		case 5:
			sel5.src = "http://img.thainn.com/6_1.gif";
			break;
	}
	oldsid = sid;
	searchbox.innerHTML = searchhtml[sid];
}
//</script>