var recordcount=""
var nShowHidden=0

//数据列表弹出窗口
function oddslist(URL){
		var theURL="oddslist.asp?id="+URL
		window.open(theURL,'','width=650,height=520,top=40,left=40,resizable=yes,scrollbars=yes');
}
//首页弹出窗口
function Homemorepage(URL){
		var theURL="Oddslist.asp?Oddslist/"+URL+".htm"
		window.open(theURL,'','width=650,height=520,top=40,left=40,resizable=yes,scrollbars=yes');
}
//历史数据页面弹出窗口
function OddsHistory(URL){
	var theURL="OddsHistory.asp?id="+URL
	window.open(theURL,"","width=470,height=300,top=40,left=100,resizable=yes,scrollbars=yes");
}
function OddsHistory2(url){
	var theURL="OddsHistory.asp?id="+"34534543"//this.name
	
	window.open(theURL,"","width=380,height=180,top=40,left=100,resizable=yes,scrollbars=yes");
}
//显示或隐藏选择的球赛
function selectleague(theselect){
	if (!theselect.checked){
		for (i=1;i<=recordcount;i++){
			if (document.all["input_" + i].checked){
				if (document.all["tr_" + i].name == theselect.value){
					document.all["tr_" + i].style.display = 'none';
					document.all["tr2_" + i].style.display = 'none';
					document.all["input_" + i].checked = false;
					nShowHidden++;
				}
			}
		}
	}
	else
	{
		for (i=1;i<=recordcount;i++){
			if (!document.all["input_" + i].checked){
				if (document.all["tr_" + i].name == theselect.value){
					document.all["tr_" + i].style.display = 'inline';
					document.all["tr2_" + i].style.display = 'inline';
					document.all["input_" + i].checked = true;
					nShowHidden--;
				}
			}
		}
	}
	nshowhide.innerText=nShowHidden;
}
//显示或隐藏一个球赛
function matchshowhide(theInput){
	var i=theInput.value
	if (!theInput.checked){
		document.all["tr_" + i].style.display = 'none';
		document.all["tr2_" + i].style.display = 'none';
		//document.all[88].style.display = 'none';
		//document.all["tr_abc"].style.display = 'none';
		
		//document.all["tr_abc2"].style.display = 'none';
		//document.getElementsByName('tr_abc231')[0].style.display = 'none';
		//document.getElementsByName('tr88_2')[0].style.display = 'none';
		//document.all['tr_88'].style.display= 'none';
		document.all["input_" + i].checked = false;
		nShowHidden++;
	}
	nshowhide.innerText=nShowHidden;
}
//显示所有球赛
function showallmatch(){
	for (i=1;i<=recordcount;i++){
		document.all["tr_" + i].style.display = 'inline';
		document.all["tr2_" + i].style.display = 'inline';
		document.all["input_" + i].checked=true;
	}
	
	nShowHidden=0
	nshowhide.innerText=0;
}
function abc(){
	//document.getElementsByName('abc')[0].style.display = 'none';
	//document.all["tr_abc"].style.display = 'none';
	//document.write("fffffffffffffffffffffffffffffffffffffffffffffffffffffff");
}
function showorhide(name,action){
	document.all[name].style.display=action;
}
//显示或隐藏联赛
function showothermatch(){
	for (i=1;i<=nleague;i++){
		if (document.all["checkboxleague_" + i].checked){
			document.all["checkboxleague_" + i].checked = false;
		}
		else{
			document.all["checkboxleague_" + i].checked = true;
		}
	}
	for (i=1;i<=recordcount;i++){
		if (document.all["input_" + i].checked){
			document.all["tr_" + i].style.display = 'none';
			document.all["tr2_" + i].style.display = 'none';
			document.all["input_" + i].checked = false;
			nShowHidden++;
		}
		else{
			document.all["tr_" + i].style.display = 'inline';
			document.all["tr2_" + i].style.display = 'inline';
			document.all["input_" + i].checked = true;
			nShowHidden--;
		}
	}
	nshowhide.innerText=nShowHidden
}
//检查历史数据的年月日有没有被选择
function Checkdate(thisform){
	if (thisform.Year.selectedIndex==0){alert("请选择年份");return false;}
	if (thisform.Month.selectedIndex==0){alert("请选择月份");return false;}
	if (thisform.Day.selectedIndex==0){alert("请选择日期");return false;}
	//document.form2.filter1.value;
	Company=document.form1.Company.value;
	id=document.form1.id.value;
	
	yy = thisform.Year.options[thisform.Year.selectedIndex].value;
	mm = thisform.Month.options[thisform.Month.selectedIndex].value;
	dd = thisform.Day.options[thisform.Day.selectedIndex].value;
	thisform.action="?date="+yy+"-"+mm+"-"+dd+"&id="+id+"&company="+Company;
	return true;
}
