function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}


function showmovie(movieid,flashid){
thumbnailviewer.thumbBox.style.visibility="hidden";
hidewat();
hidepartners();
hidebanner();
hidemovies();
centerMovie(movieid);
document.getElementById(movieid).style.zIndex = "11";
document.getElementById(movieid).style.visibility = "visible";
var movie = getFlashMovieObject(flashid);
movie.focus();
movie.Play();

}

function hidemovie(movieid,flashid){
document.getElementById(movieid).style.visibility = "hidden";
document.getElementById(movieid).style.zIndex = "-1";
var movie = getFlashMovieObject(flashid);
movie.Rewind();
}

function centerMovie(movie){ 
var scrollbarwidth=16
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
var divobj=document.getElementById(movie)
var ie=document.all && !window.opera
var dom=document.getElementById
var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-scrollbarwidth
var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document
var objwidth=divobj.offsetWidth //width of div element
var objheight=divobj.offsetHeight //height of div element
var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px" //Vertical position of div element: Either centered, or if element height larger than viewpoint height, 10px from top of viewpoint
document.getElementById(movie).style.left=docwidth/2-objwidth/2+"px" //Center div element horizontally
document.getElementById(movie).style.top=Math.floor(parseInt(topposition))+"px"
}
