1
2 var isIE=false; isIE=true; function getSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; }else{ } return [myWidth,myHeight]; } function orgin(){} orgin.init=false; orgin.position=""; orgin.top=""; orgin.left=""; orgin.width=""; orgin.height=""; orgin.isfullscreen=false; function player_reset(){ if(orgin.init ==true){ try{ orgin.isfullscreen=false; $("player").style.position= orgin.position; $("player").style.top= orgin.top; $("player").style.left= orgin.left; $("player").style.width= orgin.width; $("player").style.height= orgin.height; document.location.hash=""; document.body.style.overflow='auto'; if(isIE){ $("player_bg").style.width= "0px"; $("player_bg").style.height= "0px"; $("player_bg").style.display= "none"; } }catch(e){} } } function player_fullscreen(){ if(orgin.init!=true){ orgin.postion = document.getElementById("player").style.position; orgin.top= document.getElementById("player").style.top; orgin.left= document.getElementById("player").style.left; orgin.width= document.getElementById("player").style.width; orgin.height= document.getElementById("player").style.height; } orgin.init=true; orgin.isfullscreen=true; var p= getSize(); try{ document.getElementById("player").style.position= "absolute"; document.getElementById("player").style.top= 0; document.getElementById("player").style.left= 0; document.getElementById('player').style.width=p[0] + "px"; document.getElementById('player').style.height=p[1] + "px"; document.body.style.overflow='hidden'; window.scrollTo(0,0); if(isIE){ document.getElementById("player_bg").style.display= ""; document.getElementById("player_bg").style.position= "absolute"; document.getElementById("player_bg").style.top= "0px"; document.getElementById("player_bg").style.left= "0px"; document.getElementById('player_bg').style.width=p[0] + "px"; document.getElementById('player_bg').style.height=p[1] + "px"; } }catch(e){} } function resize(){ if(orgin.isfullscreen !=true){ return; }else{ player_fullscreen(); } } function onPlayerStart(videoid,title){ return; } window.onresize = resize;