var width ='100%';//宽度
var height ='495';//高度
var smallad='/jsplay/ad.html';//FLV视频小广告
var buffer = '';//贴片广告网页地址  /jsplay/bdhdar.html?buffer
var pause = '/jsplay/loading.html?pause';//暂停广告网页地址 
var end = '/jsplay/loading.html?end';//影片播放完成后加载的广告 
var btime = 5;//缓冲广告展示时间(如果设为0,则根据缓冲进度自动控制广告展示时间)

var ll1=function(tagName){return parent.document.getElementById(tagName);}
var ll11=function(tagName){return document.getElementById(tagName);}
var l11 = parent.document.URL.split("-");
var l1=parent.VideoListplay;

if(l11[0].indexOf("tudou")>=0){
	var sid = parseInt(l11[2]);
	var pid = parseInt(l11[3].split(".")[0]);
}else{
	var sid = parseInt(l11[1]);
	var pid = parseInt(l11[2].split(".")[0]);
}

function $$(id){return document.getElementById(id);}
function playerLarge(playerSohw){
	var playerLarge;
	playerLarge=$$(playerSohw);
	var wh = document.getElementById("player").style;
	var pw = document.getElementById("player_box").style;
	if (playerLarge.innerHTML=='\u5BBD\u5C4F\u89C2\u770B'){
		playerLarge.innerHTML='\u5C0F\u5C4F\u89C2\u770B';
		wh.width=995+"px";
		pw.width=995+"px";
		document.getElementById("player-union").style.display="none";
		document.getElementById("player").style.zIndex="999";
	}else{
		playerLarge.innerHTML='\u5BBD\u5C4F\u89C2\u770B';
		wh.width=680+"px";
		pw.width=680+"px";
		document.getElementById("player-union").style.display=""
	}
}

function sohwlist(listid){
	var sohwlist;
	sohwlist=$$(listid);
	if(sohwlist.innerHTML=="\u5c55\u5f00\u5217\u8868"){
		sohwlist.innerHTML="\u6536\u8d77\u5217\u8868";
		document.getElementById("frmTitle").style.display=""
		}else{
		sohwlist.innerHTML="\u5c55\u5f00\u5217\u8868";
		document.getElementById("frmTitle").style.display="none"
	}
}

var gourl = parent.urlinfo;if(pid==0){var prevturl="javascript:void(0);\" onclick=\"alert('已经是第一集了^_^');";}else{var prevturl=gourl.replace("<from>",sid).replace("<pos>",pid-1);}if(pid==l1[sid][1].length-1){var nexturl="javascript:void(0);\" onclick=\"alert('已经是最后一集了^_^');";}else{var nexturl=gourl.replace("<from>",sid).replace("<pos>",pid+1);}

var play = l1[sid][1][pid].split("$")[2];
var urlname = l1[sid][1][pid].split("$")[0];
var url = l1[sid][1][pid].split("$")[1];
parent.document.title=vTitle+urlname+"_"+getplayname(play)+"_"+vName;

function getplayname(play){
	if(play=='swf' | play=='56'){
		return '普通视频在线播放';
	}else if(play=='qiyi'){
		return '奇艺在线播放';
	}else if(play=='iask' | play=='hd_iask'){
		return '新浪在线播放';
	}else if(play=='bdhd'){
		return '百度影音在线播放';
	}else if(play=='qvod'){
		return '快播在线播放';
	}else if(play=='sohu'){
		return '搜狐在线播放';
	}else if(play=='tudou'){
		return '土豆在线播放';
	}else if(play=='youku'){
		return '优酷在线播放';
	}else{
		return '在线播放';
	}
}

document.write('<table style="border:0px;width:100%;text-align:center;"><tr>');
document.write('<td class="open-close"><a onClick="sohwlist(\'slist\');" id="slist" style="cursor:pointer">展开列表</a></td>');
document.write('<td><div id="playppvod">'+vTitle+ ' ' +urlname+ '</div>');
document.write('</td>');
document.write('<td class="prev-next" style="width:150px;font-weight:bold"><a href="'+ prevturl+ '">上一集</a><a href="'+ nexturl+ '">下一集</a></td>');
document.write('</tr></table>');