
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}
else
if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}
else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}
else
if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}
else
if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}
else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}
else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
function showTheFilm(lessonToPlay,width,height,title)
{if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement)
{HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode)
{switch(where)
{case'beforeBegin':this.parentNode.insertBefore(parsedNode,this)
break;case'afterBegin':this.insertBefore(parsedNode,this.firstChild);break;case'beforeEnd':this.appendChild(parsedNode);break;case'afterEnd':if(this.nextSibling)
this.parentNode.insertBefore(parsedNode,this.nextSibling);else this.parentNode.appendChild(parsedNode);break;}}
HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr)
{var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML)}
HTMLElement.prototype.insertAdjacentText=function(where,txtStr)
{var parsedText=document.createTextNode(txtStr)
this.insertAdjacentElement(where,parsedText)}}
document.getElementById("film_title").innerHTML=title+"<a href='javascript:hideMe();'><img id='exit_movie' src='exit.png' alt='exit' /></a>";var begin=document.getElementById("film");if(begin.getElementsByTagName("object")[0])
begin.removeChild(begin.getElementsByTagName("object")[0]);begin.insertAdjacentHTML("beforeEnd"," <object id='player' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' name='player' width='"+width+"' height='"+height+"'>      <param name='movie' value='player-licensed.swf' />      <param name='allowfullscreen' value='true' />      <param name='allowscriptaccess' value='always' />      <param name='flashvars' value='file=filmy/"+lessonToPlay+".flv&image=podglady/"+lessonToPlay+".png' />         <embed    type='application/x-shockwave-flash'     id='player2'     name='player2'     src='player-licensed.swf'     width='"+width+"'     height='"+height+"'     allowscriptaccess='always'     allowfullscreen='true'     flashvars='file=filmy/"+lessonToPlay+".flv&image=podglady/"+lessonToPlay+".png'    /> </object>");document.getElementById('shadow').style.display='block';measures=getPageSize();var _docHeight=(document.height!==undefined)?document.height:document.body.offsetHeight;document.getElementById("shadow").style.height=_docHeight+"px";document.getElementById('film').style.display='block';document.getElementById('film').style.top=((measures[3]-height-30)/2)+"px";document.getElementById('film').style.left=((measures[0]-width)/2)+"px";}
function hideMe(){document.getElementById("shadow").style.display="none";document.getElementById("film").style.display="none";}
