document.writeln("<style>");
document.writeln("tr{ height:20px;}");
document.writeln("td{ font-size:12px; color:#373737; text-align:center;}");
document.writeln("td a{ color:#000000; text-decoration:none;  margin:0 2px;}");
document.writeln("td a:hover{ text-decoration:underline;}");
document.writeln("#show{position:absolute;z-index:102;zoom:1;	width:577px; padding-bottom:0;}");
document.writeln("#show h3{ background:url(\/Public\/images\/tcc.jpg) center no-repeat; width:548px; height:23px;color:#fff;font-size:14px;padding:3px; margin:0 auto; margin-bottom:3px; }");
document.writeln("#show span{ text-shadow:0px 1px 1px #000;position:absolute;right:18px;top:25px;display:block;cursor:pointer;color:#fff; font-weight: bold;}");
document.writeln("#text{font-size:12px;text-indent:2em;line-height:20px;}");
document.writeln("#bgbox{position:absolute;left:0;top:0;background:#000;filter:alpha(opacity=0);opacity:0.0;z-index:101}");
document.writeln(".apDiv2 {background:#FFFFFF; width:500px;position: relative;FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px auto; FONT:12px 宋体; z-index:100;}");
//document.writeln("#lsxz{font-family:tahoma;magin:0px;padding:0px;background:url(\/Public\/images\/tc_bg.gif) bottom repeat-x;} ");
//document.writeln("#lsxz LI {DISPLAY:inline; width:184px; FLOAT:left; PADDING-BOTTOM: 0px; margin:0 5px 5px 0;  text-align:left; border:1px solid #dcdcdc; height:20px;line-height:20px;padding-top:4px; COLOR:#04477C;}");
document.writeln(".lsxz1{font-family:tahoma;magin:0px;padding:0px;background:url(\/Public\/images\/tc_bg.gif) bottom repeat-x;} ");
document.writeln(".lsxz1 LI {DISPLAY:inline; width:129px; FLOAT:left; PADDING-BOTTOM: 0px; margin:0 5px 5px 0;  text-align:left; border:1px solid #dcdcdc; height:20px;line-height:20px;padding-top:4px; COLOR:#04477C;}");
document.writeln(".lsxz2{font-family:tahoma;magin:0px;padding:0px;background:url(\/Public\/images\/tc_bg.gif) bottom repeat-x;} ");
document.writeln(".lsxz2 LI {DISPLAY:inline; width:84px; FLOAT:left; PADDING-BOTTOM: 0px; margin:0 5px 5px 0;  text-align:left; border:1px solid #dcdcdc; height:20px;line-height:20px;padding-top:4px; COLOR:#04477C;}");
document.writeln(".apDiv2 INPUT{ vertical-align:middle;}");
//document.writeln("#lsxz li.s1 {border: 1px solid #FC0;background-color: #FFC;}");
document.writeln(".lsxz1 li.s1 {border: 1px solid #FC0;background-color: #FFC;}");
document.writeln(".lsxz2 li.s1 {border: 1px solid #FC0;background-color: #FFC;}");
document.writeln("<\/style>");
document.writeln("<div id=\"show\" style=\"display:none;\">");
document.writeln("<table width=\"577\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("  <tr>");
document.writeln("    <td colspan=\"3\" style=\"background:url(\/Public\/images\/tct.jpg) bottom no-repeat; height:100%;filter:alpha(opacity=60);opacity:0.6;\"><\/td>");
document.writeln("    <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td width=\"9\" style=\"background:url(\/Public\/images\/tcl.jpg) repeat-y; height:100%;filter:alpha(opacity=60);opacity:0.6;\"><\/td>");
document.writeln("    <td width=\"560\" style=\"  background:url(\/Public\/images\/tc_bg.gif) bottom repeat-x;background-color:#FFFFFF;\" ><div style=\"  height:auto;\">");
document.writeln("    <h3><\/h3>");
document.writeln("<div style=\"position:relative; width:550px; margin:0 auto;\">");
document.writeln("      <div  style=\'clear:both; margin-left:3px;\'>");
document.writeln("        <ul id=\'lsxz\' style=\'display:inline;\'>");
document.writeln(" ");
document.writeln("        <\/ul>");
document.writeln("      <\/div>");
document.writeln("<div  style=\'clear:both;height:30px; \'>	");
document.writeln("        <input id=\"ls_qb\" type=\"hidden\"> <input id=\"ls_xzd\" type=\"hidden\" value=\"\" \/>");
document.writeln("		<input name=\"input\" type=\"button\" style=\" background: url(\/Public\/images\/32_16.jpg); width:47px; height:22px; border:0;\" onclick=\"Allselectedqd();\"\/>");
document.writeln("		<input id=\"quanxuan\" type=\"button\" style=\" background: url(\/Public\/images\/32_18.jpg); width:47px; height:22px; border:0;\" onclick=\"Allselected(1)\" \/>");
document.writeln("        <input id=\"fanxuan\" type=\"button\" style=\" background: url(\/Public\/images\/32_20.jpg); width:47px; height:22px; border:0;\"  onclick=\"Allselected(0)\"\/>");
document.writeln("        <input name=\"input\" type=\"button\" style=\" background: url(\/Public\/images\/32_22.jpg); width:47px; height:22px; border:0;\" onclick=\"Allquxiao();\" \/>");
document.writeln("<\/div>");
document.writeln("<\/div>");
document.writeln("");
document.writeln("<\/div><\/td>");
document.writeln("    <td width=\"8\" style=\"background:url(\/Public\/images\/tcr.jpg) repeat-y; height:100%;filter:alpha(opacity=60);opacity:0.6;\"><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td colspan=\"3\" style=\"background:url(\/Public\/images\/tcb.jpg) no-repeat; height:100%;filter:alpha(opacity=60);opacity:0.6;\"><\/td>");
document.writeln("    <\/tr>");
document.writeln("    <tr>");
document.writeln("    <td>&nbsp;<\/td>");
document.writeln("    <td>&nbsp;<\/td>");
document.writeln("    <td>&nbsp;<\/td>");
document.writeln("  <\/tr>");
document.writeln("<\/table>");
document.writeln("");
document.writeln("<\/div>");
function show(){
var iWidth = document.documentElement.clientWidth;
var iHeight = document.documentElement.clientHeight;
var bgObj = document.createElement("div");
bgObj.setAttribute("id","bgbox");
bgObj.style.width = iWidth+"px";
bgObj.style.height =Math.max(document.body.clientHeight, iHeight)+"px";
document.body.appendChild(bgObj);
var oShow = document.getElementById('show');
oShow.style.display = 'block';
oShow.style.left = (iWidth-576)/2+"px";
oShow.style.top = (iHeight-348)/2+"px";
var oClosebtn = document.createElement("span");
oClosebtn.innerHTML = "<font color=red><b>×</b></font>";
oShow.appendChild(oClosebtn);
function oClose(){
oShow.style.display = 'none';
oShow.removeChild(oClosebtn);
document.body.removeChild(bgObj);
}
oClosebtn.onclick = oClose;
bgObj.onclick = oClose;
function getEvent() {
return window.event || arguments.callee.caller.arguments[0];
}
document.onkeyup = function(){
var event = getEvent();
if (event.keyCode == 27){
oClose();
}
}
}

function Allquxiao(){
document.getElementById('show').style.display = 'none';

var myDiv=document.getElementById('bgbox');
        var tNode=myDiv.parentNode;
        tNode.removeChild(myDiv);
}
function Allselectedqd(){
Allquxiao();
document.getElementById('l_b_lx').value =document.getElementById('ls_xzd').value;
//document.getElementById("gzteam").innerHTML="<img src='/Public/images/jdt.gif' style='display:block; margin:30px auto;'>";
rload();
document.getElementById("hild").value="";
document.getElementById("l_b").value="1";

window.shuju.location.reload();


}

var xmlHttp

function showHint()
{


  xmlHttp=GetXmlHttpObject()

  if (xmlHttp==null)
    {
    alert ("NO!");
    return;
    }

  var url="tmp/saishi.php";
  url=url+"?&sid="+Math.random();
  xmlHttp.onreadystatechange=stateChanged;
  xmlHttp.open("GET",url,true);

  xmlHttp.send(null);
} 

function stateChanged() 
{ 


if (xmlHttp.readyState==4)
{  


   var a,b,d="",c="";
   var saishi=xmlHttp.responseText;
   
   //var lg=document.getElementById("lg").value;
   var lg=document.getElementById("yuyan").value;
  
   if (lg=='2'){
document.getElementById("lsxz").className="lsxz1";
//alert(document.getElementById("lsxz").className)
   } else {
   document.getElementById("lsxz").className="lsxz2";
   }

   var l_b_lx=","+document.getElementById("l_b_lx").value;
   var checked="";
   //document.getElementById("txt").innerHTML=saishi;
   var liclass="";
 if (saishi){
     show();
     a = saishi.split("!");
	    for(i=0;i<a.length;i++){
            b = a[i].split(",");
			if(l_b_lx.indexOf(","+b[1]+",")==-1){checked="";liclass=""} else {checked=" checked";liclass=" class=s1" }
			
	        c = c+"<label for=l"+i+" ><LI id='s"+i+"'"+liclass+"><INPUT TYPE='checkbox' name='qbssh' id=l"+i+" value='"+b[1]+"' onclick='selectls("+i+")'"+checked+">"+b[lg]+"("+b[3]+")</LI></label>"; 
			d = d+b[1]+",";		
		}
   document.getElementById("lsxz").innerHTML=c;
   document.getElementById("ls_qb").value=d;
   
   
   
   } else {
   //document.getElementById("txtHint").innerHTML="没有比赛";
   
   }


}
}

function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
return xmlHttp;
}
function Allselected(xz)
{
   var allsel=document.getElementsByName("qbssh");
   for(var i=0;i<allsel.length;i++)
   {
   allsel[i].checked=xz;
   
   if(xz==1){ document.getElementById("s"+i).className="s1";} else { document.getElementById("s"+i).className="";}
   
   }
   if(xz==1){
   document.getElementById("ls_xzd").value=document.getElementById("ls_qb").value;
   
   } else {
   document.getElementById("ls_xzd").value="";
   }
}
function selectls(bs){
var bsname=document.getElementById("l"+bs).value;
var allsel=document.getElementsByName("qbssh");

if(allsel[bs].checked==1){
document.getElementById("s"+bs).className="s1";
document.getElementById("ls_xzd").value+=bsname+",";

} else {
document.getElementById("s"+bs).className="0";
document.getElementById("ls_xzd").value=(document.getElementById("ls_xzd").value).replace(bsname+',', '');

}
}