
function scrollToCenter(scrollName, movieName) 
{	
	var winWidth = 0, winHeight = 0;
	sizes=getWindowSize();
  sizeArray=sizes.split(":");
  winWidth=parseInt(sizeArray[0]);
  winHeight=parseInt(sizeArray[1]);
  
	obj=document.getElementById(scrollName);
	objf=document.getElementById(movieName);
	if (obj!=null)
	{	
		obj.style.width=winWidth+"px";
		obj.style.height=winHeight+"px";
		obj.scrollLeft=(obj.scrollWidth-winWidth)/2;
		obj.scrollTop=(obj.scrollHeight-winHeight)/2;
		objf.style.marginTop= 0;
		if (obj.scrollTop==0){
		//alert('style'+objf.style.top	);
			objf.style.marginTop= parseInt((winHeight-680)/2)+"px";
		}
	}
		
		return false;
}

function getWindowSize() 
{	
	var winWidth = 0, winHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    winWidth = window.innerWidth;
    winHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    winWidth = document.documentElement.clientWidth;
    winHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    winWidth = document.body.clientWidth;
    winHeight = document.body.clientHeight;
  }
  return winWidth+":"+winHeight;
}
