/*****
360播 免费调用直播插件
http://www.360bo.com/api.html
*****/

/*****初始化变量开始*****/

//live_width 列表宽度
try{live_width=live_width?live_width:960;}
catch(ex){live_width=960;}

//live_height 列表高度
try{live_height=live_height?live_height:2000;}
catch(ex){live_height=2000;}

//live_type 列表内容类别
try{live_type=live_type?live_type:"all";}
catch(ex){live_type="all";}

//lanqiu_bf 篮球比分地址
try{lanqiu_bf=lanqiu_bf?lanqiu_bf:"";}
catch(ex){lanqiu_bf="self";}

//zuqiu_bf 足球比分地址
try{zuqiu_bf=zuqiu_bf?zuqiu_bf:"";}
catch(ex){zuqiu_bf="self";}

//zhibo_ad_content 每个赛程后广告
try{zhibo_ad_content=zhibo_ad_content?zhibo_ad_content:"";}
catch(ex){zhibo_ad_content="";}

//zhibo_ad_content 广告出现几率
try{zhibo_ad_odds=(zhibo_ad_odds>10 || zhibo_ad_odds<1)?0:zhibo_ad_odds;}
catch(ex){zhibo_ad_odds=0;}

lanqiu_bf = lanqiu_bf=="self"?"http://www.360bifen.com/basket/":lanqiu_bf;
zuqiu_bf = zuqiu_bf=="self"?"http://www.360bifen.com/":zuqiu_bf;

/*****初始化变量结束*****/

var site_url = document.location.href;
var iframe_url = '';
var filename = '';
if(site_url.indexOf('live_url=')>-1){
	site_url_array = site_url.split('live_url=');
	iframe_str = site_url_array[1].replace('-dot-', '.');
	iframe_url = 'http://www.360bo.com/'+iframe_str;
	margintop = "-40";
}
else{
	if(live_type == 'football'){
		filename = 'football.html';
	}
	else if(live_type == 'basket'){
		filename = 'basket.html';
	}
	else{
		filename = 'free.html';
	}
	iframe_url = 'http://www.360bo.com/'+filename+'?site='+escape(site_url)+'&lanqiu_bf='+escape(lanqiu_bf)+'&zuqiu_bf='+escape(zuqiu_bf)+'&zhibo_ad_content='+escape(zhibo_ad_content)+'&zhibo_ad_odds='+escape(zhibo_ad_odds);
	margintop = "0";
}
document.write('<div style="text-align:center;position:relative;"><iframe id="listpgm" src="'+iframe_url+'" width="'+live_width+'" height="'+live_height+'" style="margin-top:'+margintop+'px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto"></iframe></div>');
