function validate_search1()
{
	if (document.searchform1.searchtext.value == "")
	{
		alert("请输入要查找的内容");
		return false;
	}
	else
	{
		//document.searchform.action = "/resident/ctl_resident.php?action=search";
		document.searchform1.target = "_top";
		document.searchform1.action = "/resident/search_pop.php";
		document.searchform1.name.value = document.searchform1.searchtext.value;
		return true;
	}
}

function validate_search2()
{
	if (document.frmfindbook.search_name.value == "")
	{
		alert("请输入要查找的内容");
		return false;
	}
	else
	{
		//Added Dennis Zou
		//document.searchform2.action = "http://vsm.the9.com/vsm/ctl_vsm_stock.php?action=stockdetail&stockid="+document.searchform2.searchtext.value;
		//document.searchform2.dl_key_words.value = document.searchform2.searchtext.value;
		document.frmfindbook.action = "/biz/bizgoodslist_book_select.asp?page=0&type=00"
		
		return true;
	}
}


function validate_search()
{
	var sel = eval("document.searchform.scope");
	var select_id = sel.selectedIndex;
	cont = sel.options[select_id].value;
	if (cont == "user")
	{
		document.searchform.target = "GameNow";
		document.searchform.action = "/resident/search_pop.php";
		document.searchform.name.value = document.searchform.searchtext.value;
		return true;
	}
	if (cont == "stock")
	{
		document.searchform.target = "GameNow";
		document.searchform.action = "http://vsm.the9.com/vsm/ctl_vsm_stock.php?action=stockdetail&stockid="+document.searchform.searchtext.value;
		return true;
	}
}

function showhit()
{
	var sel = eval("document.searchform");
	var select_id = sel.scope.selectedIndex;
	cont = sel.scope.options[select_id].value;
	if (cont == "user")
	{
		sel.searchtext.value = "居民昵称";
	}
	if (cont == "stock")
	{
		sel.searchtext.value = "股票代码";
	}
}

function validate()
{
	if (document.loginform.usr_name.value == "")
	{
		alert("请输入登录名");
		document.loginform.usr_name.focus();
		return;
	}
	if (document.loginform.password.value == "")
	{
		alert("请输入口令");
		document.loginform.password.focus();
		return;
	}
	document.loginform.submit();
}

function go_bbs(sel)
{
	var select_id=sel.selectedIndex;
	if (select_id==0)
	{
		alert("请选择论坛");
		return false;
	}
	else
	{
		var bbs_url="http://bbs.the9.com/bbs/index.php?forum=" + sel.options[select_id].value;
		window.location=bbs_url;
		return true;
	}
	
}

function keysubmit(e)
{
	if (navigator.appName == "Netscape")
	{
		if (e.which == 13){validate();}
	}
	else
	{
		if (event.keyCode == 13){validate();}
	}
}

function getpass()
{
	window.open("http://www.the9.com/indexhelp/get_password.htm", 'newwin2', 'left=150, top=50, width=600,height=300,resizable=1,status=0,menubar=0,scrollbars=1'); 
}
 

