﻿var videoPlayer_html = '<embed flashvars="true&closeVideoWindow=closeVideoWindow&link=http://event51.wanmei.com/zhuxian2/201006/newbd/index.htm&window=_blank&allowFullScreen=true&videoURL=http://media101.wanmei.com/media/xmhzx/1111/pk.flv&isAutoPlay=true" src="swf/videoPlayer.swf" id="rollPage_flash" name="rollPage_flash" width="322" height="260" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"  type="application/x-shockwave-flash" allowFullScreen="true" wmode="window"></embed>';

var rollPageStat = 0;
function rollPageCreat(){
	if(rollPageStat == 1){ return false;}
	var thebox = document.createElement("div");
	thebox.style.width = "322px";
	thebox.style.height = "260px";
	thebox.style.position = "absolute";
	thebox.style.overflow = "hidden";
	thebox.style.zIndex = "100000";
	thebox.style.display = 'none';
	//thebox.style.border = "1px solid #ccc"
	thebox.setAttribute('id','videoPlayer_id');
	thebox.innerHTML = videoPlayer_html;
	document.body.appendChild(thebox);
}
function closeVideoWindow(){document.getElementById("videoPlayer_id").style.display="none"; rollPageStat = 1;}
function sc5(el){
if(rollPageStat == 1){ return false;}
if(!document.getElementById(el)){return false;}
document.getElementById(el).style.display = 'block';
document.getElementById(el).style.top=
document.documentElement.scrollTop+document.documentElement.clientHeight-document.getElementById(el).offsetHeight+"px";
document.getElementById(el).style.left=
document.documentElement.scrollLeft+document.documentElement.clientWidth-document.getElementById(el).offsetWidth+"px";
}

window.onscroll= function (){sc5('videoPlayer_id');};
window.onresize= function (){sc5('videoPlayer_id');};
window.onload = function (){ rollPageCreat(); setTimeout(function(){sc5('videoPlayer_id');},10000);}; 
