var newjq;
var xmlhttp;
var newid;
var newid2; 
var jqsj; 



function getSpboScoreXml(){
if(window.XMLHttpRequest){
xmlhttpjq=new XMLHttpRequest();
}
else if(window.ActiveXObject){
xmlhttpjq=new ActiveXObject("Microsoft.XMLHTTP");
}else{return;}

xmlhttpjq.onreadystatechange=xmlSpboScoreonreadystatechange;
var url="i.xml?u="+Math.random(); 
xmlhttpjq.open("GET",url,true);
xmlhttpjq.send(null);
window.setTimeout("getSpboScoreXml()", 1000);
}

function xmlSpboScoreonreadystatechange()
{

if(xmlhttpjq.readyState!=4){return;}
if(xmlhttpjq.status!=200){return;}
//var newid=xmlhttpjq.responseText;



try{	//try
var new_score="";
var content="";
var cont="";
var cont1="";
var height=0;
var zongshu=0;

newid2=xmlhttpjq.responseXML.documentElement.firstChild.nodeValue;
if(newid == newid2){return;}newid=newid2;
document.getElementById("newzt").value=newid;
var goal=newid.split("__");
var saishi=goal[1].split("|");

//var toBall=delHtmlTag(goal[1]);
//var mystring=ReplaceAll(toBall,"-"," ");
//var delhou=mystring.split(" ");
var xx="ccccc";
var yuyan=document.getElementById("yuyan").value;
var yemian=document.getElementById("yemian").value;

if(goal[1]){	//if-2

var jqok='';
var jinqiu=goal[2].split("_");

for (i=0; i< jinqiu.length-1; i++) {	//for-1

var jinqiu_1=jinqiu[i].split("*");

var duiwu=saishi[i].split(",");
var liansai=duiwu[6];
if(yuyan=='1'){duiwu[0]=duiwu[1];duiwu[3]=duiwu[4];duiwu[6]=duiwu[7];}
else if(yuyan=='2'){duiwu[0]=duiwu[2];duiwu[3]=duiwu[5];duiwu[6]=duiwu[8]}
var bf=jinqiu_1[2].split(" - ");

/*
if(document.getElementById("bf_"+jinqiu_1[0])){
 
   if(yemian=='1'){
document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='FFFF00';
document.getElementById("bf_"+jinqiu_1[0]).innerHTML=jinqiu_1[2];
  } else if(yemian=='2'){
document.getElementById("bff_"+jinqiu_1[0]).style.backgroundColor='FFFF00';
document.getElementById("bf_"+jinqiu_1[0]).innerHTML='<font color=blue face=Arial style=font-size:12px><b>'+jinqiu_1[2]+'</b></font>';
  } 
 else if(yemian=='3'){
document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='FFFF00';
document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#000'>"+jinqiu_1[2]+"</font>";

  }
}
*/

if(jinqiu_1[1] == 1 && document.getElementById("bf_"+jinqiu_1[0])){
//if(document.getElementById("zd_"+jinqiu_1[0])){
    if(yemian=='1'){
	document.getElementById("zd_"+jinqiu_1[0]).className='j3_1';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
	document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#ff0000'>"+bf[0]+"</font>-"+bf[1];
	
    }
	 else  if(yemian=='2'){
	document.getElementById("zd_"+jinqiu_1[0]).className='t-r1';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
//    document.getElementById("bf_"+jinqiu_1[0]).innerHTML='<font color=blue face=Arial style=font-size:12px><b>'+jinqiu_1[2]+'</b></font>';
    document.getElementById("bf_"+jinqiu_1[0]).innerHTML='<font color=#ff0000>'+bf[0]+'</font>-'+bf[1];

    }
	  else  if(yemian=='3'){
	document.getElementById("zd_"+jinqiu_1[0]).style.backgroundColor='#FDC713';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
//    document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#000'>"+jinqiu_1[2]+"</font>";
    document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#ff0000'>"+bf[0]+"</font><font color='#000'>-"+bf[1]+"</font>";

	}

if(liansai != "NBA" && liansai != "WNBA" && liansai != "NCAA" && liansai != "EBA" && liansai != "STAR" && liansai != "EuroB" && liansai != "WORLD" && liansai != "CBA" && liansai != "AsiaB" && liansai != "AmerB" && liansai != "AUBA" && liansai != "KBA" && liansai != "SBA"){
/*
ys1="bli1";
ys2="ali3";
jsbf="<font color='#ff0000'>"+bf[0]+"</font> - "+bf[1];
var zcolor="#ff0000";
var kcolor="#000000";
var zjq=" style='background:url(/Public/images/lj.gif) no-repeat;background-position:2px 5px;'";
var kjq="";
*/
jqsj=document.getElementById("ks"+jinqiu_1[0]).innerText;

cont+="<div style='width:414px; margin:0 auto;margin-bottom:7px;'><div style='height:22px; line-height:20px;font-size:12px; background:url(http://img.raooo.com/img/fenline.jpg) repeat-x; border:solid 1px #a2a09e; border-bottom:none; padding-left:8px; font-family:tahoma,arial,helvetica,sans-serif; '><strong>Ra</strong>足球比分&nbsp;-&nbsp;raooo.com</div><div style='border:solid 1px #a2a09e; border-top:none; padding:3px;'><div style='height:25px; width:80px; float:left; background:#634221; color:#fff;  text-align:center;font-size:14px; line-height:25px;overflow:hidden; white-space:nowrap;'>"+duiwu[6]+"</div><div style='font-family:Verdana;height:25px; width:30px;float:left;line-height:25px; background:#ece9e2;color:blue;text-align:center; font-size:14px; overflow:hidden; white-space:nowrap;'>"+jqsj+"</div><div style='font-family:Verdana;height:25px; width:297px;float:left; font-weight:bold; line-height:25px; background:#ece9e2;text-align:center; font-size:14px; overflow:hidden; white-space:nowrap;'><span style='color:red;'>"+duiwu[0]+"&nbsp;&nbsp;"+bf[0]+"</span>-"+bf[1]+"&nbsp;&nbsp;"+duiwu[3]+"</div><div style='clear:both;'></div></div></div>";

new_score+="<font color=#ff0000>"+duiwu[0]+" "+bf[0]+"</font><font color=blue>-"+bf[1]+"</font> "+duiwu[3]+" ";
//<font color=red>FC愛媛</font> <font color=blue face=Verdana>2-0</font> 大分三神
height=height+51+10;
zongshu++;
jqok=1;
}
//}
	
}else if (jinqiu_1[1] == 2 && document.getElementById("bf_"+jinqiu_1[0])){

//if(document.getElementById("kd_"+jinqiu_1[0])){
	if(yemian=='1'){
	document.getElementById("kd_"+jinqiu_1[0]).className='j5_1';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
    document.getElementById("bf_"+jinqiu_1[0]).innerHTML=bf[0]+"-<font color='#ff0000'>"+bf[1]+"</font>";
	
    } else if(yemian=='2'){
	document.getElementById("kd_"+jinqiu_1[0]).className='t-l1';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
//    document.getElementById("bf_"+jinqiu_1[0]).innerHTML='<font color=blue face=Arial style=font-size:12px><b>'+jinqiu_1[2]+'</b></font>';
    document.getElementById("bf_"+jinqiu_1[0]).innerHTML=bf[0]+'-<font color=#ff0000>'+bf[1]+'</font>';
	

    } else if(yemian=='3'){
		
	document.getElementById("kd_"+jinqiu_1[0]).style.backgroundColor='#FDC713';
	document.getElementById("bf_"+jinqiu_1[0]).style.backgroundColor='#FFFF00';
//    document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#000'>"+jinqiu_1[2]+"</font>";
    document.getElementById("bf_"+jinqiu_1[0]).innerHTML="<font color='#000'>"+bf[0]+"-</font><font color='#ff0000'>"+bf[1]+"</font>";

    }
if(liansai != "NBA" && liansai != "WNBA" && liansai != "NCAA" && liansai != "EBA" && liansai != "STAR" && liansai != "EuroB" && liansai != "WORLD" && liansai != "CBA" && liansai != "AsiaB" && liansai != "AmerB" && liansai != "AUBA" && liansai != "KBA" && liansai != "SBA"){
/*ys1="ali1";
ys2="bli3";	
jsbf=bf[0]+" - <font color='#ff0000'>"+bf[1]+"</font>";
var zcolor="#000000";
var kcolor="#ff0000";
var zjq="";
var kjq=" style='background:url(/Public/images/rj.gif) no-repeat;background-position:100px 5px;'";
*/
//content+="<ul class='tba1'><li class='ali0'>"+duiwu[6]+"</li><li class='"+ys1+"'"+zjq+">"+duiwu[0]+"</li><li class='ali2'>"+jsbf+"</li><li class='"+ys2+"'"+kjq+">"+duiwu[3]+"</li></ul>";



jqsj=document.getElementById("ks"+jinqiu_1[0]).innerText;
cont+="<div style='width:414px; margin:0 auto;margin-bottom:7px;'><div style='height:22px; line-height:20px;font-size:12px; background:url(http://img.raooo.com/img/fenline.jpg) repeat-x; border:solid 1px #a2a09e; border-bottom:none; padding-left:8px; font-family:tahoma,arial,helvetica,sans-serif; '><strong>Ra</strong>足球比分&nbsp;-&nbsp;raooo.com</div><div style='border:solid 1px #a2a09e; border-top:none; padding:3px;'><div style='height:25px; width:80px; float:left; background:#634221; color:#fff;  text-align:center;font-size:14px; line-height:25px;overflow:hidden; white-space:nowrap;'>"+duiwu[6]+"</div><div style='font-family:Verdana;height:25px; width:30px;float:left;line-height:25px; background:#ece9e2;color:blue;text-align:center; font-size:14px; overflow:hidden; white-space:nowrap;'>"+jqsj+"</div><div style='font-family:Verdana;height:25px; width:297px;float:left; font-weight:bold; line-height:25px; background:#ece9e2;text-align:center; font-size:14px; overflow:hidden; white-space:nowrap;'>"+duiwu[0]+"&nbsp;&nbsp;"+bf[0]+"-<span style='color:red;'>"+bf[1]+"&nbsp;&nbsp;"+duiwu[3]+" </span></div><div style='clear:both;'></div></div></div>";

new_score+=duiwu[0]+" <font color=blue>"+bf[0]+"-</font><font color=red>"+bf[1]+" "+duiwu[3]+"</font>"+" ";
height=height+51+10;
zongshu++;
jqok=1;
//}
}
}
//if(document.all["fl_"+jinqiu_1[0]].innerText != "NBA" && document.all["fl_"+jinqiu_1[0]].innerText != "WNBA" && document.all["fl_"+jinqiu_1[0]].innerText != "NCAA" && document.all["fl_"+jinqiu_1[0]].innerText != "EBA" && document.all["fl_"+jinqiu_1[0]].innerText != "STAR" && document.all["fl_"+jinqiu_1[0]].innerText != "EuroB" && document.all["fl_"+jinqiu_1[0]].innerText != "WORLD" && document.all["fl_"+jinqiu_1[0]].innerText != "CBA" && document.all["fl_"+jinqiu_1[0]].innerText != "AsiaB" && document.all["fl_"+jinqiu_1[0]].innerText != "AmerB"){jqok=1;}
}	//for-1
//jqok=1;
//cont="<table width='461' border='0' cellspacing='0' cellpadding='0' style='border:1px solid #000;background:url(/Public/images/tc_bg1.gif) bottom repeat-x; background-color:#FECD12;'><tr style='background:url(/Public/images/bo1.gif)'><td colspan='5' style='color:#fff; font-size:12px; height:14PX; font-family:Arial, Helvetica, sans-serif;'><img src='/Public/images/15150logo.gif' /></td></tr><tr><td height=10></td><td></td><td></td><td></td></tr>"+cont+"<tr'><td height=10></td><td></td><td></td><td></td></tr></table>";
//cont1="<table width='331' border='0' cellspacing='0' cellpadding='0' style='border:1px solid #000;background:url(/Public/images/tc_bg1.gif) bottom repeat-x; background-color:#FECD12;'><tr style='background:url(/Public/images/bo1.gif);height:14px;'><td colspan='5' style='color:#fff; font-size:12px; height:14px; font-family:Arial, Helvetica, sans-serif;text-align:left;border:1px solid #000;'></td></tr><tr style='height:12px;'><td height=10></td><td></td><td></td><td></td></tr>"+cont1+"<tr style='height:14px;'><td height=10></td><td></td><td></td><td></td></tr></table>";

if(new_score!=""){
document.getElementById("jqtsh").className='jqtshcss';
document.getElementById("jqtsh").innerHTML="<span style='font-size:12px;'><font style='color: #6666FF; font-weight:bold'>入球提示：</font>"+new_score+"</span>";
new_score="";
}
if(jqok){

var sound=document.getElementById("soundopen").value;

//document.getElementById("goalsound").innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='1' height='1'><param name='movie' value='s/"+sound+".swf'><param name='quality' value='high'><param name='wmode' value='transparent'></object>";
document.getElementById("goalsound").innerHTML="<p><embed id='swfsound' name='swfsound' pluginspage='http://www.macromedia.com/go/getflashplayer' src='/s/"+sound+".swf' width='1' height='1' type='application/x-shockwave-flash' menu='false' quality='high' /></embed /></p>";

shownew(content,cont,height,zongshu);
}
newjq=goal[2]+document.getElementById("newjqidhtm").value;
document.getElementById("newjqidhtm").value=newjq;
}else{	//if-2
//document.all.goaltips.innerHTML="";
}	//if-2

}	//try
catch(e){}

}
var clickurl="close";
var x;
var y;
var oPopup;
var oPopupBody;
var pop_TC;
var startani_A;
var new_score;
var new_score2;
var imagewidth;
var imageheight;


function shownew(content,cont,height,zongshu){

try{



//var Sys = {};
//var ua = navigator.userAgent.toLowerCase();

//if (document.getElementById("openwin").checked==false || ua.indexOf("maxthon")!= -1 || ua.indexOf("360se")!= -1  || ua.indexOf("se")!= -1|| ua.indexOf("myie")!= -1 || ua.indexOf("tencent")!= -1){
//if (document.getElementById("openwin").checked){

//jinqiu(content,0,zongshu)
content="";

//} else {
//jinqiu(content,cont1,zongshu);
//cont1="";
//content="";
//return false;

//}


if(document.getElementById("openwin").checked){
imagewidth=414;
imageheight=height-7;
height=0;
x=screen.width/2-imagewidth/2;
y=3;

oPopup = window.createPopup();
oPopupBody = oPopup.document.body;
oPopupBody.style.cursor="hand";
oPopupBody.innerHTML =cont;
oPopupBody.onmouseover=new Function("clearTimeout(startani_A)");
oPopupBody.onmouseout=pop;
oPopupBody.onclick=dowhat;
oPopupBody.oncontextmenu=closepopup;
pop_TC=200;
pop();

cont="";


}
}catch(e){}
}
function dowhat(){if(clickurl=="close"){closepopup() ;}else{window.open(clickurl);}}
function pop(){oPopup.show(x,y,imagewidth, imageheight);startani_A=setTimeout("pop()",100);if(pop_TC<0){closepopup();};pop_TC=pop_TC-1;}
function closepopup(){clearTimeout(startani_A);oPopup.hide();}
window.setTimeout("getSpboScoreXml()", 3000);
function delHtmlTag(str){return str.replace(/<[^>]+>/g,"");}

function ReplaceAll(str,sptr,sptr1){while (str.indexOf(sptr) >= 0){str = str.replace(sptr, sptr1);}return str;}
